1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

SDRdaemon plugin: apply buffer r/w correction at all ticks. Updated readme with warnings for Windows

This commit is contained in:
f4exb
2016-03-19 06:14:06 +01:00
parent 0ba624dc37
commit 7077f6a780
3 changed files with 14 additions and 6 deletions
@@ -44,7 +44,8 @@ SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleFifo *sampleFifo, MessageQueue *o
m_readLengthSamples(0),
m_readLength(0),
m_throttleToggle(false),
m_rateDivider(1000/SDRDAEMON_THROTTLE_MS)
m_rateDivider(1000/SDRDAEMON_THROTTLE_MS),
m_autoCorrBuffer(false)
{
m_udpBuf = new char[SDRdaemonBuffer::m_udpPayloadSize];
}
@@ -223,6 +224,10 @@ void SDRdaemonUDPHandler::tick()
m_throttleToggle = !m_throttleToggle;
}
if (m_autoCorrBuffer) {
m_readLengthSamples += m_sdrDaemonBuffer.getRWBalanceCorrection();
}
// read samples directly feeding the SampleFifo (no callback)
m_sampleFifo->write(reinterpret_cast<quint8*>(m_sdrDaemonBuffer.readData(m_readLength)), m_readLength);
m_samplesCount += m_readLengthSamples;