aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2015-08-11 22:54:00 -0400
committerMatthew Hoops2015-08-30 21:01:39 -0400
commit561d1a1d62b8abd3f5ff51d66e0c32ea436e68de (patch)
tree011941f3a2f61272c83aed30cf630e38899109ae /engines
parent72239a25f9608935024560ab07f17a47863de0d7 (diff)
downloadscummvm-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.cpp9
-rw-r--r--engines/zvision/video/zork_avi_decoder.h7
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;
};