From 64e3f36e345da1bf3d852ef041f7a00fe27ecfed Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sat, 24 Jan 2026 11:08:29 +0100 Subject: [PATCH] that was 9 db lol --- filter/bs412.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/bs412.c b/filter/bs412.c index 0bdc794..a612772 100644 --- a/filter/bs412.c +++ b/filter/bs412.c @@ -73,7 +73,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) { mpx->gain = mpx->release * mpx->gain + (1.0f - mpx->release) * target_gain; } - mpx->gain = fmaxf(0.0f, fminf(sqrtf(2)*2.0f, mpx->gain)); + mpx->gain = fmaxf(0.0f, fminf(2.0f, mpx->gain)); float output_sample = sample * mpx->gain; if(deviation_to_dbr(avg_deviation * mpx->gain) > mpx->target && deviation_to_dbr(avg_deviation) < mpx->target) { @@ -81,7 +81,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) { float overshoot_dbr = deviation_to_dbr(avg_deviation * mpx->gain) - mpx->target; float reduction_factor = powf(10.0f, -overshoot_dbr / 10.0f); mpx->gain *= reduction_factor; - mpx->gain = fmaxf(0.0f, fminf(sqrtf(2)*2.0f, mpx->gain)); + mpx->gain = fmaxf(0.0f, fminf(2.0f, mpx->gain)); } mpx->sample_counter++;