mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 19:23:51 +01:00
change filter order (used to be preemp -> lpf -> agc, now is lpf -> agc -> preemp)
This commit is contained in:
@@ -214,8 +214,7 @@ 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;
|
||||
if(config.preemphasis != 0) l = apply_preemphasis(&preemp_l, l);
|
||||
if(config.preemphasis != 0) r = apply_preemphasis(&preemp_r, r);
|
||||
|
||||
if(config.lpf_cutoff != 0) iirfilt_rrrf_execute(lpf_l, l, &l);
|
||||
if(config.lpf_cutoff != 0) iirfilt_rrrf_execute(lpf_r, r, &r);
|
||||
|
||||
@@ -223,6 +222,9 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) {
|
||||
l *= agc_gain;
|
||||
r *= agc_gain;
|
||||
|
||||
if(config.preemphasis != 0) l = apply_preemphasis(&preemp_l, l);
|
||||
if(config.preemphasis != 0) r = apply_preemphasis(&preemp_r, r);
|
||||
|
||||
l = hard_clip(l*config.audio_volume, config.clipper_threshold);
|
||||
r = hard_clip(r*config.audio_volume, config.clipper_threshold);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user