0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00

sqrt of 2?

This commit is contained in:
2025-12-31 12:06:48 +01:00
parent 3def94aeda
commit f10f67c606

View File

@@ -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;