Wrong buffer length in LV2 plugin processBlock


Unless I’m missing something, the void run (uint32_t numSteps) of juce::LV2PluginInstance is not making any attempt at ensuring that audio.getNumSamples() == numSteps .

On a host such as qtractor, the plugin instance is created with a maxBlockSize that is 4x larger than the numSteps value I’m getting in run() .

So I suggest adding :
audio.setSize(audio.getNumChannels(), numSteps, false, false, true);
at the beginning of the run(int) method.