I’ve noticed that the MidiBuffer passed to AudioProcessor::processBlock as argument has pre-allocated memory in some of the plug-in audio formats (VST, AU) but it doesn’t in others (VST3, AAX, AUv3). This is a concern when output midi messages are added to the midi buffer during dsp processing in the audio thread in the latter formats. Would it be possible to add a similar call to MidiBuffer::ensureSize during initialisation in the formats that are currently missing it so that memory allocation is avoided in the audio thread? Or is there a reason why this hasn’t been done in those formats, and if so what’s the best way of avoiding this memory allocation in the audio thread?
I’m using the latest version of JUCE in develop.