summaryrefslogtreecommitdiff
path: root/src/soundmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
commitda05d9dd98315378bdded216184294f376643191 (patch)
treeffc4b984c73c3bb68d26a1df6481634254075744 /src/soundmanager.cpp
parentec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff)
downloadManaVerse-da05d9dd98315378bdded216184294f376643191.tar.gz
ManaVerse-da05d9dd98315378bdded216184294f376643191.tar.bz2
ManaVerse-da05d9dd98315378bdded216184294f376643191.tar.xz
ManaVerse-da05d9dd98315378bdded216184294f376643191.zip
Use resource manager as global variable.
Diffstat (limited to 'src/soundmanager.cpp')
-rw-r--r--src/soundmanager.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index 8a6170c7f..3002d39f7 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -255,8 +255,8 @@ void SoundManager::setSfxVolume(const int volume)
static SDLMusic *loadMusic(const std::string &fileName)
{
- ResourceManager *const resman = ResourceManager::getInstance();
- return resman->getMusic(paths.getStringValue("music").append(fileName));
+ return resourceManager->getMusic(
+ paths.getStringValue("music").append(fileName));
}
void SoundManager::playMusic(const std::string &fileName)
@@ -378,8 +378,7 @@ void SoundManager::playSfx(const std::string &path,
tmpPath = path;
else
tmpPath = paths.getValue("sfx", "sfx/").append(path);
- ResourceManager *const resman = ResourceManager::getInstance();
- SoundEffect *const sample = resman->getSoundEffect(tmpPath);
+ SoundEffect *const sample = resourceManager->getSoundEffect(tmpPath);
if (sample)
{
logger->log("SoundManager::playSfx() Playing: %s", path.c_str());
@@ -421,8 +420,7 @@ void SoundManager::playGuiSfx(const std::string &path)
tmpPath = path;
else
tmpPath = paths.getValue("sfx", "sfx/").append(path);
- ResourceManager *const resman = ResourceManager::getInstance();
- SoundEffect *const sample = resman->getSoundEffect(tmpPath);
+ SoundEffect *const sample = resourceManager->getSoundEffect(tmpPath);
if (sample)
{
logger->log("SoundManager::playGuiSfx() Playing: %s", path.c_str());