From dc0e9083859c2a718bb2ade6cb6f781636c4dd19 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 11 Aug 2009 19:11:26 +0000 Subject: Fixed an endian bug in the ADPCM decoder (#2211901). svn-id: r43287 --- sound/adpcm.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sound/adpcm.cpp') diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp index 37b14140b7..5cf1171fcb 100644 --- a/sound/adpcm.cpp +++ b/sound/adpcm.cpp @@ -302,11 +302,13 @@ int ADPCMInputStream::readBufferMS(int channels, int16 *buffer, const int numSam for (i = 0; i < channels; i++) _status.ch[i].sample1 = _stream->readSint16LE(); - for (i = 0; i < channels; i++) - buffer[samples++] = _status.ch[i].sample2 = _stream->readSint16LE(); + for (i = 0; i < channels; i++) { + _status.ch[i].sample2 = _stream->readSint16LE(); + buffer[samples++] = TO_LE_16(_status.ch[i].sample2); + } for (i = 0; i < channels; i++) - buffer[samples++] = _status.ch[i].sample1; + buffer[samples++] = TO_LE_16(_status.ch[i].sample1); _blockPos = channels * 7; } -- cgit v1.2.3