Browse Source

Fixed automation bug when switching between presets in VST and VST3

tags/2021-05-28
hogliux 9 years ago
parent
commit
c14eb040b9
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      examples/audio plugin demo/Source/PluginProcessor.cpp
  2. +3
    -0
      modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp

+ 1
- 1
examples/audio plugin demo/Source/PluginProcessor.cpp View File

@@ -370,7 +370,7 @@ void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int si
// Now reload our parameters..
for (int i = 0; i < getNumParameters(); ++i)
if (AudioProcessorParameterWithID* p = dynamic_cast<AudioProcessorParameterWithID*> (getParameters().getUnchecked(i)))
p->setValueNotifyingHost ((float) xmlState->getDoubleAttribute (p->paramID, p->getValue()));
p->setValue ((float) xmlState->getDoubleAttribute (p->paramID, p->getValue()));
}
}
}


+ 3
- 0
modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp View File

@@ -444,6 +444,9 @@ public:
setParamNormalized (paramPreset, static_cast<Vst::ParamValue> (pluginInstance->getCurrentProgram()) / static_cast<Vst::ParamValue> (numPrograms - 1));
}
if (Vst::IComponentHandler* handler = getComponentHandler())
handler->restartComponent (Vst::kParamValuesChanged);
return Vst::EditController::setComponentState (stream);
}


Loading…
Cancel
Save