mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed automation bug when switching between presets in VST and VST3
This commit is contained in:
parent
5a365ed535
commit
c14eb040b9
2 changed files with 4 additions and 1 deletions
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue