aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorChristopher Page2008-07-07 03:30:34 +0000
committerChristopher Page2008-07-07 03:30:34 +0000
commit113aa1e77fa82e9dc41c6f7cd30070457e995f33 (patch)
treec4f70ba3a92c57f966c8edf987a49eef2f9debe3 /engines
parenta42bb09c727fc16ca91f00c8743a97beddf998ee (diff)
downloadscummvm-rg350-113aa1e77fa82e9dc41c6f7cd30070457e995f33.tar.gz
scummvm-rg350-113aa1e77fa82e9dc41c6f7cd30070457e995f33.tar.bz2
scummvm-rg350-113aa1e77fa82e9dc41c6f7cd30070457e995f33.zip
LURE: Made sure to lock _soundMutex in syncSounds()
svn-id: r32934
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index 94b7455a1f..d59d03f9c3 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -285,16 +285,17 @@ uint8 SoundManager::descIndexOf(uint8 soundNumber) {
// Used to sync the volume for all channels with the Config Manager
//
void SoundManager::syncSounds(uint8 musicVol, uint8 sfxVol) {
- MusicListIterator i;
-
musicInterface_TidySounds();
+ g_system->lockMutex(_soundMutex);
+ MusicListIterator i;
for (i = _playingSounds.begin(); i != _playingSounds.end(); ++i) {
if ((*i)->isMusic())
(*i)->setVolume(musicVol);
else
(*i)->setVolume(sfxVol);
}
+ g_system->unlockMutex(_soundMutex);
}
SoundDescResource *SoundManager::findSound(uint8 soundNumber) {