[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.cpp,1.58,1.59 d_sound.h,1.16,1.17

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Thu Sep 25 03:04:07 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv1878

Modified Files:
	d_sound.cpp d_sound.h 
Log Message:
Some minor fixes. Unfortunately I've noticed that there is some major sound
distortion in the credits music, and I haven't yet figured out what's
causing this.


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- d_sound.cpp	25 Sep 2003 06:11:07 -0000	1.58
+++ d_sound.cpp	25 Sep 2003 10:02:52 -0000	1.59
@@ -165,9 +165,9 @@
 static File fpMus;
 
 // Decompression macros
-#define GetCompressedShift(byte)      ((byte) >> 4)
-#define GetCompressedSign(byte)       (((byte) >> 3) & 1)
-#define GetCompressedAmplitude(byte)  ((byte) & 7)
+#define GetCompressedShift(n)      ((n) >> 4)
+#define GetCompressedSign(n)       (((n) >> 3) & 1)
+#define GetCompressedAmplitude(n)  ((n) & 7)
 
 int32 panTable[33] = {
 	-127, -119, -111, -103, -95, -87, -79, -71, -63, -55, -47, -39, -31, -23, -15, -7,
@@ -943,8 +943,8 @@
 	// Calculate the file position of the end of the music
 	music[primaryStream]._fileEnd += music[primaryStream]._filePos;
 
-	music[primaryStream]._lastSample = fpMus.readByte();
-	music[primaryStream]._filePos++;
+	music[primaryStream]._lastSample = fpMus.readUint16LE();
+	music[primaryStream]._filePos += 2;
 	music[primaryStream]._streaming = true;
 
 	return RD_OK;

Index: d_sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- d_sound.h	25 Sep 2003 06:11:07 -0000	1.16
+++ d_sound.h	25 Sep 2003 10:02:52 -0000	1.17
@@ -62,7 +62,7 @@
 	int32 _fading;
 	int32 _filePos;
 	int32 _fileEnd;
-	int16 _lastSample;
+	uint16 _lastSample;
 
 	bool isStereo()	const	{ return false; }
 	int getRate() const	{ return 22050; }





More information about the Scummvm-git-logs mailing list