diff options
author | Matthew Hoops | 2015-08-11 22:54:00 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-08-30 21:01:39 -0400 |
commit | 561d1a1d62b8abd3f5ff51d66e0c32ea436e68de (patch) | |
tree | 011941f3a2f61272c83aed30cf630e38899109ae /engines | |
parent | 72239a25f9608935024560ab07f17a47863de0d7 (diff) | |
download | scummvm-rg350-561d1a1d62b8abd3f5ff51d66e0c32ea436e68de.tar.gz scummvm-rg350-561d1a1d62b8abd3f5ff51d66e0c32ea436e68de.tar.bz2 scummvm-rg350-561d1a1d62b8abd3f5ff51d66e0c32ea436e68de.zip |
VIDEO: Switch to all packetized streams for AVI
ZVision does not currently, but that's OK
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/video/zork_avi_decoder.cpp | 9 | ||||
-rw-r--r-- | engines/zvision/video/zork_avi_decoder.h | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp index 53b0a9a0c5..fb6bdbab91 100644 --- a/engines/zvision/video/zork_avi_decoder.cpp +++ b/engines/zvision/video/zork_avi_decoder.cpp @@ -41,6 +41,15 @@ Video::AVIDecoder::AVIAudioTrack *ZorkAVIDecoder::createAudioTrack(Video::AVIDec return new ZorkAVIAudioTrack(sHeader, wvInfo, _soundType); } +ZorkAVIDecoder::ZorkAVIAudioTrack::ZorkAVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType) : + Video::AVIDecoder::AVIAudioTrack(streamHeader, waveFormat, soundType), _queueStream(0), _decoder(waveFormat.channels == 2) { +} + +void ZorkAVIDecoder::ZorkAVIAudioTrack::createAudioStream() { + _queueStream = Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2); + _audioStream = _queueStream; +} + void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { RawChunkStream::RawChunk chunk = _decoder.readNextChunk(stream); delete stream; diff --git a/engines/zvision/video/zork_avi_decoder.h b/engines/zvision/video/zork_avi_decoder.h index 8e7be710ee..afcdb05676 100644 --- a/engines/zvision/video/zork_avi_decoder.h +++ b/engines/zvision/video/zork_avi_decoder.h @@ -39,15 +39,14 @@ public: private: class ZorkAVIAudioTrack : public Video::AVIDecoder::AVIAudioTrack { public: - ZorkAVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType) : - Video::AVIDecoder::AVIAudioTrack(streamHeader, waveFormat, soundType), - _decoder(waveFormat.channels == 2) { - } + ZorkAVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType); + void createAudioStream(); void queueSound(Common::SeekableReadStream *stream); void resetStream(); private: + Audio::QueuingAudioStream *_queueStream; RawChunkStream _decoder; }; |