mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-30 03:38:55 -05:00
SDRDaemonSinkOutput: set initial conditions of sample rate control at start
This commit is contained in:
parent
b2dc7a6cdc
commit
dc51f96b3f
@ -91,6 +91,9 @@ bool SDRdaemonSinkOutput::start()
|
|||||||
m_sdrDaemonSinkThread->connectTimer(m_masterTimer);
|
m_sdrDaemonSinkThread->connectTimer(m_masterTimer);
|
||||||
m_sdrDaemonSinkThread->startWork();
|
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);
|
double delay = ((127*127*m_settings.m_txDelay) / m_settings.m_sampleRate)/(128 + m_settings.m_nbFECBlocks);
|
||||||
m_sdrDaemonSinkThread->setTxDelay((int) (delay*1e6));
|
m_sdrDaemonSinkThread->setTxDelay((int) (delay*1e6));
|
||||||
|
|
||||||
@ -542,6 +545,8 @@ void SDRdaemonSinkOutput::analyzeApiReply(const QJsonObject& jsonObject)
|
|||||||
{
|
{
|
||||||
m_lastRemoteTimestampRateCorrection = remoteTimestampUs;
|
m_lastRemoteTimestampRateCorrection = remoteTimestampUs;
|
||||||
m_lastTimestampRateCorrection = timestampUs;
|
m_lastTimestampRateCorrection = timestampUs;
|
||||||
|
m_nbRemoteSamplesSinceRateCorrection = 0;
|
||||||
|
m_nbSamplesSinceRateCorrection = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user