[Scummvm-cvs-logs] CVS: scummvm insane.cpp,1.27,1.28

James Brown ender at users.sourceforge.net
Sun May 12 09:54:01 CEST 2002


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

Modified Files:
	insane.cpp 
Log Message:
Add new mixer 'append' function to allow pseudo-streaming for SMUSH



Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/insane.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- insane.cpp	12 May 2002 11:47:50 -0000	1.27
+++ insane.cpp	12 May 2002 16:53:13 -0000	1.28
@@ -36,6 +36,7 @@
 }
 
 int _frameChanged;
+int _mixer_num;
 
 uint32 SmushPlayer::nextBE32()
 {
@@ -645,8 +646,7 @@
 void SmushPlayer::parsePSAD()	// FIXME: Needs to append to
 {								//		  a sound buffer
 	unsigned int pos, sublen, tag, idx, trk;
-	byte * buf;
-	
+	byte * buf;	
 	pos = 0;
 	
 	trk = READ_LE_UINT16(_cur + pos); /* FIXME: is this correct ? */
@@ -712,10 +712,8 @@
 			debug(3, "trk %d: SDAT part len 0x%x rate %d",
 			      trk, sublen, _strkRate[idx]);
 
-			g_scumm->_mixer->play_raw(NULL, buf,
-						  sublen, _strkRate[idx],
-						  SoundMixer::FLAG_UNSIGNED |
-						  SoundMixer::FLAG_AUTOFREE);
+			g_scumm->_mixer->append(idx, buf, sublen, 
+				_strkRate[idx], SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
 			break;
 		case 'SMRK' :
 			_psadTrk[idx] = 0;
@@ -808,6 +806,7 @@
 	_renderBitmap = sm->_videoBuffer;
 	codec37_init(&pcd37, 320, 200);
 
+	_mixer_num = -1;
 	memset(_saudSize, 0, sizeof(_saudSize));
 	memset(_saudSubSize, 0, sizeof(_saudSubSize));
 	memset(_psadTrk, 0, sizeof(_psadTrk));





More information about the Scummvm-git-logs mailing list