diff options
author | Filippos Karapetis | 2013-01-26 03:42:29 +0200 |
---|---|---|
committer | Filippos Karapetis | 2013-01-26 03:43:15 +0200 |
commit | 866961bde9302d20f4ce6aabfead01dd8111d526 (patch) | |
tree | a4beefbbfae74851321f6b4236804831238cabfd /video | |
parent | fefa3bdd3f4dce5b1d65fb73a59d5713efd52fd6 (diff) | |
download | scummvm-rg350-866961bde9302d20f4ce6aabfead01dd8111d526.tar.gz scummvm-rg350-866961bde9302d20f4ce6aabfead01dd8111d526.tar.bz2 scummvm-rg350-866961bde9302d20f4ce6aabfead01dd8111d526.zip |
VIDEO: Hook some more of our ADPCM decoder variants to our AVI video decoder
Information for the AVI audio track format IDs has been taken from libav.
Thanks to clone2727 for his great help on this.
Diffstat (limited to 'video')
-rw-r--r-- | video/avi_decoder.cpp | 6 | ||||
-rw-r--r-- | video/avi_decoder.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 6062049b72..6fe9c773b8 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -457,6 +457,10 @@ void AVIDecoder::AVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { flags |= Audio::FLAG_STEREO; _audStream->queueAudioStream(Audio::makeRawStream(stream, _wvInfo.samplesPerSec, flags, DisposeAfterUse::YES), DisposeAfterUse::YES); + } else if (_wvInfo.tag == kWaveFormatMSADPCM) { + _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMS, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES); + } else if (_wvInfo.tag == kWaveFormatMSIMAADPCM) { + _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMSIma, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES); } else if (_wvInfo.tag == kWaveFormatDK3) { _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMDK3, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES); } @@ -470,7 +474,7 @@ Audio::AudioStream *AVIDecoder::AVIAudioTrack::getAudioStream() const { } Audio::QueuingAudioStream *AVIDecoder::AVIAudioTrack::createAudioStream() { - if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatDK3) + if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatMSADPCM || _wvInfo.tag == kWaveFormatMSIMAADPCM || _wvInfo.tag == kWaveFormatDK3) return Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2); else if (_wvInfo.tag != kWaveFormatNone) // No sound warning("Unsupported AVI audio format %d", _wvInfo.tag); diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 3bdc0561d1..34a67f4c28 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -203,7 +203,9 @@ private: enum { kWaveFormatNone = 0, kWaveFormatPCM = 1, - kWaveFormatDK3 = 98 + kWaveFormatMSADPCM = 2, + kWaveFormatMSIMAADPCM = 17, + kWaveFormatDK3 = 98 // rogue format number }; AVIStreamHeader _audsHeader; |