aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.cpp
diff options
context:
space:
mode:
authorJames Brown2002-05-01 09:56:14 +0000
committerJames Brown2002-05-01 09:56:14 +0000
commitb955d7e5115d7a0eff039cf7d727d1555ea3e1fc (patch)
treef22a2c667fc5d311308d98cabac4c34ec60b532d /sound/mixer.cpp
parent0fb4bcb0ebc06894aad0bb514fc1fa56737a870c (diff)
downloadscummvm-rg350-b955d7e5115d7a0eff039cf7d727d1555ea3e1fc.tar.gz
scummvm-rg350-b955d7e5115d7a0eff039cf7d727d1555ea3e1fc.tar.bz2
scummvm-rg350-b955d7e5115d7a0eff039cf7d727d1555ea3e1fc.zip
Fix sound crash in some games. Thanks Michael Karcher.
svn-id: r4155
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r--sound/mixer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 76394c6fd6..c8502685da 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -153,7 +153,7 @@ SoundMixer::Channel_RAW::Channel_RAW(SoundMixer *mixer, void *sound, uint32 size
/* adjust the magnitute to prevent division error */
while (size & 0xFFFF0000)
- size >>= 1, rate >>= 1;
+ size >>= 1, rate = (rate>>1) + 1;
_size = size * mixer->_output_rate / rate;
}