From 1c44fe7afba706400dd8d3c2132f47da4e07ac1e Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 18 Jul 2013 14:40:45 -0500 Subject: ZVISION: Fix the error causing distortions in the sound --- engines/zvision/zork_raw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/zvision/zork_raw.cpp b/engines/zvision/zork_raw.cpp index 2ffe8eb3a6..03a35e09ab 100644 --- a/engines/zvision/zork_raw.cpp +++ b/engines/zvision/zork_raw.cpp @@ -73,7 +73,7 @@ RawZorkStream::RawZorkStream(uint32 rate, bool stereo, DisposeAfterUse::Flag dis } int RawZorkStream::readBuffer(int16 *buffer, const int numSamples) { - uint16 bytesRead = 0; + uint32 bytesRead = 0; // 0: Left, 1: Right byte channel = 0; @@ -114,7 +114,7 @@ int RawZorkStream::readBuffer(int16 *buffer, const int numSamples) { buffer[bytesRead - 1] = (int16)sample; index += _stepAdjustmentTable[(encodedSample >> 4) & 7]; - index = CLIP(index, 0, 88); + index = CLIP(index, 0, 88); _lastSample[channel].sample = sample; _lastSample[channel].index = index; -- cgit v1.2.3