I’m just reporting someone else’s fix, so I can’t get into details,
but it looks like the function doesn’t handle the case where the buffer passed to getNextAudioBlock() is mono and the reader is stereo :
in juce_AudioSampleBuffer.cpp, line 483 :
if (useLeftChan == useRightChan)
{
chans[0] = (int*) getSampleData (0, startSample);
chans[1] = (reader->numChannels > 1) ? (int*)getSampleData (1, startSample) : 0;
}
should be
if (useLeftChan == useRightChan)
{
chans[0] = (int*) getSampleData (0, startSample);
chans[1] = (reader->numChannels > 1 && getNumChannels() > 1) ? (int*)getSampleData (1, startSample) : 0;
}