diff options
author | Sven Hesse | 2007-02-12 12:54:08 +0000 |
---|---|---|
committer | Sven Hesse | 2007-02-12 12:54:08 +0000 |
commit | 82e4318b021d58fec6b5ae2cc7c74d8ad503561d (patch) | |
tree | 096612d648cc51d79e61575b789ca27ad357ecbe /sound/mods/paula.cpp | |
parent | 6b2d8436806a2e017ac3b4b99e954f434248121f (diff) | |
download | scummvm-rg350-82e4318b021d58fec6b5ae2cc7c74d8ad503561d.tar.gz scummvm-rg350-82e4318b021d58fec6b5ae2cc7c74d8ad503561d.tar.bz2 scummvm-rg350-82e4318b021d58fec6b5ae2cc7c74d8ad503561d.zip |
Fixed a special case (frequency/rate > repeating sample length)
svn-id: r25521
Diffstat (limited to 'sound/mods/paula.cpp')
-rw-r--r-- | sound/mods/paula.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/mods/paula.cpp b/sound/mods/paula.cpp index c71d6642a3..7b9357fc93 100644 --- a/sound/mods/paula.cpp +++ b/sound/mods/paula.cpp @@ -109,6 +109,9 @@ int Paula::readBuffer(int16 *buffer, const int numSamples) { while (neededSamples > 0) { if (neededSamples >= (int) ((sLen - offset) / rate)) { + while (rate > (sLen - offset)) + rate -= (sLen - offset); + end = (int)((sLen - offset) / rate); for (int i = 0; i < end; i++) |