0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00
This commit is contained in:
2025-07-10 20:16:23 +02:00
parent c5b3fde1b9
commit 55d0d72042

View File

@@ -48,7 +48,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) {
mpx->average_counter = 1; 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) { if (modulation_power > mpx->target) {
mpx->gain = mpx->attack * mpx->gain + (1.0f - mpx->attack) * target_gain; mpx->gain = mpx->attack * mpx->gain + (1.0f - mpx->attack) * target_gain;
} else { } else {