This commit is contained in:
2025-07-10 20:12:29 +02:00
parent 668dfea9f2
commit a1a55a6d35
+1 -1
View File
@@ -52,7 +52,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) {
if (modulation_power > mpx->target) {
mpx->gain = mpx->attack * mpx->gain + (1.0f - mpx->attack) * target_gain;
} else {
mpx->gain = mpx->release * mpx->gain + (1.0f - mpx->release) * target_gain;
mpx->gain = mpx->release * mpx->gain + (1.0f - mpx->release) * (1.0f/target_gain);
}
mpx->gain = fminf(mpx->max, mpx->gain);