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

Michael Niedermayer michael at niedermayer.cc
Wed Jul 5 01:23:01 EEST 2023


Moving too quick can lead to missed stations
---
 libavradio/sdrdemux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.31.1



More information about the ffmpeg-devel mailing list