1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-08-31 12:17:51 -04:00

Sample source FIFO: moved emit data write at top of method so that samples can be written with no delay

This commit is contained in:
f4exb 2018-01-02 01:04:04 +01:00
parent 7c679d10a8
commit 9a2ae892ed

View File

@ -50,11 +50,11 @@ void SampleSourceFifo::readAdvance(SampleVector::iterator& readUntil, unsigned i
{ {
// QMutexLocker mutexLocker(&m_mutex); // QMutexLocker mutexLocker(&m_mutex);
assert(nbSamples <= m_size/2); assert(nbSamples <= m_size/2);
emit dataWrite(nbSamples);
m_ir = (m_ir + nbSamples) % m_size; m_ir = (m_ir + nbSamples) % m_size;
readUntil = m_data.begin() + m_size + m_ir; readUntil = m_data.begin() + m_size + m_ir;
emit dataRead(nbSamples); emit dataRead(nbSamples);
emit dataWrite(nbSamples);
} }
void SampleSourceFifo::write(const Sample& sample) void SampleSourceFifo::write(const Sample& sample)