1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed missing position update in MemoryAudioSource

This commit is contained in:
hogliux 2018-05-29 10:49:56 +01:00
parent 1d4555fd58
commit b632360518

View file

@ -49,7 +49,8 @@ void MemoryAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& bufferT
auto max = 0, pos = 0;
auto n = buffer.getNumSamples(), m = bufferToFill.numSamples;
for (auto i = position; (i < n || isLooping) && (pos < m); i += max)
int i;
for (i = position; (i < n || isLooping) && (pos < m); i += max)
{
max = jmin (m - pos, n - (i % n));
@ -65,6 +66,8 @@ void MemoryAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& bufferT
if (pos < m)
dst.clear (bufferToFill.startSample + pos, m - pos);
position = (i % n);
}
} // namespace juce