aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-08-07 23:54:59 +0000
committerMax Horn2003-08-07 23:54:59 +0000
commit9d56a50678ef9b514219990d833b07dc150ceae5 (patch)
treed6abdee7794e359f96788b4554037f16e77c2ec1
parentac6bd10c59d08a906438978af47e538bb28cb20f (diff)
downloadscummvm-rg350-9d56a50678ef9b514219990d833b07dc150ceae5.tar.gz
scummvm-rg350-9d56a50678ef9b514219990d833b07dc150ceae5.tar.bz2
scummvm-rg350-9d56a50678ef9b514219990d833b07dc150ceae5.zip
work around odd cases with odd lens for 16 bit audio data
svn-id: r9591
-rw-r--r--scumm/sound.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 9a7f3e4b49..3ea0aea0be 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1415,6 +1415,9 @@ void Sound::playBundleSound(char *sound, PlayingSoundHandle *handle) {
if (bits == 8) {
_scumm->_mixer->playRaw(handle, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
} else if (bits == 16) {
+ // FIXME: For some weird reasons, sometimes we get an odd size, even though
+ // the data is supposed to be in 16 bit format... that makes no sense...
+ size &= ~1;
_scumm->_mixer->playRaw(handle, final, size, rate, SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE);
} else {
warning("Sound::playBundleSound() to do more options to playRaw...");