My plugin calls the following when changing a value:
Which then eventually comes around to parameterValueChanged via the following stack:
PrimerAudioProcessor::parameterValueChanged(int, float) AudioProcessorParameter::sendValueChangedMessageToListeners(float) AudioProcessorParameter::setValueNotifyingHost(float) AudioProcessor::setParameterNotifyingHost(int, float)
In parameterValueChanged I add the change to an array, and check this array in processBlock, at which point the changes are implemented. This works fine in VST (and AU). However, in VST3, in Cubase, on Mac, while that entire chain does happen, parameterValueChanged gets called again via the following:
PrimerAudioProcessor::parameterValueChanged(int, float) juce::AudioProcessorParameter::sendValueChangedMessageToListeners(float) juce::JuceVST3Component::processParameterChanges(Steinberg::Vst::IParameterChanges&) juce::JuceVST3Component::process(Steinberg::Vst::ProcessData&)
This results in several extra calls for every parameter. Which I could live with, except when it comes to comboboxes, the second call sends in the old value. So whenever a change is made via combobox it immediately gets set back to the previous value (Buttons and rotaries send in the new value).
I’m trying to weed out why this second call is happening in VST3 only. Can anyones shed some light on the subject?