1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 18:15:45 -05:00

SDRdaemon plugin: switchable auto skwew rate following

This commit is contained in:
f4exb 2016-03-15 21:22:12 +01:00
parent 026016c0d5
commit 42e139e63e

View File

@ -176,11 +176,18 @@ bool SDRdaemonBuffer::readMeta(char *array, uint32_t length)
}
// auto skew rate compensation
if (m_skewCorrection)
if (m_autoFollowRate)
{
uint64_t newRate = (m_sampleRate * m_writeCount) / (m_readCount * m_iqSampleSize);
m_sampleRate = newRate * m_iqSampleSize; // ensure it is a multiple of the I/Q sample size
resetIndexes();
if (m_skewCorrection)
{
uint64_t newRate = (m_sampleRate * m_writeCount) / (m_readCount * m_iqSampleSize);
m_sampleRate = newRate * m_iqSampleSize; // ensure it is a multiple of the I/Q sample size
resetIndexes();
}
}
else
{
m_sampleRate = sampleRate;
}
if (metaData->m_sampleBytes & 0x10)