From 9e9ae9521902c65ad563642fc021ecc86ee06212 Mon Sep 17 00:00:00 2001 From: arancormonk <180709949+arancormonk@users.noreply.github.com> Date: Wed, 3 Sep 2025 20:33:04 -0500 Subject: [PATCH] rtl_sdr_fm: use fast atan2 discriminator for analog mode to reduce quantization noise --- src/rtl_sdr_fm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rtl_sdr_fm.cpp b/src/rtl_sdr_fm.cpp index bd245c6..a0c107e 100644 --- a/src/rtl_sdr_fm.cpp +++ b/src/rtl_sdr_fm.cpp @@ -1693,10 +1693,10 @@ void demod_init_analog(struct demod_state *s) s->terminate_on_squelch = 0; s->squelch_hits = 11; s->downsample_passes = 1; // - s->comp_fir_size = 0; + s->comp_fir_size = 9; s->prev_index = 0; s->post_downsample = 1; //1 -- once this works, default = 4 -- doesn't work on the official rtl-sdr source code either - s->custom_atan = 2; + s->custom_atan = 1; s->deemph = 1; // s->rate_out2 = rtl_bandwidth; // -1 flag for disabled -- this enables low_pass_real, seems to work okay s->mode_demod = &fm_demod;