[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.42,1.43

Travis Howell kirben at users.sourceforge.net
Sat Nov 2 02:52:04 CET 2002


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

Modified Files:
	simon.cpp 
Log Message:

Added simon sound bugfix, patch #632518
Added fix for simon sound-related crash, patch #632517


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- simon.cpp	2 Nov 2002 09:23:30 -0000	1.42
+++ simon.cpp	2 Nov 2002 10:51:32 -0000	1.43
@@ -143,6 +143,10 @@
 		warning("Sound initialization failed. "
 						"Features of the game that depend on sound synchronization will most likely break");
 	set_volume(detector->_sfx_volume);
+
+	_playing_sound = 0;
+	_effects_sound = 0;
+	_voice_sound = 0;
 }
 
 SimonState::~SimonState()
@@ -4770,7 +4774,8 @@
 	if (_voice_offsets == NULL)
 		return;
 	
-	_mixer->stop(_voice_sound);
+	if (_voice_sound != 0)
+		_mixer->stop(_voice_sound);
 	_voice_file->seek(_voice_offsets[voice], SEEK_SET);
 
 #ifdef USE_MAD
@@ -4858,7 +4863,8 @@
 			VocBlockHeader voc_block_hdr;
 			uint32 size;
 
-			_mixer->stop(_effects_sound);
+			if (_effects_sound != 0)
+				_mixer->stop(_effects_sound);
 			_effects_file->seek(_effects_offsets[sound], SEEK_SET);
 
 
@@ -4891,7 +4897,8 @@
 
 			byte *p;
 
-			_mixer->stop(_playing_sound);
+			if (_playing_sound != 0)
+				_mixer->stop(_playing_sound);
 
 			/* Check if _sfx_heap is NULL */
 			if (_sfx_heap == NULL) {





More information about the Scummvm-git-logs mailing list