aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2018-05-28 10:44:21 +0200
committerGitHub2018-05-28 10:44:21 +0200
commit35f4983ca122750fd4e3b5e2857b9d17dd73f932 (patch)
treebdd8fb015426be2f14fcaa1bfd4fa985d722b957 /engines
parent69ebe3747ab62e28d152767627bee97d675dca54 (diff)
parent8f1d1836f3f8330b9aa26dcc14d87a3bde36b2d9 (diff)
downloadscummvm-rg350-35f4983ca122750fd4e3b5e2857b9d17dd73f932.tar.gz
scummvm-rg350-35f4983ca122750fd4e3b5e2857b9d17dd73f932.tar.bz2
scummvm-rg350-35f4983ca122750fd4e3b5e2857b9d17dd73f932.zip
Merge pull request #1201 from ccawley2011/mohawk-sound
MOHAWK: Fix decoding sounds with 16 bit samples
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/sound.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index c46594000d..7bd6c63539 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -158,11 +158,16 @@ Audio::RewindableAudioStream *makeMohawkWaveStream(Common::SeekableReadStream *s
// The sound in the CD version of Riven is encoded in Intel DVI ADPCM
// The sound in the DVD version of Riven is encoded in MPEG-2 Layer II or Intel DVI ADPCM
if (dataChunk.encoding == kCodecRaw) {
- byte flags = Audio::FLAG_UNSIGNED;
+ byte flags = 0;
if (dataChunk.channels == 2)
flags |= Audio::FLAG_STEREO;
+ if (dataChunk.bitsPerSample == 16)
+ flags |= Audio::FLAG_16BITS;
+ else
+ flags |= Audio::FLAG_UNSIGNED;
+
return Audio::makeRawStream(dataChunk.audioData, dataChunk.sampleRate, flags);
} else if (dataChunk.encoding == kCodecADPCM) {
uint32 blockAlign = dataChunk.channels * dataChunk.bitsPerSample / 8;