1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

SDRDaemonSinkOutput: set initial conditions of sample rate control at start

This commit is contained in:
f4exb 2018-09-04 22:28:10 +02:00
parent b2dc7a6cdc
commit dc51f96b3f

View File

@ -91,6 +91,9 @@ bool SDRdaemonSinkOutput::start()
m_sdrDaemonSinkThread->connectTimer(m_masterTimer);
m_sdrDaemonSinkThread->startWork();
m_lastRemoteTimestampRateCorrection = 0;
m_lastTimestampRateCorrection = 0;
double delay = ((127*127*m_settings.m_txDelay) / m_settings.m_sampleRate)/(128 + m_settings.m_nbFECBlocks);
m_sdrDaemonSinkThread->setTxDelay((int) (delay*1e6));
@ -542,6 +545,8 @@ void SDRdaemonSinkOutput::analyzeApiReply(const QJsonObject& jsonObject)
{
m_lastRemoteTimestampRateCorrection = remoteTimestampUs;
m_lastTimestampRateCorrection = timestampUs;
m_nbRemoteSamplesSinceRateCorrection = 0;
m_nbSamplesSinceRateCorrection = 0;
}
else
{