From 82e4318b021d58fec6b5ae2cc7c74d8ad503561d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 12 Feb 2007 12:54:08 +0000 Subject: Fixed a special case (frequency/rate > repeating sample length) svn-id: r25521 --- sound/mods/paula.cpp | 3 +++ 1 file changed, 3 insertions(+) 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++) -- cgit v1.2.3