[Scummvm-cvs-logs] CVS: scummvm insane.cpp,1.30,1.31

James Brown ender at users.sourceforge.net
Mon May 13 10:24:05 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv19881

Modified Files:
	insane.cpp 
Log Message:
One last post-freeze fix.



Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/insane.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- insane.cpp	13 May 2002 08:25:58 -0000	1.30
+++ insane.cpp	13 May 2002 17:23:58 -0000	1.31
@@ -152,7 +152,8 @@
 
 	if (idx == 8) {
 		for (idx = 0; idx < 8; idx++) {
-			if (_imusTrk[idx] == 0) {
+			if (_imusTrk[idx] == 0 &&
+			    g_scumm->_mixer->_channels[idx] == NULL) {
 				_imusTrk[idx] = trk;
 				_imusSize[idx] = 0;
 				break;
@@ -266,10 +267,12 @@
 		_imusSubSize[idx] -= sublen;
 		_imusSize[idx] -= sublen;				
 		pos += sublen;	
-	}
 
-	if (_imusSubSize[idx] == 0 && _imusSubTag[idx] == 'DATA')
-		_imusTrk[idx] = 0;
+		if (_imusSubSize[idx] == 0 && _imusSubTag[idx] == 'DATA') {
+			_imusTrk[idx] = 0;
+			return;
+		}
+	}
 }
 
 void SmushPlayer::parseNPAL()
@@ -791,10 +794,11 @@
 
 	if (idx == 8) {
 		for (idx = 0; idx < 8; idx++) {
-			if (_psadTrk[idx] == 0) {
-				_psadTrk[idx] = trk;
-				_saudSize[idx] = 0;
-				break;
+			if (_psadTrk[idx] == 0 &&
+			    g_scumm->_mixer->_channels[idx] == NULL) {
+					_psadTrk[idx] = trk;
+					_saudSize[idx] = 0;
+					break;
 			}
 		}
 	}





More information about the Scummvm-git-logs mailing list