aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-26 10:50:05 +0000
committerFilippos Karapetis2009-12-26 10:50:05 +0000
commit8940a1f537af66953bb8d4d32b7a2250744afc19 (patch)
tree3af31645e5d6c6a5874616a6201827a1aab592ff /engines/sci/sfx
parentbc0da4dce86f4cefd019ecb034d57f6c3d11f601 (diff)
downloadscummvm-rg350-8940a1f537af66953bb8d4d32b7a2250744afc19.tar.gz
scummvm-rg350-8940a1f537af66953bb8d4d32b7a2250744afc19.tar.bz2
scummvm-rg350-8940a1f537af66953bb8d4d32b7a2250744afc19.zip
Restored the mutexes in onTimer, and removed them from soundKill - fixes the freeze in LSL5 intro
svn-id: r46577
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/music.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp
index b0ace2bea9..63fdc114aa 100644
--- a/engines/sci/sfx/music.cpp
+++ b/engines/sci/sfx/music.cpp
@@ -345,7 +345,7 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
}
//----------------------------------------
void SciMusic::onTimer() {
-// _mutex.lock();
+ _mutex.lock();
uint sz = _playList.size();
for (uint i = 0; i < sz; i++) {
@@ -372,7 +372,7 @@ void SciMusic::onTimer() {
}
}//for()
-// _mutex.unlock();
+ _mutex.unlock();
}
//---------------------------------------------
void SciMusic::doFade(MusicEntry *pSnd) {
@@ -452,7 +452,8 @@ void SciMusic::soundSetPriority(MusicEntry *pSnd, byte prio) {
}
//---------------------------------------------
void SciMusic::soundKill(MusicEntry *pSnd) {
- _mutex.lock();
+
+ // For some reason, adding a mutex here freezes some games (e.g. LSL5)
pSnd->status = kSndStatusStopped;
if (pSnd->pMidiParser) {
@@ -476,7 +477,6 @@ void SciMusic::soundKill(MusicEntry *pSnd) {
}
}
- _mutex.unlock();
}
//---------------------------------------------
void SciMusic::soundPause(MusicEntry *pSnd) {