diff options
author | richiesams | 2013-07-18 14:40:45 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:32:26 -0500 |
commit | 1c44fe7afba706400dd8d3c2132f47da4e07ac1e (patch) | |
tree | febad76cb1ee0d51ac7ea80958f8fc16d1dc09ba /engines | |
parent | 8f32592ab9556c57d459be116863d3bb7ac88c72 (diff) | |
download | scummvm-rg350-1c44fe7afba706400dd8d3c2132f47da4e07ac1e.tar.gz scummvm-rg350-1c44fe7afba706400dd8d3c2132f47da4e07ac1e.tar.bz2 scummvm-rg350-1c44fe7afba706400dd8d3c2132f47da4e07ac1e.zip |
ZVISION: Fix the error causing distortions in the sound
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/zork_raw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<uint16>(index, 0, 88); + index = CLIP<int16>(index, 0, 88); _lastSample[channel].sample = sample; _lastSample[channel].index = index; |