mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Channel Rx demods: in constructor make sure the thread is launched when all members have been properly initialized (i.e. do it last)
This commit is contained in:
parent
8d69272a76
commit
170c59de43
@ -50,12 +50,12 @@ ChannelAnalyzerNG::ChannelAnalyzerNG(DeviceSourceAPI *deviceAPI) :
|
||||
SSBFilter = new fftfilt(m_config.m_LowCutoff / m_config.m_inputSampleRate, m_config.m_Bandwidth / m_config.m_inputSampleRate, ssbFftLen);
|
||||
DSBFilter = new fftfilt(m_config.m_Bandwidth / m_config.m_inputSampleRate, 2*ssbFftLen);
|
||||
|
||||
apply(true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
apply(true);
|
||||
}
|
||||
|
||||
ChannelAnalyzerNG::~ChannelAnalyzerNG()
|
||||
|
@ -61,13 +61,13 @@ AMDemod::AMDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_audioNetSink = new AudioNetSink(0); // parent thread allocated dynamically
|
||||
m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
AMDemod::~AMDemod()
|
||||
|
@ -85,14 +85,14 @@ ATVDemod::ATVDemod(DeviceSourceAPI *deviceAPI) :
|
||||
|
||||
m_objPhaseDiscri.setFMScaling(1.0f);
|
||||
|
||||
applyStandard();
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
applyStandard();
|
||||
}
|
||||
|
||||
ATVDemod::~ATVDemod()
|
||||
|
@ -89,13 +89,13 @@ BFMDemod::BFMDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
|
||||
m_audioNetSink->setStereo(true);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
BFMDemod::~BFMDemod()
|
||||
|
@ -58,15 +58,15 @@ DATVDemod::DATVDemod(DeviceSourceAPI *deviceAPI) :
|
||||
|
||||
m_objRFFilter = new fftfilt(-256000.0 / 1024000.0, 256000.0 / 1024000.0, rfFilterFftLength);
|
||||
|
||||
//To setup correct Sample Rate
|
||||
channelSampleRateChanged();
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
|
||||
|
||||
//To setup correct Sample Rate
|
||||
channelSampleRateChanged();
|
||||
}
|
||||
|
||||
DATVDemod::~DATVDemod()
|
||||
|
@ -84,13 +84,13 @@ DSDDemod::DSDDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_audioFifo1.setAudioNetSink(m_audioNetSink);
|
||||
m_audioFifo2.setAudioNetSink(m_audioNetSink);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
DSDDemod::~DSDDemod()
|
||||
|
@ -66,6 +66,7 @@ NFMDemod::NFMDemod(DeviceSourceAPI *devieAPI) :
|
||||
m_audioFifo(48000),
|
||||
m_settingsMutex(QMutex::Recursive)
|
||||
{
|
||||
qDebug("NFMDemod::NFMDemod");
|
||||
setObjectName(m_channelId);
|
||||
|
||||
m_audioBuffer.resize(1<<14);
|
||||
@ -80,13 +81,13 @@ NFMDemod::NFMDemod(DeviceSourceAPI *devieAPI) :
|
||||
m_audioNetSink = new AudioNetSink(0); // parent thread allocated dynamically
|
||||
m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
NFMDemod::~NFMDemod()
|
||||
|
@ -89,13 +89,13 @@ SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) :
|
||||
m_audioNetSink = new AudioNetSink(0); // parent thread allocated dynamically
|
||||
m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
SSBDemod::~SSBDemod()
|
||||
|
@ -63,13 +63,13 @@ WFMDemod::WFMDemod(DeviceSourceAPI* deviceAPI) :
|
||||
m_audioNetSink = new AudioNetSink(0); // parent thread allocated dynamically
|
||||
m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
WFMDemod::~WFMDemod()
|
||||
|
@ -100,13 +100,13 @@ UDPSrc::UDPSrc(DeviceSourceAPI *deviceAPI) :
|
||||
|
||||
//DSPEngine::instance()->addAudioSink(&m_audioFifo);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
|
||||
m_channelizer = new DownChannelizer(this);
|
||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||
m_deviceAPI->addThreadedSink(m_threadedChannelizer);
|
||||
m_deviceAPI->addChannelAPI(this);
|
||||
|
||||
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
UDPSrc::~UDPSrc()
|
||||
|
Loading…
Reference in New Issue
Block a user