[Scummvm-cvs-logs] SF.net SVN: scummvm: [22812] scummvm/trunk/sound/adpcm.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed May 31 15:38:02 CEST 2006
Revision: 22812
Author: eriktorbjorn
Date: 2006-05-31 15:37:28 -0700 (Wed, 31 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22812&view=rev
Log Message:
-----------
Clip samp to 2047, not 2048, so that it stays positive when multiplied by 16.
This seems to fix sound distortion in the Inherit the Earth demo.
Modified Paths:
--------------
scummvm/trunk/sound/adpcm.cpp
Modified: scummvm/trunk/sound/adpcm.cpp
===================================================================
--- scummvm/trunk/sound/adpcm.cpp 2006-05-31 21:13:37 UTC (rev 22811)
+++ scummvm/trunk/sound/adpcm.cpp 2006-05-31 22:37:28 UTC (rev 22812)
@@ -266,9 +266,9 @@
diff = (code & 0x08) ? -E : E;
samp = _status.last + diff;
- // Clip the values to +/- 2^11 (supposed to be 12 bits)
- if (samp > 2048)
- samp = 2048;
+ // Clip the values to +/- 2^11 (supposed to be 12 bits)
+ if (samp > 2047)
+ samp = 2047;
if (samp < -2048)
samp = -2048;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list