diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/zork_raw.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/zvision/zork_raw.cpp b/engines/zvision/zork_raw.cpp index 68bb25dd48..cb031d6214 100644 --- a/engines/zvision/zork_raw.cpp +++ b/engines/zvision/zork_raw.cpp @@ -66,7 +66,10 @@ RawZorkStream::RawZorkStream(uint32 rate, bool stereo, DisposeAfterUse::Flag dis _lastSample[1].sample = 0; // Calculate the total playtime of the stream - _playtime = Audio::Timestamp(0, _stream->size() / 2, rate); + if (stereo) + _playtime = Audio::Timestamp(0, _stream->size() / 2, rate); + else + _playtime = Audio::Timestamp(0, _stream->size(), rate); } int RawZorkStream::readBuffer(int16 *buffer, const int numSamples) { @@ -139,7 +142,9 @@ Audio::RewindableAudioStream *makeRawZorkStream(Common::SeekableReadStream *stre int rate, bool stereo, DisposeAfterUse::Flag disposeAfterUse) { - assert(stream->size() % 2 == 0); + if (stereo) + assert(stream->size() % 2 == 0); + return new RawZorkStream(rate, stereo, disposeAfterUse, stream); } |