From b2f8a68df1de05c78f22c6f00f30703dd6d996bb Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 7 Feb 2017 05:51:54 +0000 Subject: [PATCH] make update rate of spectrum and waterfall indep of mode, thanks Tony for help in discovering this one git-svn-id: https://svn.code.sf.net/p/freetel/code@3026 01035d8c-6547-0410-b346-abe4f91aad63 --- freedv-dev/src/fdmdv2_main.cpp | 42 +++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/freedv-dev/src/fdmdv2_main.cpp b/freedv-dev/src/fdmdv2_main.cpp index c012128d..12be3b8b 100644 --- a/freedv-dev/src/fdmdv2_main.cpp +++ b/freedv-dev/src/fdmdv2_main.cpp @@ -3393,6 +3393,24 @@ void txRxProcessing() //fprintf(g_logfile, "snr_squelch_thresh: %f\n", g_pfreedv->snr_squelch_thresh); + // compute rx spectrum - do here so update rate in constant + + COMP rx_fdm[n8k]; + float rx_spec[MODEM_STATS_NSPEC]; + unsigned int i; + + for(i=0; irxinfifo, in8k_short, n8k); @@ -3581,7 +3601,9 @@ void per_frame_rx_processing( FIFO *input_fifo ) { + #ifdef OLDSPEC float rx_spec[MODEM_STATS_NSPEC]; + #endif int i; if (g_mode == -1) { @@ -3589,6 +3611,12 @@ void per_frame_rx_processing( int nin = 160; // TODO: hard code for now - some sort of plugin supplied param in future short input_buf[nin]; + + while (fifo_read(input_fifo, input_buf, nin) == 0) { + (wxGetApp().m_plugin_rx_samplesfp)(wxGetApp().m_plugInStates, input_buf, nin); + } + + #ifdef OLD_SPEC COMP rx_fdm[nin]; for(i=0; i