[Scummvm-cvs-logs] SF.net SVN: scummvm: [30743] scummvm/trunk/sound/adpcm.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Feb 2 19:31:07 CET 2008
Revision: 30743
http://scummvm.svn.sourceforge.net/scummvm/?rev=30743&view=rev
Author: thebluegr
Date: 2008-02-02 10:31:07 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
Corrected an off-by-one error introduced with the latest cleanups
Modified Paths:
--------------
scummvm/trunk/sound/adpcm.cpp
Modified: scummvm/trunk/sound/adpcm.cpp
===================================================================
--- scummvm/trunk/sound/adpcm.cpp 2008-02-02 16:38:51 UTC (rev 30742)
+++ scummvm/trunk/sound/adpcm.cpp 2008-02-02 18:31:07 UTC (rev 30743)
@@ -211,22 +211,22 @@
while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
if (_blockPos == _blockAlign) {
// read block header
- for (i = 0; i <= channels; i++) {
+ for (i = 0; i < channels; i++) {
_status.ch[i].predictor = CLIP(_stream->readByte(), (byte)0, (byte)6);
_status.ch[i].coeff1 = MSADPCMAdaptCoeff1[_status.ch[i].predictor];
_status.ch[i].coeff2 = MSADPCMAdaptCoeff2[_status.ch[i].predictor];
}
- for (i = 0; i <= channels; i++)
+ for (i = 0; i < channels; i++)
_status.ch[i].delta = _stream->readSint16LE();
- for (i = 0; i <= channels; i++)
+ for (i = 0; i < channels; i++)
_status.ch[i].sample1 = _stream->readSint16LE();
- for (i = 0; i <= channels; i++)
+ for (i = 0; i < channels; i++)
buffer[samples++] = _status.ch[i].sample2 = _stream->readSint16LE();
- for (i = 0; i <= channels; i++)
+ for (i = 0; i < channels; i++)
buffer[samples++] = _status.ch[i].sample1;
_blockPos = channels * 7;
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