0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 11:22:00 +01:00
This commit is contained in:
2026-02-15 18:28:07 +01:00
parent 12f6887bc2
commit 3cb55d3cac

View File

@@ -82,7 +82,7 @@ float bs412_compress(BS412Compressor* comp, float audio, float sample_mpx) {
float overshoot_dbr = deviation_to_dbr(avg_deviation * comp->gain) - comp->target;
float reduction_factor = powf(10.0f, -overshoot_dbr / 10.0f);
comp->gain *= reduction_factor;
comp->gain = fmaxf(0.0f, fminf(2.0f, comp->gain));
comp->gain = fmaxf(0.01f, fminf(2.82f, comp->gain));
}
comp->sample_counter++;