[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.22,1.23

Max Horn fingolfin at users.sourceforge.net
Wed Oct 2 10:32:46 CEST 2002


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

Modified Files:
	sound.cpp 
Log Message:
patch #617419: SAM: sound fix

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- sound.cpp	2 Oct 2002 10:12:19 -0000	1.22
+++ sound.cpp	2 Oct 2002 17:30:26 -0000	1.23
@@ -461,6 +461,19 @@
 		return -1;
 	}
 
+	// Some games frequently assume that starting one sound effect will
+	// automatically stop any other that may be playing at that time. So
+	// that is what we do here, but we make an exception for speech.
+	// 
+	// Do any other games than these need this hack?
+
+	if (mode == 1 && (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX)) {
+		for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
+			if (i != _talkChannel)
+				_scumm->_mixer->stop(i);
+		}
+	}
+
 	if (b > 8) {
 		num = (b - 8) >> 1;
 	}
@@ -711,17 +724,6 @@
 	uint size = 0;
 	int rate, comp;
 	byte *data;
-
-	// FIXME: Some games frequently assume that starting one sound effect
-	// will automatically stop any other that may be playing at that time.
-	// Do any other games need this?
-
-	if (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX) {
-		for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
-			if (i != _talkChannel)
-				_scumm->_mixer->stop(i);
-		}
-	}
 
 #ifdef COMPRESSED_SOUND_FILE
 	if (file_size > 0) {





More information about the Scummvm-git-logs mailing list