From a21e4652cbbd5f37105943e8ea17d50c9eb29e9f Mon Sep 17 00:00:00 2001 From: drowe67 Date: Sat, 14 Jan 2017 05:33:15 +0000 Subject: [PATCH] 800XA decoding OK git-svn-id: https://svn.code.sf.net/p/freetel/code@2972 01035d8c-6547-0410-b346-abe4f91aad63 --- freedv-dev/src/fdmdv2_main.cpp | 37 +++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/freedv-dev/src/fdmdv2_main.cpp b/freedv-dev/src/fdmdv2_main.cpp index cc489cc6..134502e0 100644 --- a/freedv-dev/src/fdmdv2_main.cpp +++ b/freedv-dev/src/fdmdv2_main.cpp @@ -130,7 +130,7 @@ SpeexPreprocessState *g_speex_st; // WxWidgets - initialize the application IMPLEMENT_APP(MainApp); -//FILE *ft; +FILE *ftest; FILE *g_logfile; //------------------------------------------------------------------------- @@ -274,6 +274,7 @@ MainFrame::MainFrame(wxString plugInName, wxWindow *parent) : TopFrame(plugInNam g_logfile = stderr; #endif + SetMinSize(wxSize(400,400)); // Init Hamlib library, but we dont start talking to any rigs yet @@ -600,7 +601,9 @@ MainFrame::MainFrame(wxString plugInName, wxWindow *parent) : TopFrame(plugInNam m_schedule_restore = false; vk_state = VK_IDLE; - + + ftest = fopen("ftest.raw", "wb"); + assert(ftest != NULL); } //------------------------------------------------------------------------- @@ -613,7 +616,7 @@ MainFrame::~MainFrame() int w; int h; - //fclose(ft); + fclose(ftest); #ifdef __WXMSW__ fclose(g_logfile); #endif @@ -3336,7 +3339,7 @@ void txRxProcessing() short insf_short[nsf]; unsigned int n = sf_read_short(g_sfPlayFileFromRadio, insf_short, nsf); n8k = resample(cbData->insrcsf, in8k_short, insf_short, samplerate, g_sfFs, N8, nsf); - //fprintf(g_logfile, "n: %d nsnf: %d n8k: %d\n", n, nsf, n8k); + //fprintf(g_logfile, "n: %d nsf: %d n8k: %d samplerate: %d\n", n, nsf, n8k, samplerate); assert(n8k <= N8); if (n == 0) { @@ -3514,11 +3517,17 @@ void txRxProcessing() COMP tx_fdm_offset[freedv_get_n_nom_modem_samples(g_pfreedv)]; int i; - freedv_comptx(g_pfreedv, tx_fdm, in8k_short); + if (g_mode == FREEDV_MODE_800XA) { + /* 800XA doesn't support complex output just yet */ + freedv_tx(g_pfreedv, out8k_short, in8k_short); + } + else { + freedv_comptx(g_pfreedv, tx_fdm, in8k_short); - freq_shift_coh(tx_fdm_offset, tx_fdm, g_TxFreqOffsetHz, freedv_get_modem_sample_rate(g_pfreedv), &g_TxFreqOffsetPhaseRect, freedv_get_n_nom_modem_samples(g_pfreedv)); - for(i=0; ireal /= mag; -- 2.25.1