[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.17,1.18

James Brown ender at users.sourceforge.net
Sun Sep 29 08:13:03 CEST 2002


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

Modified Files:
	sound.cpp 
Log Message:
Patch #616146: Hack to prevent multiple sounds on DOTT/SamNmax (not sure if it's the correct
behavior for Sam, seems right for DOTT tho)


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- sound.cpp	29 Sep 2002 07:08:31 -0000	1.17
+++ sound.cpp	29 Sep 2002 15:12:18 -0000	1.18
@@ -396,7 +396,6 @@
 
 	if (_talk_sound_mode != 0) {
 		if (_talk_sound_mode & 1)
-
 			startTalkSound(_talk_sound_a1, _talk_sound_b1, 1);
 		if (_talk_sound_mode & 2)
 			_talkChannel = startTalkSound(_talk_sound_a2, _talk_sound_b2, 2);
@@ -704,12 +703,16 @@
 	int rate, comp;
 	byte *data;
 
-	// FIXME: Day of the Tentacle frequently assumes that starting one sound
-	// effect will automatically stop any other that may be playing at that
-	// time. Do any other games need this?
+	// 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)
-		stopSfxSound();
+	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