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

make sure that audio doesn't clip the output, mpx is higher priority

This commit is contained in:
2025-04-19 10:50:04 +02:00
parent 376c2f7ea8
commit 702ee8922b

View File

@@ -549,6 +549,8 @@ int main(int argc, char **argv) {
audio *= (dbr_to_deviation(-excess_power)/mpx_deviation);
}
audio = hard_clip(audio, 1-mpx);
output[i] = (audio+mpx)*master_volume;
if(rds_on || stereo) advance_oscillator(&osc);
}