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

change the bs412 gain reduction logic

This commit is contained in:
2025-04-13 09:51:29 +02:00
parent 30f21291e3
commit de3763dc83

View File

@@ -543,7 +543,7 @@ int main(int argc, char **argv) {
float mpower = measure_mpx(&power, (audio+mpx) * mpx_deviation);
if (mpower > mpx_power) {
float excess_power = mpower - mpx_power;
audio *= powf(10.0f, -excess_power / 20.0f);
audio *= (dbr_to_deviation(-excess_power)/mpx_deviation);
}
output[i] = (audio+mpx)*master_volume;