From 55d0d720423e422fb3158cb1de94c3003f58dc4b Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Thu, 10 Jul 2025 20:16:23 +0200 Subject: [PATCH] now --- filter/bs412.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/bs412.c b/filter/bs412.c index 6a699a8..b702af0 100644 --- a/filter/bs412.c +++ b/filter/bs412.c @@ -48,7 +48,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) { mpx->average_counter = 1; } - float target_gain = mpx->target / (modulation_power + 1e-9f); + float target_gain = powf(10.0f, mpx->target - modulation_power / 20.0f); if (modulation_power > mpx->target) { mpx->gain = mpx->attack * mpx->gain + (1.0f - mpx->attack) * target_gain; } else {