diff options
-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++) |