aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorSven Hesse2009-12-06 04:38:20 +0000
committerSven Hesse2009-12-06 04:38:20 +0000
commit4a189842bbfa54e76ee155633b752013becd5141 (patch)
tree21ed232e67dfafc825808ad1743d9560459f0a3e /graphics/video
parent3b7082c32b20eb33f8c9e6bbaf7ab4a79c3e7fa0 (diff)
downloadscummvm-rg350-4a189842bbfa54e76ee155633b752013becd5141.tar.gz
scummvm-rg350-4a189842bbfa54e76ee155633b752013becd5141.tar.bz2
scummvm-rg350-4a189842bbfa54e76ee155633b752013becd5141.zip
Adding support for mono signed 16bit little-endian uncompressed PCM audio (thank you, clone :))
svn-id: r46270
Diffstat (limited to 'graphics/video')
-rw-r--r--graphics/video/avi_decoder.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/graphics/video/avi_decoder.cpp b/graphics/video/avi_decoder.cpp
index bb80cdd253..795c0f34d8 100644
--- a/graphics/video/avi_decoder.cpp
+++ b/graphics/video/avi_decoder.cpp
@@ -425,8 +425,16 @@ Codec *AviDecoder::createCodec() {
}
Audio::AppendableAudioStream *AviDecoder::createAudioStream() {
- if (_wvInfo.tag == AVI_WAVE_FORMAT_PCM)
- return Audio::makeAppendableAudioStream(AUDIO_RATE, Audio::Mixer::FLAG_UNSIGNED|Audio::Mixer::FLAG_AUTOFREE);
+ byte flags = Audio::Mixer::FLAG_AUTOFREE;
+
+ if (_wvInfo.tag == AVI_WAVE_FORMAT_PCM) {
+ if (_audsHeader.sampleSize == 2)
+ flags |= Audio::Mixer::FLAG_16BITS|Audio::Mixer::FLAG_LITTLE_ENDIAN;
+ else
+ flags |= Audio::Mixer::FLAG_UNSIGNED;
+
+ return Audio::makeAppendableAudioStream(AUDIO_RATE, flags);
+ }
if (_wvInfo.tag != 0) // No sound
warning ("Unsupported AVI audio format %d", _wvInfo.tag);