Hi Jules,
I wonder what is the purpose of this code in MidiMessageCollector:
[code] const int maxBlockLengthToUse = numSamples << 5;
if (numSourceSamples > maxBlockLengthToUse)
{
startSample = numSourceSamples - maxBlockLengthToUse;
numSourceSamples = maxBlockLengthToUse;
iter.setNextSamplePosition (startSample);
}
[/code]
When the audio callback is being called with very irregular timings (pulseaudio here, but I think it also happens sometimes with directsound) , the condition “numSourceSamples > maxBlockLengthToUse” is sometimes true and as a consequence the iter is moved to ‘startSample’ and every midi event before this startSample value is going to be just skipped.
