mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-13 11:18:48 -04:00
Use a simplified version of sample FIFO (sample vector) in the threaded baseband sample sink
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
ThreadedBasebandSampleSinkFifo::ThreadedBasebandSampleSinkFifo(BasebandSampleSink *sampleSink, std::size_t size) :
|
||||
m_sampleSink(sampleSink)
|
||||
{
|
||||
connect(&m_sampleFifo, SIGNAL(dataReady()), this, SLOT(handleFifoData()));
|
||||
//connect(&m_sampleFifo, SIGNAL(dataReady()), this, SLOT(handleFifoData()));
|
||||
connect(&m_sampleVector, SIGNAL(dataReady()), this, SLOT(handleVectorData()));
|
||||
m_sampleFifo.setSize(size);
|
||||
}
|
||||
|
||||
@@ -19,7 +20,20 @@ ThreadedBasebandSampleSinkFifo::~ThreadedBasebandSampleSinkFifo()
|
||||
|
||||
void ThreadedBasebandSampleSinkFifo::writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end)
|
||||
{
|
||||
m_sampleFifo.write(begin, end);
|
||||
//m_sampleFifo.write(begin, end);
|
||||
m_sampleVector.write(begin, end);
|
||||
}
|
||||
|
||||
void ThreadedBasebandSampleSinkFifo::handleVectorData()
|
||||
{
|
||||
SampleVector::const_iterator vbegin;
|
||||
SampleVector::const_iterator vend;
|
||||
|
||||
if (m_sampleSink)
|
||||
{
|
||||
m_sampleVector.read(vbegin, vend);
|
||||
m_sampleSink->feed(vbegin, vend, false);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadedBasebandSampleSinkFifo::handleFifoData() // FIXME: Fixed? Move it to the new threadable sink class
|
||||
|
||||
Reference in New Issue
Block a user