mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-28 22:23:43 +00:00
Corrected an off-by-one error introduced with the latest cleanups
svn-id: r30743
This commit is contained in:
parent
97ef53a652
commit
97eb13c22f
@ -211,22 +211,22 @@ int ADPCMInputStream::readBufferMS(int channels, int16 *buffer, const int numSam
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user