mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
change the bs412 gain reduction logic
This commit is contained in:
@@ -543,7 +543,7 @@ int main(int argc, char **argv) {
|
|||||||
float mpower = measure_mpx(&power, (audio+mpx) * mpx_deviation);
|
float mpower = measure_mpx(&power, (audio+mpx) * mpx_deviation);
|
||||||
if (mpower > mpx_power) {
|
if (mpower > mpx_power) {
|
||||||
float excess_power = 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;
|
output[i] = (audio+mpx)*master_volume;
|
||||||
|
|||||||
Reference in New Issue
Block a user