diff mbox series

[FFmpeg-devel,5/6] avradio/sdrdemux: When searching for stations move in smaller steps

Message ID 20230704222302.1129450-5-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/6] avradio/sdrdemux: end on EOF dont wraparound | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Michael Niedermayer July 4, 2023, 10:23 p.m. UTC
Moving too quick can lead to missed stations
---
 libavradio/sdrdemux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index 92b1e2b170..598dab8f18 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1216,7 +1216,7 @@  static void *soapy_needs_bigger_buffers_worker(SDRContext *sdr)
         // 2 blocks are needed with windowing to get a clean FFT output
         // Thus > 3 is the minimum for the next frequency update if we want to do something reliable with the data
         if (sdr->seek_direction && block_counter > 5) {
-            sdr->wanted_freq = snap2band(sdr, sdr->wanted_freq, sdr->seek_direction*sdr->bandwidth);
+            sdr->wanted_freq = snap2band(sdr, sdr->wanted_freq, sdr->seek_direction*sdr->bandwidth*0.5);
         }
         if (sdr->wanted_freq != sdr->freq) {
             //We could use a seperate MUTEX for the FIFO and for soapy