Well, it still causes the audio to pause when the ioChange() is performed, but at least some nasty crashes and behaviours are fixed now.
One, in particular, was quite annoying: when loading a session in Cubase where the plug-in state implied a latency different from the one of the plug-in in its “just inserted” state, the whole session didn’t output any sound when played even if the meters in the GUI moved as if playing was actually happening.
This problem has been solved using the deferred call to ioChanged() with the AsyncUpdater: it was caused by multiple ioChanges() being called due to repeated latency changes during the instantiation process. By using the AsyncUpdater, all these latency changes get “squashed” into a single ioChanges() at the end of the instantiation, so this is how I do it now.
void audioProcessorChanged (AudioProcessor* processor)
setInitialDelay (processor->getLatencySamples ());
void handleAsyncUpdate ()
Jules, what do you think about it? (obviously, the main VST wrapper class has become an AsyncUpdater, like this:
class JuceVSTWrapper : public AudioEffectX,