[Scummvm-cvs-logs] CVS: scummvm insane.cpp,1.32,1.33 smush.h,1.6,1.7

Pawe? Ko?odziejski aquadran at users.sourceforge.net
Thu May 23 16:26:04 CEST 2002


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

Modified Files:
	insane.cpp smush.h 
Log Message:
Update for 16 bits and stereo smush sound in the dig

Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/insane.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- insane.cpp	14 May 2002 19:55:39 -0000	1.32
+++ insane.cpp	23 May 2002 23:25:34 -0000	1.33
@@ -198,17 +198,23 @@
 				error("trk %d: no FRMT section");
 			_imusCodec[idx] = READ_BE_UINT32(_cur + pos + 16);
 			_imusRate[idx] = READ_BE_UINT32(_cur + pos + 20);
+			_imusChan[idx] = READ_BE_UINT32(_cur + pos + 24);
 			_imusPos[idx] = 0;
 			break;
 		case 'DATA' :
 			switch (_imusCodec[idx]) {
 			case 8 :
+				if (_imusChan[idx] == 2)
+					flags |= SoundMixer::FLAG_STEREO;
 				flags |= SoundMixer::FLAG_UNSIGNED;
 				buf = (byte *) malloc(sublen);
 				memcpy(buf, _cur + pos, sublen);
 				bpos = sublen;
 				break;
 			case 12 :
+				if (_imusChan[idx] == 2)
+					flags |= SoundMixer::FLAG_STEREO;
+				flags |= SoundMixer::FLAG_16BITS;
 				buf = (byte *) malloc(2 * sublen);
 
 				bpos = 0;
@@ -229,15 +235,15 @@
 						temp = (temp | _imusData[idx][0]) << 4;
 						temp -= 0x8000;
 
-						//buf[bpos++] = temp & 0xff;
 						buf[bpos++] = (temp >> 8) & 0xff;
+						buf[bpos++] = temp & 0xff;
 
 						temp = (_imusData[idx][1] & 0xf0) << 4;
 						temp = (temp | _imusData[idx][2]) << 4;
 						temp -= 0x8000;
 
-						//buf[bpos++] = temp & 0xff;
 						buf[bpos++] = (temp >> 8) & 0xff;
+						buf[bpos++] = temp & 0xff;
 						_imusPos[idx] = 0;
 					}
 				}

Index: smush.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smush.h	12 May 2002 17:49:34 -0000	1.6
+++ smush.h	23 May 2002 23:25:34 -0000	1.7
@@ -72,7 +72,7 @@
 
 		/* IACT: The Dig audio */
 		uint32 _imusSize[8], _imusSubSize[8];
-		uint32 _imusTrk[8], _imusRate[8];
+		uint32 _imusTrk[8], _imusRate[8], _imusChan[8];
 		uint32 _imusSubTag[8];
 		byte _imusData[8][3];
 		uint32 _imusPos[8], _imusCodec[8];





More information about the Scummvm-git-logs mailing list