mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
MOHAWK: Fix decoding sounds with 16 bit samples
This commit is contained in:
parent
cee4d6b853
commit
8f1d1836f3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user