From: drowe67 Date: Mon, 15 Oct 2012 21:19:49 +0000 (+0000) Subject: main demod processing loop runs without crashing X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=3e61afe93fa30c4c53275639aa024fddca5af48b;p=freetel-svn-tracking.git main demod processing loop runs without crashing git-svn-id: https://svn.code.sf.net/p/freetel/code@757 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 88a31c60..0db8ab68 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -1160,17 +1160,18 @@ int MainFrame::rxCallback( { in48k[i] = in48k[i + N48]; } -#ifdef RX_CB + + assert((g_nInputBuf + N8) <= 2 * FDMDV_NOM_SAMPLES_PER_FRAME); // run demod, decoder and update GUI info for(i = 0; i < N8; i++) { g_RxInBuf[g_nInputBuf + i] = (short)out8k[i]; } g_nInputBuf += FDMDV_NOM_SAMPLES_PER_FRAME; - per_frame_rx_processing(g_pRxOutBuf, &g_nInputBuf, g_CodecBits, g_RxInBuf, &g_nOutputBuf, &g_nRxIn, &g_State, g_pCodec2); + per_frame_rx_processing(g_pRxOutBuf, &g_nOutputBuf, g_CodecBits, g_RxInBuf, &g_nInputBuf, &g_nRxIn, &g_State, g_pCodec2); - cbData->pWFPanel->m_newdata = true; - cbData->pSPPanel->m_newdata = true; + //cbData->pWFPanel->m_newdata = true; + //cbData->pSPPanel->m_newdata = true; // if demod out of sync copy input audio from A/D to aid in tuning if (g_nOutputBuf >= N8) @@ -1197,9 +1198,8 @@ int MainFrame::rxCallback( { g_pRxOutBuf[i] = g_pRxOutBuf[i + N8]; } - #endif - - /* test: echo input to output */ + + /* test: echo input to output, make this loopback option */ for(i=0; ioutfifo, out48k_short, N48); } - /* OK now set up output samples */ + /* OK now set up output samples */ if (fifo_read(cbData->outfifo, outdata, framesPerBuffer) == 0) {