Do not use TO_LE_16 for the IMA ADPCM decoder as it breaks sound on BE systems.

svn-id: r39465
This commit is contained in:
Matthew Hoops 2009-03-17 02:35:43 +00:00
parent 331399db9b
commit 1817dd9bc5

View File

@ -218,8 +218,8 @@ int ADPCMInputStream::readBufferIMA(int16 *buffer, const int numSamples) {
for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
data = _stream->readByte();
buffer[samples] = TO_LE_16(decodeIMA((data >> 4) & 0x0f));
buffer[samples + 1] = TO_LE_16(decodeIMA(data & 0x0f, _channels == 2 ? 1 : 0));
buffer[samples] = decodeIMA((data >> 4) & 0x0f);
buffer[samples + 1] = decodeIMA(data & 0x0f, _channels == 2 ? 1 : 0);
}
return samples;
}