Fix hang when the active demodulator goes out-of-bandwwidth by changing sample rate

This commit is contained in:
vsonnier
2017-08-29 21:59:30 +02:00
parent 3842cf087f
commit 9bbcb582e3
3 changed files with 35 additions and 11 deletions
+5 -3
View File
@@ -257,14 +257,17 @@ bool DemodulatorInstance::isActive() {
}
void DemodulatorInstance::setActive(bool state) {
//always nudge the adio thread
audioThread->setActive(state);
if (active && !state) {
#if ENABLE_DIGITAL_LAB
if (activeOutput) {
activeOutput->Hide();
}
#endif
audioThread->setActive(state);
DemodulatorThread::releaseSquelchLock(this);
} else if (!active && state) {
@@ -273,7 +276,6 @@ void DemodulatorInstance::setActive(bool state) {
activeOutput->Show();
}
#endif
audioThread->setActive(state);
}
if (!state) {
tracking = false;