diff options
author | Marisa-Chan | 2013-10-17 21:03:08 +0000 |
---|---|---|
committer | Marisa-Chan | 2013-10-18 19:48:57 +0000 |
commit | 2050987fa1ecc347bdc707b58d185804a875106d (patch) | |
tree | 4ab35f2ea10589ddf878f6b52d9b6b1e7b4d304e /engines/zvision/zork_avi_decoder.cpp | |
parent | 7a3518d7c3c81b2e34dcbba0682dd8dc6e43b80d (diff) | |
download | scummvm-rg350-2050987fa1ecc347bdc707b58d185804a875106d.tar.gz scummvm-rg350-2050987fa1ecc347bdc707b58d185804a875106d.tar.bz2 scummvm-rg350-2050987fa1ecc347bdc707b58d185804a875106d.zip |
ZVISION: Detach raw stream reader from RawZorkStream for creating correct avi raw reader.
Diffstat (limited to 'engines/zvision/zork_avi_decoder.cpp')
-rw-r--r-- | engines/zvision/zork_avi_decoder.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/zvision/zork_avi_decoder.cpp b/engines/zvision/zork_avi_decoder.cpp index a614f77bb7..0711cdf9d7 100644 --- a/engines/zvision/zork_avi_decoder.cpp +++ b/engines/zvision/zork_avi_decoder.cpp @@ -30,6 +30,7 @@ #include "common/stream.h" #include "audio/audiostream.h" +#include "audio/decoders/raw.h" namespace ZVision { @@ -43,9 +44,14 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *s if (_audStream) { if (_wvInfo.tag == kWaveFormatZorkPCM) { assert(_wvInfo.size == 8); - _audStream->queueAudioStream(makeRawZorkStream(stream, _wvInfo.samplesPerSec, _audStream->isStereo(), DisposeAfterUse::YES), DisposeAfterUse::YES); + RawChunkStream::RawChunk chunk = decoder->readNextChunk(stream); + delete stream; + + if (chunk.data) + _audStream->queueBuffer((byte *)chunk.data, chunk.size, DisposeAfterUse::YES, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO); } } else { + warning("Got %d wave format in AVI\n", _wvInfo.tag); delete stream; } } |