aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-12-27 23:12:54 +0100
committerWillem Jan Palenstijn2014-12-27 23:13:08 +0100
commit02eada1d0ddd5f5c179ca39840bb7f73286df6e1 (patch)
tree065fd0f6e91f942ef6aaf422ff06cd9daa1a916d /engines
parent58f328b9af50d66bf8d1be1b19e6059f706ef226 (diff)
downloadscummvm-rg350-02eada1d0ddd5f5c179ca39840bb7f73286df6e1.tar.gz
scummvm-rg350-02eada1d0ddd5f5c179ca39840bb7f73286df6e1.tar.bz2
scummvm-rg350-02eada1d0ddd5f5c179ca39840bb7f73286df6e1.zip
ZVISION: Fix Zork AVI audio on BE systems
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/video/zork_avi_decoder.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp
index 67fab0a114..5618250d79 100644
--- a/engines/zvision/video/zork_avi_decoder.cpp
+++ b/engines/zvision/video/zork_avi_decoder.cpp
@@ -45,8 +45,14 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *s
RawChunkStream::RawChunk chunk = decoder->readNextChunk(stream);
delete stream;
- if (chunk.data)
- _audStream->queueBuffer((byte *)chunk.data, chunk.size, DisposeAfterUse::YES, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO);
+ if (chunk.data) {
+ byte flags = Audio::FLAG_16BITS | Audio::FLAG_STEREO;
+#ifdef SCUMM_LITTLE_ENDIAN
+ // RawChunkStream produces native endianness int16
+ flags |= Audio::FLAG_LITTLE_ENDIAN;
+#endif
+ _audStream->queueBuffer((byte *)chunk.data, chunk.size, DisposeAfterUse::YES, flags);
+ }
} else {
AVIAudioTrack::queueSound(stream);
}