[Scummvm-cvs-logs] SF.net SVN: scummvm:[46577] scummvm/trunk/engines/sci/sfx/music.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Dec 26 11:50:05 CET 2009


Revision: 46577
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46577&view=rev
Author:   thebluegr
Date:     2009-12-26 10:50:05 +0000 (Sat, 26 Dec 2009)

Log Message:
-----------
Restored the mutexes in onTimer, and removed them from soundKill - fixes the freeze in LSL5 intro

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/music.cpp

Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-26 10:43:37 UTC (rev 46576)
+++ scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-26 10:50:05 UTC (rev 46577)
@@ -345,7 +345,7 @@
 }
 //----------------------------------------
 void SciMusic::onTimer() {
-//	_mutex.lock();
+	_mutex.lock();
 
 	uint sz = _playList.size();
 	for (uint i = 0; i < sz; i++) {
@@ -372,7 +372,7 @@
 		}
 	}//for()
 	
-//	_mutex.unlock();
+	_mutex.unlock();
 }
 //---------------------------------------------
 void SciMusic::doFade(MusicEntry *pSnd) {
@@ -452,8 +452,9 @@
 }
 //---------------------------------------------
 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) {
 		pSnd->pMidiParser->unloadMusic();
@@ -476,7 +477,6 @@
 		}
 	}
 
-	_mutex.unlock();
 }
 //---------------------------------------------
 void SciMusic::soundPause(MusicEntry *pSnd) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list