[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_mixer.cpp,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Mon Dec 22 11:14:15 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv15369

Modified Files:
	smush_mixer.cpp 
Log Message:
fix for bug #864478 (Smush audio streaming); cleanup

Index: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- smush_mixer.cpp	21 Dec 2003 01:17:02 -0000	1.23
+++ smush_mixer.cpp	22 Dec 2003 19:03:32 -0000	1.24
@@ -70,7 +70,7 @@
 	}
 
 	for (i = 0; i < NUM_CHANNELS; i++) {
-		if (_channels[i].chan == NULL || _channels[i].id == -1) {
+		if ((_channels[i].chan == NULL || _channels[i].id == -1) && _channels[i].handle == 0) {
 			_channels[i].chan = c;
 			_channels[i].id = track;
 			_channels[i].handle = 0;
@@ -99,14 +99,14 @@
 				_mixer->endStream(_channels[i].handle);
 			} else {
 				int32 rate;
-				bool stereo, is_short;
+				bool stereo, is_16bit;
 				void *data;
 
-				_channels[i].chan->getParameters(rate, stereo, is_short);
+				_channels[i].chan->getParameters(rate, stereo, is_16bit);
 				int32 size = _channels[i].chan->availableSoundData();
 				byte flags = stereo ? SoundMixer::FLAG_STEREO : 0;
 
-				if (is_short) {
+				if (is_16bit) {
 					data = malloc(size * (stereo ? 2 : 1) * 4);
 					_channels[i].chan->getSoundData((int16 *)data, size);
 					size *= stereo ? 4 : 2;





More information about the Scummvm-git-logs mailing list