1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-06 16:05:13 -04:00

SDRdaemonSink: implemented Tx queue stabilization

This commit is contained in:
f4exb
2017-06-05 01:18:35 +02:00
parent 5b48a3f4a9
commit 1642a0d92c
7 changed files with 72 additions and 4 deletions
@@ -29,6 +29,7 @@ SDRdaemonSinkThread::SDRdaemonSinkThread(SampleSourceFifo* sampleFifo, QObject*
m_samplesChunkSize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_chunkCorrection(0),
m_samplerate(0),
m_throttlems(SDRDAEMONSINK_THROTTLE_MS),
m_maxThrottlems(50),
@@ -121,6 +122,7 @@ void SDRdaemonSinkThread::tick()
{
m_throttlems = throttlems;
m_samplesChunkSize = (m_samplerate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000;
m_samplesChunkSize = m_samplesChunkSize + m_chunkCorrection > 0 ? m_samplesChunkSize + m_chunkCorrection : m_samplesChunkSize;
m_throttleToggle = !m_throttleToggle;
}