I tried this with the 4OSC synth and with VST plugins.
If you disable a synth plugin while playing a note, you hear the note release when enabling again. The plugin doesn’t seem to know there was a break in audio rendering. How can a tracktion::engine::Plugin detect that?
Hmm, I’m trying to think about the best way to handle this.
Perhaps by adding a virtual function to Plugin like this:
/** Return true here to make your plugin subclass always be processed, even when disabled.
If you return true here, you must check the isEnabled() state to determine if the audio should be as normal or if you should do some special disabling.
*/
virtual bool shouldProcessWhenDisabled() { return false };