[Scummvm-cvs-logs] CVS: tools compress_san.cpp,1.32,1.33

Eugene Sandulenko sev at users.sourceforge.net
Tue Jan 25 15:07:57 CET 2005


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28120

Modified Files:
	compress_san.cpp 
Log Message:
Fix regression with audio.


Index: compress_san.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/compress_san.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- compress_san.cpp	24 Jan 2005 22:26:33 -0000	1.32
+++ compress_san.cpp	25 Jan 2005 23:05:56 -0000	1.33
@@ -432,10 +432,10 @@
 				}
 
 				for (r = 0; r < length; r += 4) {
-					int16 wavSampleL = READ_LE_UINT16(wavBuf + offset + r + 0);
-					int16 wavSampleR = READ_LE_UINT16(wavBuf + offset + r + 2);
-					int32 tmpSampleL = READ_LE_UINT16(tmpBuf + offset + r + 0);
-					int32 tmpSampleR = READ_LE_UINT16(tmpBuf + offset + r + 2);
+					int16 wavSampleL = (int16)READ_LE_UINT16(wavBuf + offset + r + 0);
+					int16 wavSampleR = (int16)READ_LE_UINT16(wavBuf + offset + r + 2);
+					int32 tmpSampleL = (int16)READ_LE_UINT16(tmpBuf + offset + r + 0);
+					int32 tmpSampleR = (int16)READ_LE_UINT16(tmpBuf + offset + r + 2);
 					tmpSampleL = (tmpSampleL * volume) / 255;
 					tmpSampleR = (tmpSampleR * volume) / 255;
 					clampedAdd(wavSampleL, tmpSampleL);





More information about the Scummvm-git-logs mailing list