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

limit min of bs412 to 0

This commit is contained in:
2025-07-08 23:20:04 +02:00
parent 779b8d89b0
commit d01b46af5f

View File

@@ -53,6 +53,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) {
else
mpx->gain = mpx->gain * mpx->release + (1.0f - mpx->release) * gain_target;
mpx->gain = fminf(mpx->max, mpx->gain);
mpx->gain = fmaxf(0.0f, mpx->gain);
return fminf(sample*mpx->gain, dbr_to_deviation(mpx->target*1.1f));
}