aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoost Peters2009-02-04 16:40:44 +0000
committerJoost Peters2009-02-04 16:40:44 +0000
commite8e3397a3c3a266d9c4b8adb82a9562851b292a2 (patch)
treed885a950394751874ca9144f26d2b61a5bde2fca
parent8be011c77035e966b5b28cec33a7e5c8a591ba84 (diff)
downloadscummvm-rg350-e8e3397a3c3a266d9c4b8adb82a9562851b292a2.tar.gz
scummvm-rg350-e8e3397a3c3a266d9c4b8adb82a9562851b292a2.tar.bz2
scummvm-rg350-e8e3397a3c3a266d9c4b8adb82a9562851b292a2.zip
make readBufferTinsel*() output in native endianness, rather than little endian.
svn-id: r36215
-rw-r--r--sound/adpcm.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp
index 6bb2c8c0e4..4890c0ab94 100644
--- a/sound/adpcm.cpp
+++ b/sound/adpcm.cpp
@@ -371,8 +371,8 @@ int ADPCMInputStream::readBufferTinsel4(int channels, int16 *buffer, const int n
for (; samples < numSamples && _blockPos < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2, _blockPos++) {
// Read 1 byte = 8 bits = two 4 bit blocks
data = _stream->readByte();
- buffer[samples] = TO_LE_16(decodeTinsel((data << 8) & 0xF000, eVal));
- buffer[samples+1] = TO_LE_16(decodeTinsel((data << 12) & 0xF000, eVal));
+ buffer[samples] = decodeTinsel((data << 8) & 0xF000, eVal);
+ buffer[samples+1] = decodeTinsel((data << 12) & 0xF000, eVal);
}
}
@@ -397,21 +397,21 @@ int ADPCMInputStream::readBufferTinsel6(int channels, int16 *buffer, const int n
switch (_chunkPos) {
case 0:
_chunkData = _stream->readByte();
- buffer[samples] = TO_LE_16(decodeTinsel((_chunkData << 8) & 0xFC00, eVal));
+ buffer[samples] = decodeTinsel((_chunkData << 8) & 0xFC00, eVal);
break;
case 1:
_chunkData = (_chunkData << 8) | (_stream->readByte());
- buffer[samples] = TO_LE_16(decodeTinsel((_chunkData << 6) & 0xFC00, eVal));
+ buffer[samples] = decodeTinsel((_chunkData << 6) & 0xFC00, eVal);
_blockPos++;
break;
case 2:
_chunkData = (_chunkData << 8) | (_stream->readByte());
- buffer[samples] = TO_LE_16(decodeTinsel((_chunkData << 4) & 0xFC00, eVal));
+ buffer[samples] = decodeTinsel((_chunkData << 4) & 0xFC00, eVal);
_blockPos++;
break;
case 3:
_chunkData = (_chunkData << 8);
- buffer[samples] = TO_LE_16(decodeTinsel((_chunkData << 2) & 0xFC00, eVal));
+ buffer[samples] = decodeTinsel((_chunkData << 2) & 0xFC00, eVal);
_blockPos++;
break;
}
@@ -439,7 +439,7 @@ int ADPCMInputStream::readBufferTinsel8(int channels, int16 *buffer, const int n
for (; samples < numSamples && _blockPos < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples++, _blockPos++) {
// Read 1 byte = 8 bits = one 8 bit block
data = _stream->readByte();
- buffer[samples] = TO_LE_16(decodeTinsel(data << 8, eVal));
+ buffer[samples] = decodeTinsel(data << 8, eVal);
}
}