mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-06 16:05:13 -04:00
Tx ph.1: Sample source FIFO read with signal. Use a specific spectrum sink (vis) reference in Device sink engine for main spectrum rendering
This commit is contained in:
@@ -39,7 +39,7 @@ void SampleSourceFifo::init()
|
||||
m_init = true;
|
||||
}
|
||||
|
||||
void SampleSourceFifo::read(SampleVector::iterator& beginRead, unsigned int nbSamples)
|
||||
void SampleSourceFifo::readAndSignal(SampleVector::iterator& beginRead, unsigned int nbSamples)
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
@@ -48,6 +48,8 @@ void SampleSourceFifo::read(SampleVector::iterator& beginRead, unsigned int nbSa
|
||||
beginRead = m_data.begin() + m_size + m_ir;
|
||||
m_ir = (m_ir + nbSamples) % m_size;
|
||||
|
||||
emit dataRead(nbSamples);
|
||||
|
||||
int i_delta = m_iw - m_ir;
|
||||
|
||||
if (m_init)
|
||||
@@ -82,6 +84,11 @@ void SampleSourceFifo::write(const Sample& sample)
|
||||
}
|
||||
}
|
||||
|
||||
void SampleSourceFifo::getReadIterator(SampleVector::iterator& writeUntil)
|
||||
{
|
||||
writeUntil = m_data.begin() + m_size + m_ir;
|
||||
}
|
||||
|
||||
void SampleSourceFifo::getWriteIterator(SampleVector::iterator& writeAt)
|
||||
{
|
||||
writeAt = m_data.begin() + m_iw;
|
||||
|
||||
Reference in New Issue
Block a user