LURE: Made sure to lock _soundMutex in syncSounds()

svn-id: r32934
This commit is contained in:
Christopher Page 2008-07-07 03:30:34 +00:00
parent a42bb09c72
commit 113aa1e77f

View File

@ -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) {