We noticed that while debugging a VST3 extension in Studio One. Studio One calls setComponentHandler
after connect
, which leads to VST3ClientExtensions::setIComponentHandler
being called with a null componentHandler
. There is no update to the extension implementation if the actual component handler is set after that.
Overriding it in JuceVST3EditController
fixes that and the extension successfully works in Studio One as well:
tresult setComponentHandler (Vst::IComponentHandler* handler) override
{
auto result = Vst::EditController::setComponentHandler (handler);
if (! audioProcessor)
return result;
if (auto* extensions = audioProcessor->get()->getVST3ClientExtensions())
extensions->setIComponentHandler (componentHandler);
return result;
}
I don’t know if Studio One is actually misbehaving here and calling VST3 functions in an invalid order, but to me this seems like a sensible fix which probably shouldn’t cause any harm.