I’ve updated Bitwig Studio to be able to support dynamic parameter count of a VST3 plug-in while the plugin is running and processing audio. I just want to confirm that I have fully understood the call sequence that would happen in this case.
Here is how I understand it:
Plugin notifies the host that the list of parameters has changed by calling IComponentHandler::restartComponent with the flag kReloadComponent set. this could happen on any thread that the plugin has (it’s main event thread or the audio processing thread etc)
We stop processing audio on the plugin gracefully (we do this with a short audio fade out)
We tell the plugin it is no longer active by calling IComponent::setActive(false)
We tell the plugin it is active again by calling IComponent::setActive(true). This allows the plugin to build the algorithm used for processing audio.
We query the new state of the plugin (what parameters it has etc).
We start processing audio on the plugin again
Note that stopping audio may take a short period of time so the plugin will continue producing sound with the old parameter list until we have called setActive(false).
Is my understanding here correct?