From 28812be8bef2544bf1d2fdc2155d722461ed34d7 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 16 Jan 2022 19:17:32 +0000 Subject: [PATCH] Buffer for correct latency --- audiohandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audiohandler.cpp b/audiohandler.cpp index cd17ef7..fc3dc94 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -98,7 +98,7 @@ bool audioHandler::init(audioSetup setupIn) ", uLaw" << setup.ulaw; - ringBuf = new wilt::Ring(setupIn.latency / 4 + 1); // Should be customizable. + ringBuf = new wilt::Ring(setupIn.latency / 20 + 1); // Should be customizable. tempBuf.sent = 0; @@ -760,7 +760,7 @@ void audioHandler::changeLatency(const quint16 newSize) setup.latency = newSize; delete ringBuf; audioBuffered = false; - ringBuf = new wilt::Ring(setup.latency / 4 + 1); // Should be customizable. + ringBuf = new wilt::Ring(setup.latency / 20 + 1); // Should be customizable. } int audioHandler::getLatency()