From 6e89d3737ba4ecf266330bec9af3866c9cb16c97 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 22 Jul 2022 22:49:59 +0200 Subject: [PATCH] Change the scaling on Safety Limiter's threshold With the addition of negative values the linear scale doesn't work anymore. --- plugins/safety_limiter/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/safety_limiter/src/lib.rs b/plugins/safety_limiter/src/lib.rs index 6e8fc20c..b1b4027d 100644 --- a/plugins/safety_limiter/src/lib.rs +++ b/plugins/safety_limiter/src/lib.rs @@ -107,9 +107,10 @@ impl Default for SafetyLimiterParams { threshold_gain: FloatParam::new( "Threshold", util::db_to_gain(0.00), - FloatRange::Linear { + FloatRange::Skewed { min: util::db_to_gain(-24.0), max: util::db_to_gain(12.0), + factor: FloatRange::skew_factor(-1.0), }, ) .with_unit(" dB")