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

move lpf after agc

This commit is contained in:
2025-07-12 13:50:33 +02:00
parent e0847d3a57
commit 229ceff6d2

View File

@@ -213,16 +213,16 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) {
float l = audio_stereo_input[2*i+0]*config.audio_preamp;
float r = audio_stereo_input[2*i+1]*config.audio_preamp;
float agc_gain = process_agc(&agc, 0.5f * (fabsf(l) + fabsf(r)));
l *= agc_gain;
r *= agc_gain;
if(config.lpf_cutoff != 0) {
iirfilt_rrrf_execute(lpf_l, l, &l);
iirfilt_rrrf_execute(lpf_r, r, &r);
}
float agc_gain = process_agc(&agc, 0.5f * (fabsf(l) + fabsf(r)));
l *= agc_gain;
r *= agc_gain;
if(config.preemphasis != 0) {
l = apply_preemphasis(&preemp_l, l);
r = apply_preemphasis(&preemp_r, r);