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 dcaf905f82
commit 63774a983a
1 changed files with 7 additions and 4 deletions

View File

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