From d579e5973e7d5060846cf76f71873db71565f160 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 2 Apr 2019 13:04:40 -0400 Subject: [PATCH] Correct the size of saved FT4 .wav files. --- widgets/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 9d0585ebd..82b2f908c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1471,11 +1471,13 @@ void MainWindow::dataSink(qint64 frames) m_fnameWE=m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmm")); } m_fileToSave.clear (); + int samples=m_TRperiod*12000; + if(m_mode=="FT4") samples=18*3456; // the following is potential a threading hazard - not a good // idea to pass pointer to be processed in another thread m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file, - this, m_fnameWE, &dec_data.d2[0], m_TRperiod*12000, m_config.my_callsign(), + this, m_fnameWE, &dec_data.d2[0], samples, m_config.my_callsign(), m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid))); if (m_mode=="WSPR") { QString c2name_string {m_fnameWE + ".c2"};