From 87e447ab256067791533eeb76aaaf2549dd12ba4 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 11 Mar 2022 14:33:43 +0100 Subject: [PATCH] Mention potential race condition in CLAP events --- src/wrapper/clap/context.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wrapper/clap/context.rs b/src/wrapper/clap/context.rs index df85747d..194ea9c5 100644 --- a/src/wrapper/clap/context.rs +++ b/src/wrapper/clap/context.rs @@ -74,6 +74,10 @@ impl GuiContext for WrapperGuiContext

{ Some(hash) => { // Apparently you're supposed to resend old values for the automation begin and end // gestures + // FIXME: This will result in a race condition if the parameter is modified in the + // same cycle! (same for the gesture begin, but it's less likely to cause + // problems there) This will be fixed in a next version of CLAP by splitting + // the gestures up into their own events so it's not a huge deal right now. let clap_plain_value = param.normalized_value() as f64 * param.step_count().unwrap_or(1) as f64; let success = self.wrapper.queue_parameter_change(OutputParamChange {