juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.5k stars 1.72k forks source link

VST3PluginInstance::reset() should not call setActive() #448

Open sgretscher opened 5 years ago

sgretscher commented 5 years ago

According to the VST3 docs, setProcessing() should be fully sufficient to reset. In some plug-ins (Melodyne being one example), setActive() triggers massive memory allocations, which heavily impacts performance when starting playback when using a lot of instances of such plug-ins (as is the case for example when using ARA). This issue is even noted in comments in prepareToPlay(), which has extra code to avoid unnecessary calls to setActive(). setActive() should be removed from reset().

sgretscher commented 5 years ago

see discussion here: https://forum.juce.com/t/vst3-hosting-calling-setactive-in-reset-should-not-be-necessary-kills-performance/30723