aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-18 19:32:44 +0000
committerFilippos Karapetis2008-12-18 19:32:44 +0000
commit8b6237756b9d80d5fd679eafea922bf96a5b4f6a (patch)
tree82e92cff2631b784a028b58625799fadfaf1927c /graphics
parentd314ee2447955d9e2d062e35cee1882f82f37735 (diff)
downloadscummvm-rg350-8b6237756b9d80d5fd679eafea922bf96a5b4f6a.tar.gz
scummvm-rg350-8b6237756b9d80d5fd679eafea922bf96a5b4f6a.tar.bz2
scummvm-rg350-8b6237756b9d80d5fd679eafea922bf96a5b4f6a.zip
Oops, base values are read in the correct order now
svn-id: r35426
Diffstat (limited to 'graphics')
-rw-r--r--graphics/smk_player.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/graphics/smk_player.cpp b/graphics/smk_player.cpp
index 8ca39be106..18323e1bbc 100644
--- a/graphics/smk_player.cpp
+++ b/graphics/smk_player.cpp
@@ -744,18 +744,17 @@ void SMKPlayer::queueCompressedBuffer(byte *buffer, int bufferSize, int unpacked
// Base values, stored as big endian
- // Right channel
- bases[0] = (!is16Bits) ? audioBS.getBits8() : (audioBS.getBits8() << 8) || audioBS.getBits8();
-
- // Left channel, if the sample is stereo
if (isStereo)
- bases[1] = (!is16Bits) ? audioBS.getBits8() : (audioBS.getBits8() << 8) || audioBS.getBits8();
-
+ bases[1] = (!is16Bits) ? audioBS.getBits8() : (audioBS.getBits8() << 8) || audioBS.getBits8(); // Right channel
+
+ bases[0] = (!is16Bits) ? audioBS.getBits8() : (audioBS.getBits8() << 8) || audioBS.getBits8(); // Left channel
+
// Next follow the deltas, which are added to the corresponding base values and are stored as little endian
// We store the unpacked bytes in big endian format
while (curPos < unpackedSize) {
- // If the sample is stereo, we get first the data for the left and then for the right channel
+ // If the sample is stereo, the data is stored for the left and right channel, respectively
+ // (the exact opposite to the base values)
if (!is16Bits) {
for (k = 0; k < (isStereo ? 2 : 1); k++) {
*curPointer++ = (byte)(bases[k] + audioTrees[k]->getCode(audioBS));