From 1fa29a3174ee97c2c798625dcbffeed046d6fcee Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 16 Aug 2017 12:28:48 +0200 Subject: [PATCH] UDPSink buffer: implemented R/W pointer skew auto compensation optimization --- plugins/channeltx/udpsink/udpsinkudphandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/channeltx/udpsink/udpsinkudphandler.cpp b/plugins/channeltx/udpsink/udpsinkudphandler.cpp index a9fe7b795..b47f2076b 100644 --- a/plugins/channeltx/udpsink/udpsinkudphandler.cpp +++ b/plugins/channeltx/udpsink/udpsinkudphandler.cpp @@ -148,7 +148,7 @@ void UDPSinkUDPHandler::advanceReadPointer(int nbBytes) else { float dd = d - m_d; // derivative - float c = (d + dd) / 10.0; // (d / 10.0) + (dd / 10.0); // damping and scaling + float c = (d / 10.0) + (dd / 20.0); // damping and scaling c = c < -0.05 ? -0.05 : c > 0.05 ? 0.05 : c; // limit UDPSinkMessages::MsgSampleRateCorrection *msg = UDPSinkMessages::MsgSampleRateCorrection::create(c);