1
0
Fork 0

Fix CLAP step count handling

This commit is contained in:
Robbert van der Helm 2022-03-02 00:04:33 +01:00
parent 37e88d063f
commit 0d359c344a

View file

@ -703,7 +703,7 @@ impl<P: ClapPlugin> Wrapper<P> {
dest,
// CLAP does not have a separate unit, so we'll include the unit here
&param_ptr.normalized_value_to_string(
value as f32 * param_ptr.step_count().unwrap_or(1) as f32,
value as f32 / param_ptr.step_count().unwrap_or(1) as f32,
true,
),
);
@ -745,7 +745,7 @@ impl<P: ClapPlugin> Wrapper<P> {
Some(v) => v as f64,
None => return false,
};
*value = normalized_value;
*value = normalized_value * param_ptr.step_count().unwrap_or(1) as f64;
true
} else {