aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he
diff options
context:
space:
mode:
authorMax Horn2009-10-14 22:37:05 +0000
committerMax Horn2009-10-14 22:37:05 +0000
commit6a2985ba08fc030d93d625615d7b1b5604fbc98c (patch)
treee25a72cfb73129ded78f0b72269778b7f98fe868 /engines/scumm/he
parenta7e6f50ede79a0f7f1ca89ae6900d838cf4fe334 (diff)
downloadscummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.tar.gz
scummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.tar.bz2
scummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.zip
Patch #2834677: Wave/ADPCM Endianness Fixes
svn-id: r45095
Diffstat (limited to 'engines/scumm/he')
-rw-r--r--engines/scumm/he/sound_he.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 477f3cf0ad..254fecbe0d 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -658,6 +658,13 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
_heChannel[heChannel].timer = size * 1000 / rate;
flags |= Audio::Mixer::FLAG_AUTOFREE;
+
+ // makeADPCMStream returns a stream in native endianness, but LinearInputStream (and playRaw)
+ // is defaulted to Big Endian. If we're on a Little Endian system, set the LE flag.
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
+#endif
+
_mixer->playRaw(type, &_heSoundChannels[heChannel], sound + heOffset, size - heOffset, rate, flags, soundID);
} else {
_mixer->playRaw(type, &_heSoundChannels[heChannel], ptr + stream.pos() + heOffset, size - heOffset, rate, flags, soundID);