1
0
Fork 0
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:
hogliux 2016-09-20 14:57:38 +01:00
parent 5a365ed535
commit c14eb040b9
2 changed files with 4 additions and 1 deletions

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()));
}
}
}

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);
}