aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-12-17 11:52:05 +0000
committerTorbjörn Andersson2003-12-17 11:52:05 +0000
commit9a1bbb361bc62ef95f02317f25e7aa3f1d2da723 (patch)
treed90c42bcab04dbfc833ae8511169104bfa8575a5
parent215c8e3fc60b96bc6455c9543004592bc452f43e (diff)
downloadscummvm-rg350-9a1bbb361bc62ef95f02317f25e7aa3f1d2da723.tar.gz
scummvm-rg350-9a1bbb361bc62ef95f02317f25e7aa3f1d2da723.tar.bz2
scummvm-rg350-9a1bbb361bc62ef95f02317f25e7aa3f1d2da723.zip
My last commit didn't work on big-endian. Maybe this one does...
svn-id: r11711
-rw-r--r--sword2/driver/d_draw.cpp8
-rw-r--r--sword2/driver/d_sound.cpp6
2 files changed, 12 insertions, 2 deletions
diff --git a/sword2/driver/d_draw.cpp b/sword2/driver/d_draw.cpp
index 3b0f96ca99..730abd109b 100644
--- a/sword2/driver/d_draw.cpp
+++ b/sword2/driver/d_draw.cpp
@@ -177,6 +177,12 @@ int32 MoviePlayer::play(char *filename, _movieTextObject *text[], uint8 *musicOu
bool skipCutscene = false;
+ uint32 flags = SoundMixer::FLAG_16BITS;
+
+#ifndef SCUMM_BIG_ENDIAN
+ flags |= SoundMixer::FLAG_LITTLE_ENDIAN;
+#endif
+
while (1) {
if (!text[textCounter])
break;
@@ -186,7 +192,7 @@ int32 MoviePlayer::play(char *filename, _movieTextObject *text[], uint8 *musicOu
openTextObject(text[textCounter]);
drawTextObject(text[textCounter]);
if (text[textCounter]->speech) {
- _vm->_mixer->playRaw(&handle, text[textCounter]->speech, text[textCounter]->speechBufferSize, 22050, SoundMixer::FLAG_16BITS | SoundMixer::FLAG_LITTLE_ENDIAN);
+ _vm->_mixer->playRaw(&handle, text[textCounter]->speech, text[textCounter]->speechBufferSize, 22050, flags);
}
}
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 97e5c2b023..3d8011e4a0 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -398,7 +398,11 @@ int32 Sound::playCompSpeech(const char *filename, uint32 speechid, uint8 vol, in
_speechPaused = true;
- uint32 flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_LITTLE_ENDIAN | SoundMixer::FLAG_AUTOFREE;
+ uint32 flags = SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE;
+
+#ifndef SCUMM_BIG_ENDIAN
+ flags |= SoundMixer::FLAG_LITTLE_ENDIAN;
+#endif
_vm->_mixer->playRaw(&_soundHandleSpeech, data16, bufferSize, 22050, flags, -1, volume, p);