From f10f67c606605bfe40a1e3e206a397c4feef0e69 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 31 Dec 2025 12:06:48 +0100 Subject: [PATCH] sqrt of 2? --- filter/bs412.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/bs412.c b/filter/bs412.c index f42bb71..eef8952 100644 --- a/filter/bs412.c +++ b/filter/bs412.c @@ -73,7 +73,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) { mpx->gain = fmaxf(0.0f, fminf(mpx->max, mpx->gain)); - float output_sample = sample * mpx->gain; + float output_sample = sample * mpx->gain * sqrtf(2); if(deviation_to_dbr(avg_deviation * mpx->gain) > mpx->target && deviation_to_dbr(avg_deviation) < mpx->target) { // Gain is too much, reduce float overshoot_dbr = deviation_to_dbr(avg_deviation * mpx->gain) - mpx->target;