hopefully a fix for the linux crash

This commit is contained in:
AlexandreRouma
2022-06-22 04:58:03 +02:00
parent b943e6e869
commit f2b8418a25
4 changed files with 14 additions and 7 deletions

View File

@ -318,11 +318,13 @@ private:
void selectDemod(demod::Demodulator* demod) {
// Stopcurrently selected demodulator and select new
afChain.stop();
if (selectedDemod) {
selectedDemod->stop();
delete selectedDemod;
}
selectedDemod = demod;
afChain.start();
// Give the demodulator the most recent audio SR
selectedDemod->AFSampRateChanged(audioSampleRate);