[Scummvm-cvs-logs] SF.net SVN: scummvm: [28672] scummvm/trunk/engines/agi/sound.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Mon Aug 20 01:28:38 CEST 2007


Revision: 28672
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28672&view=rev
Author:   buddha_
Date:     2007-08-19 16:28:38 -0700 (Sun, 19 Aug 2007)

Log Message:
-----------
Fixes previously crashing sound. Crash happened because of PCjr 4-channel mixing code trying to use uninitialized values (phase, ins etc) when mixSound was called before anything was playing.

Modified Paths:
--------------
    scummvm/trunk/engines/agi/sound.cpp

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2007-08-19 20:48:11 UTC (rev 28671)
+++ scummvm/trunk/engines/agi/sound.cpp	2007-08-19 23:28:38 UTC (rev 28672)
@@ -663,6 +663,9 @@
 
 	memset(_sndBuffer, 0, BUFFER_SIZE << 1);
 
+	if (!_playing || _playingSound == -1)
+		return BUFFER_SIZE;
+
 	// Handle Apple IIGS sound mixing here
 	if (_vm->_soundemu == SOUND_EMU_APPLE2GS && _playing && _playingSound != -1) {
 		//IIgsWaveInfo &waveInfo = _IIgsChannel.ins.oscList(0).waves[0];


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