mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-17 05:02:26 -04:00
Tx ph.1: Connect sample source FIFO read signal with forwarding samples to spectrum sink
This commit is contained in:
parent
289c1a203f
commit
5021d15162
@ -218,10 +218,10 @@ void DSPDeviceSinkEngine::work()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// feed the mix to the main spectrum sink
|
// feed the mix to the main spectrum sink
|
||||||
if (m_spectrumSink)
|
// if (m_spectrumSink)
|
||||||
{
|
// {
|
||||||
m_spectrumSink->feed(writeBegin, writeBegin + nbWriteSamples, false);
|
// m_spectrumSink->feed(writeBegin, writeBegin + nbWriteSamples, false);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,6 +263,8 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoIdle()
|
|||||||
(*it)->stop();
|
(*it)->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnect(m_deviceSampleSink->getSampleFifo(), SIGNAL(dataRead(int)), this, SLOT(handleForwardToSpectrumSink(int)));
|
||||||
|
|
||||||
m_spectrumSink->stop();
|
m_spectrumSink->stop();
|
||||||
m_deviceSampleSink->stop();
|
m_deviceSampleSink->stop();
|
||||||
m_deviceDescription.clear();
|
m_deviceDescription.clear();
|
||||||
@ -374,6 +376,7 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoRunning()
|
|||||||
(*it)->start();
|
(*it)->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connect(m_deviceSampleSink->getSampleFifo(), SIGNAL(dataRead(int)), this, SLOT(handleForwardToSpectrumSink(int)));
|
||||||
m_spectrumSink->start();
|
m_spectrumSink->start();
|
||||||
|
|
||||||
qDebug() << "DSPDeviceSinkEngine::gotoRunning: input message queue pending: " << m_inputMessageQueue.size();
|
qDebug() << "DSPDeviceSinkEngine::gotoRunning: input message queue pending: " << m_inputMessageQueue.size();
|
||||||
@ -551,3 +554,13 @@ void DSPDeviceSinkEngine::handleInputMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSPDeviceSinkEngine::handleForwardToSpectrumSink(int nbSamples)
|
||||||
|
{
|
||||||
|
if (m_spectrumSink)
|
||||||
|
{
|
||||||
|
SampleSourceFifo* sampleFifo = m_deviceSampleSink->getSampleFifo();
|
||||||
|
SampleVector::iterator readUntil;
|
||||||
|
sampleFifo->getReadIterator(readUntil);
|
||||||
|
m_spectrumSink->feed(readUntil - nbSamples, readUntil, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -118,6 +118,7 @@ private slots:
|
|||||||
void handleData(); //!< Handle data when samples from source FIFO are ready to be processed
|
void handleData(); //!< Handle data when samples from source FIFO are ready to be processed
|
||||||
void handleInputMessages(); //!< Handle input message queue
|
void handleInputMessages(); //!< Handle input message queue
|
||||||
void handleSynchronousMessages(); //!< Handle synchronous messages with the thread
|
void handleSynchronousMessages(); //!< Handle synchronous messages with the thread
|
||||||
|
void handleForwardToSpectrumSink(int nbSamples);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user