summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
commit8da32105732949b4b0273c718d118bcfae70a1c9 (patch)
tree0a354974d48268cfaafcdb1e06b498fa26a59c1e /src/sound.cpp
parentf9ce4e302cb3ed203d89a7a18e10b7ad4f11519c (diff)
downloadmana-8da32105732949b4b0273c718d118bcfae70a1c9.tar.gz
mana-8da32105732949b4b0273c718d118bcfae70a1c9.tar.bz2
mana-8da32105732949b4b0273c718d118bcfae70a1c9.tar.xz
mana-8da32105732949b4b0273c718d118bcfae70a1c9.zip
Merged 0.0 changes from revision 2825 to 2898 to trunk.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 182be3d6..8ba8fe99 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -191,15 +191,15 @@ void Sound::fadeOutMusic(int ms)
}
}
-void Sound::playSfx(const char *path)
+void Sound::playSfx(const std::string &path)
{
- if (!mInstalled) return;
+ if (!mInstalled || path.length() == 0) return;
ResourceManager *resman = ResourceManager::getInstance();
SoundEffect *sample = resman->getSoundEffect(path);
if (sample) {
+ logger->log("Sound::playSfx() Playing: %s", path.c_str());
sample->play(0, 120);
- logger->log("Sound::playSfx() Playing: %s", path);
}
}