mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-13 06:48:39 -04:00
Basic saving of .wav files for FT4.
This commit is contained in:
parent
d5203e2da9
commit
7a9240c9ef
@ -8625,7 +8625,8 @@ void MainWindow::ft4Data(int k)
|
||||
}
|
||||
|
||||
if(k>=NRING) {
|
||||
//Wrap the ring buffer pointer
|
||||
if(m_saveAll) save_FT4();
|
||||
//Wrap the ring buffer pointer
|
||||
k=k-NRING;
|
||||
dec_data.params.kin=k;
|
||||
}
|
||||
@ -8740,9 +8741,24 @@ void MainWindow::ft4_tx(int ntx)
|
||||
}
|
||||
m_dateTimeQSOOn=QDateTime::currentDateTimeUtc();
|
||||
if(!m_btxok && m_btxok0 && g_iptt==1) stopTx();
|
||||
if(m_saveAll) save_FT4();
|
||||
}
|
||||
|
||||
void MainWindow::FT4_writeTx()
|
||||
{
|
||||
write_all("Tx",m_currentMessage);
|
||||
}
|
||||
|
||||
void MainWindow::save_FT4()
|
||||
{
|
||||
auto time = QDateTime::currentDateTimeUtc ();
|
||||
QString t=time.toString("yyMMdd_hhmmss");
|
||||
m_fnameWE=m_config.save_directory().absoluteFilePath(t);
|
||||
int nsec=(dec_data.params.kin + 3456)/12000;
|
||||
// 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], nsec, m_config.my_callsign(),
|
||||
m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid)));
|
||||
// qDebug() << "aa" << m_fnameWE << nsec;
|
||||
}
|
||||
|
@ -751,6 +751,7 @@ private:
|
||||
void foxGenWaveform(int i,QString fm);
|
||||
void writeFoxQSO (QString const& msg);
|
||||
void FT4_writeTx();
|
||||
void save_FT4();
|
||||
};
|
||||
|
||||
extern int killbyname(const char* progName);
|
||||
|
Loading…
Reference in New Issue
Block a user