From 9fca75e1190eac984062ce610c76326556be52d2 Mon Sep 17 00:00:00 2001 From: yamadapc Date: Fri, 8 Sep 2023 16:51:05 +1000 Subject: [PATCH] Fix presets being set and state restore I'm not sure if preset handling will be totally correct since the parameters would not be notifying the hosts depending on how they are called. `RNBO::JuceAudioProcessor::setCurrentProgram` does not set `_isSettingPresetAsync` as far as I can tell. This fixes the test suite referenced in #2. Closes #2. - https://github.com/Cycling74/rnbo.adapter.juce/blob/dd233609adc495828fa9efcf756ab2a155a3bd1d/RNBO_JuceAudioProcessor.cpp#L412-L421 --- RNBO_JuceAudioProcessor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RNBO_JuceAudioProcessor.cpp b/RNBO_JuceAudioProcessor.cpp index 0357fc4..779deb5 100644 --- a/RNBO_JuceAudioProcessor.cpp +++ b/RNBO_JuceAudioProcessor.cpp @@ -243,6 +243,9 @@ void JuceAudioProcessor::handleParameterEvent(const ParameterEvent& event) param->setValueNotifyingHost((float)normalizedValue); param->endChangeGesture(); } + else { + param->setValue((float)normalizedValue); + } } }