Fix a regression introduced in r3986 - no decode after "Halt TX".

The new suspend/resume approach to  the received audio stream causes a
reset to the input sample buffer  on resume. This is desired behaviour
except when the stream in not actually suspended. The monitor function
was not checking this when resuming monitoring and this caused decodes
for a period to be abandonded simply  by using the "Halt TX" button to
turn off automatic transmission mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4059 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-04-21 14:39:39 +00:00
parent e58f9d0c73
commit b25019ed0a

View File

@ -655,7 +655,8 @@ void MainWindow::on_monitorButton_clicked (bool checked)
if (!m_transmitting) if (!m_transmitting)
{ {
auto prior = m_monitoring; auto prior = m_monitoring;
m_monitoring = checked; monitor (checked);
if (!prior) if (!prior)
{ {
m_diskData = false; // no longer reading WAV files m_diskData = false; // no longer reading WAV files
@ -673,7 +674,6 @@ void MainWindow::on_monitorButton_clicked (bool checked)
// mode // mode
// checking // checking
monitor (checked);
} }
else else
{ {
@ -684,15 +684,18 @@ void MainWindow::on_monitorButton_clicked (bool checked)
void MainWindow::monitor (bool state) void MainWindow::monitor (bool state)
{ {
ui->monitorButton->setChecked (state); ui->monitorButton->setChecked (state);
m_monitoring = state;
if (state) if (state)
{ {
Q_EMIT resumeAudioInputStream (); if (!m_monitoring)
{
Q_EMIT resumeAudioInputStream ();
}
} }
else else
{ {
Q_EMIT suspendAudioInputStream (); Q_EMIT suspendAudioInputStream ();
} }
m_monitoring = state;
} }
void MainWindow::on_actionAbout_triggered() //Display "About" void MainWindow::on_actionAbout_triggered() //Display "About"