1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

Channel Tx modulators: 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:
f4exb 2018-03-16 10:26:49 +01:00
parent 170c59de43
commit ea1d007710
6 changed files with 18 additions and 18 deletions

View File

@ -73,13 +73,13 @@ AMMod::AMMod(DeviceSinkAPI *deviceAPI) :
m_cwKeyer.setWPM(13); m_cwKeyer.setWPM(13);
m_cwKeyer.setMode(CWKeyerSettings::CWNone); m_cwKeyer.setMode(CWKeyerSettings::CWNone);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
} }
AMMod::~AMMod() AMMod::~AMMod()

View File

@ -90,13 +90,13 @@ ATVMod::ATVMod(DeviceSinkAPI *deviceAPI) :
m_interpolatorDistanceRemain = 0.0f; m_interpolatorDistanceRemain = 0.0f;
m_interpolatorDistance = 1.0f; m_interpolatorDistance = 1.0f;
applyChannelSettings(m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true); // does applyStandard() too;
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true); // does applyStandard() too;
} }
ATVMod::~ATVMod() ATVMod::~ATVMod()

View File

@ -77,13 +77,13 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) :
m_cwKeyer.setWPM(13); m_cwKeyer.setWPM(13);
m_cwKeyer.setMode(CWKeyerSettings::CWNone); m_cwKeyer.setMode(CWKeyerSettings::CWNone);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
} }
NFMMod::~NFMMod() NFMMod::~NFMMod()

View File

@ -99,13 +99,13 @@ SSBMod::SSBMod(DeviceSinkAPI *deviceAPI) :
m_inAGC.setStepDownDelay(m_settings.m_agcThresholdDelay); m_inAGC.setStepDownDelay(m_settings.m_agcThresholdDelay);
m_inAGC.setClamping(true); m_inAGC.setClamping(true);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
} }
SSBMod::~SSBMod() SSBMod::~SSBMod()

View File

@ -83,13 +83,13 @@ WFMMod::WFMMod(DeviceSinkAPI *deviceAPI) :
m_cwKeyer.setMode(CWKeyerSettings::CWNone); m_cwKeyer.setMode(CWKeyerSettings::CWNone);
m_cwKeyer.reset(); m_cwKeyer.reset();
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
} }
WFMMod::~WFMMod() WFMMod::~WFMMod()

View File

@ -67,13 +67,13 @@ UDPSink::UDPSink(DeviceSinkAPI *deviceAPI) :
m_SSBFilter = new fftfilt(m_settings.m_lowCutoff / m_settings.m_inputSampleRate, m_settings.m_rfBandwidth / m_settings.m_inputSampleRate, m_ssbFftLen); m_SSBFilter = new fftfilt(m_settings.m_lowCutoff / m_settings.m_inputSampleRate, m_settings.m_rfBandwidth / m_settings.m_inputSampleRate, m_ssbFftLen);
m_SSBFilterBuffer = new Complex[m_ssbFftLen>>1]; // filter returns data exactly half of its size m_SSBFilterBuffer = new Complex[m_ssbFftLen>>1]; // filter returns data exactly half of its size
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
m_channelizer = new UpChannelizer(this); m_channelizer = new UpChannelizer(this);
m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);
m_deviceAPI->addThreadedSource(m_threadedChannelizer); m_deviceAPI->addThreadedSource(m_threadedChannelizer);
m_deviceAPI->addChannelAPI(this); m_deviceAPI->addChannelAPI(this);
applyChannelSettings(m_basebandSampleRate, m_outputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
} }
UDPSink::~UDPSink() UDPSink::~UDPSink()