another attempt at a fix

pull/801/head
AlexandreRouma 2022-06-22 05:20:40 +02:00
rodzic f2b8418a25
commit 218fd6ccf4
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -318,13 +318,12 @@ private:
void selectDemod(demod::Demodulator* demod) { void selectDemod(demod::Demodulator* demod) {
// Stopcurrently selected demodulator and select new // Stopcurrently selected demodulator and select new
afChain.stop(); afChain.setInput(&dummyAudioStream, [=](dsp::stream<dsp::stereo_t>* out){ stream.setInput(out); });
if (selectedDemod) { if (selectedDemod) {
selectedDemod->stop(); selectedDemod->stop();
delete selectedDemod; delete selectedDemod;
} }
selectedDemod = demod; selectedDemod = demod;
afChain.start();
// Give the demodulator the most recent audio SR // Give the demodulator the most recent audio SR
selectedDemod->AFSampRateChanged(audioSampleRate); selectedDemod->AFSampRateChanged(audioSampleRate);