summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 95860992..241e25e4 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -27,6 +27,8 @@
#include "resources/resourcemanager.h"
#include "resources/soundeffect.h"
+#include "configuration.h"
+
Sound::Sound():
mInstalled(false),
mSfxVolume(100),
@@ -149,7 +151,9 @@ static Mix_Music *loadMusic(const std::string &filename)
// it to a temporary physical file so that SDL_mixer can stream it.
logger->log("Loading music \"%s\" from temporary file tempMusic.ogg",
path.c_str());
- bool success = resman->copyFile("music/" + filename, "tempMusic.ogg");
+ bool success = resman->copyFile(
+ paths.getValue("music", "music/")
+ + filename, "tempMusic.ogg");
if (success)
path = resman->getPath("tempMusic.ogg");
else
@@ -235,7 +239,8 @@ void Sound::playSfx(const std::string &path)
return;
ResourceManager *resman = ResourceManager::getInstance();
- SoundEffect *sample = resman->getSoundEffect(path);
+ SoundEffect *sample = resman->getSoundEffect(
+ paths.getValue("sfx", "sfx/") + path);
if (sample)
{
logger->log("Sound::playSfx() Playing: %s", path.c_str());