mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 00:18:37 -05:00
DSP device source/sink engines: reworked add source sequence of actions
This commit is contained in:
parent
80d243811f
commit
36b3137a48
@ -479,12 +479,12 @@ void DSPDeviceSinkEngine::handleSynchronousMessages()
|
|||||||
{
|
{
|
||||||
BasebandSampleSource* source = ((DSPAddBasebandSampleSource*) message)->getSampleSource();
|
BasebandSampleSource* source = ((DSPAddBasebandSampleSource*) message)->getSampleSource();
|
||||||
m_basebandSampleSources.push_back(source);
|
m_basebandSampleSources.push_back(source);
|
||||||
|
DSPSignalNotification notif(m_sampleRate, m_centerFrequency);
|
||||||
|
source->handleMessage(notif);
|
||||||
checkNumberOfBasebandSources();
|
checkNumberOfBasebandSources();
|
||||||
|
|
||||||
if (m_state == StRunning)
|
if (m_state == StRunning)
|
||||||
{
|
{
|
||||||
DSPSignalNotification notif(m_sampleRate, m_centerFrequency);
|
|
||||||
source->handleMessage(notif);
|
|
||||||
source->start();
|
source->start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -503,12 +503,12 @@ void DSPDeviceSinkEngine::handleSynchronousMessages()
|
|||||||
{
|
{
|
||||||
ThreadedBasebandSampleSource *threadedSource = ((DSPAddThreadedBasebandSampleSource*) message)->getThreadedSampleSource();
|
ThreadedBasebandSampleSource *threadedSource = ((DSPAddThreadedBasebandSampleSource*) message)->getThreadedSampleSource();
|
||||||
m_threadedBasebandSampleSources.push_back(threadedSource);
|
m_threadedBasebandSampleSources.push_back(threadedSource);
|
||||||
|
DSPSignalNotification notif(m_sampleRate, m_centerFrequency);
|
||||||
|
threadedSource->handleSourceMessage(notif);
|
||||||
checkNumberOfBasebandSources();
|
checkNumberOfBasebandSources();
|
||||||
|
|
||||||
if (m_state == StRunning)
|
if (m_state == StRunning)
|
||||||
{
|
{
|
||||||
DSPSignalNotification notif(m_sampleRate, m_centerFrequency);
|
|
||||||
threadedSource->handleSourceMessage(notif);
|
|
||||||
threadedSource->start();
|
threadedSource->start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -559,6 +559,13 @@ void DSPDeviceSourceEngine::handleSynchronousMessages()
|
|||||||
{
|
{
|
||||||
BasebandSampleSink* sink = ((DSPAddBasebandSampleSink*) message)->getSampleSink();
|
BasebandSampleSink* sink = ((DSPAddBasebandSampleSink*) message)->getSampleSink();
|
||||||
m_basebandSampleSinks.push_back(sink);
|
m_basebandSampleSinks.push_back(sink);
|
||||||
|
// initialize sample rate and center frequency in the sink:
|
||||||
|
DSPSignalNotification msg(m_sampleRate, m_centerFrequency);
|
||||||
|
sink->handleMessage(msg);
|
||||||
|
// start the sink:
|
||||||
|
if(m_state == StRunning) {
|
||||||
|
sink->start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (DSPRemoveBasebandSampleSink::match(*message))
|
else if (DSPRemoveBasebandSampleSink::match(*message))
|
||||||
{
|
{
|
||||||
@ -578,8 +585,10 @@ void DSPDeviceSourceEngine::handleSynchronousMessages()
|
|||||||
DSPSignalNotification msg(m_sampleRate, m_centerFrequency);
|
DSPSignalNotification msg(m_sampleRate, m_centerFrequency);
|
||||||
threadedSink->handleSinkMessage(msg);
|
threadedSink->handleSinkMessage(msg);
|
||||||
// start the sink:
|
// start the sink:
|
||||||
|
if(m_state == StRunning) {
|
||||||
threadedSink->start();
|
threadedSink->start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (DSPRemoveThreadedBasebandSampleSink::match(*message))
|
else if (DSPRemoveThreadedBasebandSampleSink::match(*message))
|
||||||
{
|
{
|
||||||
ThreadedBasebandSampleSink* threadedSink = ((DSPRemoveThreadedBasebandSampleSink*) message)->getThreadedSampleSink();
|
ThreadedBasebandSampleSink* threadedSink = ((DSPRemoveThreadedBasebandSampleSink*) message)->getThreadedSampleSink();
|
||||||
|
Loading…
Reference in New Issue
Block a user