diff options
author | richiesams | 2013-07-17 17:16:52 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:32:23 -0500 |
commit | 134f8fda173731d744bd814d68850ce14fa4fd94 (patch) | |
tree | ff18267d54a757ffe4e8449bec4ea63404e4d3e7 | |
parent | 03c871ff3025457067bb504af0799c901498253e (diff) | |
download | scummvm-rg350-134f8fda173731d744bd814d68850ce14fa4fd94.tar.gz scummvm-rg350-134f8fda173731d744bd814d68850ce14fa4fd94.tar.bz2 scummvm-rg350-134f8fda173731d744bd814d68850ce14fa4fd94.zip |
ZVISION: Fix incorrect assumptions about a file being stereo
-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); } |