summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-27 14:54:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-09-27 14:54:09 +0000
commit285da0d05eb2e6b680a8dfc497cf4ecab75b7aa4 (patch)
tree0a4e4169ffada0fbdc25fd91822a8c0fe678571c /src/sound.cpp
parentc24856707233ceb3995e43f8f7da63e65999df1e (diff)
downloadmana-client-285da0d05eb2e6b680a8dfc497cf4ecab75b7aa4.tar.gz
mana-client-285da0d05eb2e6b680a8dfc497cf4ecab75b7aa4.tar.bz2
mana-client-285da0d05eb2e6b680a8dfc497cf4ecab75b7aa4.tar.xz
mana-client-285da0d05eb2e6b680a8dfc497cf4ecab75b7aa4.zip
Merged another bunch of changes from trunk to 0.0 to reduce the difference.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 8ba8fe99..cf77cfab 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -126,7 +126,7 @@ void Sound::setSfxVolume(int volume)
Mix_Volume(-1, volume);
}
-void Sound::playMusic(const char *path, int loop)
+void Sound::playMusic(const std::string &path, int loop)
{
if (!mInstalled) return;
@@ -134,9 +134,10 @@ void Sound::playMusic(const char *path, int loop)
stopMusic();
}
- logger->log("Sound::startMusic() Playing \"%s\" %i times", path, loop);
+ logger->log("Sound::startMusic() Playing \"%s\" %i times", path.c_str(),
+ loop);
- mMusic = Mix_LoadMUS(path);
+ mMusic = Mix_LoadMUS(path.c_str());
if (mMusic) {
Mix_PlayMusic(mMusic, loop);
}
@@ -158,7 +159,7 @@ void Sound::stopMusic()
}
}
-void Sound::fadeInMusic(const char *path, int loop, int ms)
+void Sound::fadeInMusic(const std::string &path, int loop, int ms)
{
if (!mInstalled) return;
@@ -166,10 +167,11 @@ void Sound::fadeInMusic(const char *path, int loop, int ms)
stopMusic();
}
- logger->log("Sound::fadeInMusic() Fading \"%s\" %i times (%i ms)", path,
- loop, ms);
+ logger->log("Sound::fadeInMusic() Fading \"%s\" %i times (%i ms)",
+ path.c_str(),
+ loop, ms);
- mMusic = Mix_LoadMUS(path);
+ mMusic = Mix_LoadMUS(path.c_str());
if (mMusic) {
Mix_FadeInMusic(mMusic, loop, ms);
}