mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Fix missing VST3ClientExtensions.setComponentHandler call in Studio One
This commit is contained in:
parent
86b17ef4fb
commit
ee1228ea54
1 changed files with 22 additions and 1 deletions
|
|
@ -1240,6 +1240,24 @@ public:
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
tresult PLUGIN_API setComponentHandler (Steinberg::Vst::IComponentHandler* newHandler) override
|
||||||
|
{
|
||||||
|
auto result = Vst::EditController::setComponentHandler (newHandler);
|
||||||
|
// The following is needed because Studio One calls this method after our installAudioProcessor method,
|
||||||
|
// so installAudioProcessor is not able to set a non-null IComponentHandler on VST3ClientExtensions.
|
||||||
|
// Other DAWs call this method before our installAudioProcessor (when audioProcessor is still nullptr).
|
||||||
|
if(audioProcessor != nullptr)
|
||||||
|
{
|
||||||
|
if (auto* extensions = audioProcessor->get()->getVST3ClientExtensions())
|
||||||
|
{
|
||||||
|
extensions->setIComponentHandler (componentHandler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
void setAudioProcessor (JuceAudioProcessor* audioProc)
|
void setAudioProcessor (JuceAudioProcessor* audioProc)
|
||||||
{
|
{
|
||||||
if (audioProcessor.get() != audioProc)
|
if (audioProcessor.get() != audioProc)
|
||||||
|
|
@ -1706,7 +1724,10 @@ private:
|
||||||
|
|
||||||
if (auto* extensions = audioProcessor->get()->getVST3ClientExtensions())
|
if (auto* extensions = audioProcessor->get()->getVST3ClientExtensions())
|
||||||
{
|
{
|
||||||
extensions->setIComponentHandler (componentHandler);
|
if (componentHandler != nullptr)
|
||||||
|
{
|
||||||
|
extensions->setIComponentHandler (componentHandler);
|
||||||
|
}
|
||||||
extensions->setIHostApplication (hostContext.get());
|
extensions->setIHostApplication (hostContext.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue