Browse Source

VST3: Fixed a hosting issue retrieving the parameters of plug-ins that need their IO configured first

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
64c898d027
1 changed files with 16 additions and 5 deletions
  1. +16
    -5
      modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp

+ 16
- 5
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp View File

@@ -1774,11 +1774,22 @@ public:
editController->setComponentHandler (holder->host);
grabInformationObjects();
interconnectComponentAndController();
addParameters();
synchroniseStates();
syncProgramNames();
auto configureParameters = [this]
{
addParameters();
synchroniseStates();
syncProgramNames();
};
configureParameters();
setupIO();
// Some plug-ins don't present their parameters until after the IO has been
// configured, so we need to jump though all these hoops again
if (getParameters().isEmpty() && editController->getParameterCount() > 0)
configureParameters();
return true;
}
@@ -2799,6 +2810,7 @@ private:
{
int idx, num = editController->getParameterCount();
for (idx = 0; idx < num; ++idx)
if (editController->getParameterInfo (idx, paramInfo) == kResultOk
&& (paramInfo.flags & Steinberg::Vst::ParameterInfo::kIsProgramChange) != 0)
@@ -2845,8 +2857,7 @@ private:
}
}
if (editController != nullptr
&& paramInfo.stepCount > 0)
if (editController != nullptr && paramInfo.stepCount > 0)
{
auto numPrograms = paramInfo.stepCount + 1;


Loading…
Cancel
Save