diff options
author | Max Horn | 2009-10-14 22:37:05 +0000 |
---|---|---|
committer | Max Horn | 2009-10-14 22:37:05 +0000 |
commit | 6a2985ba08fc030d93d625615d7b1b5604fbc98c (patch) | |
tree | e25a72cfb73129ded78f0b72269778b7f98fe868 /engines/scumm/he | |
parent | a7e6f50ede79a0f7f1ca89ae6900d838cf4fe334 (diff) | |
download | scummvm-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.cpp | 7 |
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); |