aboutsummaryrefslogtreecommitdiff
path: root/sound/adpcm.cpp
diff options
context:
space:
mode:
authorAndre Heider2009-08-11 19:11:26 +0000
committerAndre Heider2009-08-11 19:11:26 +0000
commitdc0e9083859c2a718bb2ade6cb6f781636c4dd19 (patch)
tree01c0bbd1db4783b493fb10611156942937df49ac /sound/adpcm.cpp
parent712522de117ad65774150884e68be03cc3afd572 (diff)
downloadscummvm-rg350-dc0e9083859c2a718bb2ade6cb6f781636c4dd19.tar.gz
scummvm-rg350-dc0e9083859c2a718bb2ade6cb6f781636c4dd19.tar.bz2
scummvm-rg350-dc0e9083859c2a718bb2ade6cb6f781636c4dd19.zip
Fixed an endian bug in the ADPCM decoder (#2211901).
svn-id: r43287
Diffstat (limited to 'sound/adpcm.cpp')
-rw-r--r--sound/adpcm.cpp8
1 files changed, 5 insertions, 3 deletions
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;
}