another attempt at a fix

This commit is contained in:
AlexandreRouma 2022-06-22 05:20:40 +02:00
parent f2b8418a25
commit 218fd6ccf4

View File

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