From 78be244dc624cf2b2d291f7d2980ebb7903c0668 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 18 Dec 2021 06:24:47 +0100 Subject: [PATCH] Remote source/input: increase minimum UDP buffer size based on 96 kS/s --- plugins/channeltx/remotesource/remotesourcesource.cpp | 2 +- plugins/channeltx/remotesource/remotesourceworker.cpp | 4 ++-- plugins/samplesource/remoteinput/remoteinputudphandler.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/channeltx/remotesource/remotesourcesource.cpp b/plugins/channeltx/remotesource/remotesourcesource.cpp index a25172de2..2bd610d07 100644 --- a/plugins/channeltx/remotesource/remotesourcesource.cpp +++ b/plugins/channeltx/remotesource/remotesourcesource.cpp @@ -111,7 +111,7 @@ void RemoteSourceSource::handleDataFrame(RemoteDataFrame* dataFrame) { if (dataFrame->m_rxControlBlock.m_blockCount < RemoteNbOrginalBlocks) { - qWarning("RemoteSourceSource::handleDataFrame: incomplete data frame: not processing"); + qWarning("RemoteSourceSource::handleDataFrame: incomplete data frame (%d): not processing", dataFrame->m_rxControlBlock.m_blockCount); } else { diff --git a/plugins/channeltx/remotesource/remotesourceworker.cpp b/plugins/channeltx/remotesource/remotesourceworker.cpp index 7926af78a..258d4fc6b 100644 --- a/plugins/channeltx/remotesource/remotesourceworker.cpp +++ b/plugins/channeltx/remotesource/remotesourceworker.cpp @@ -194,8 +194,8 @@ void RemoteSourceWorker::processData() int RemoteSourceWorker::getDataSocketBufferSize(uint32_t inSampleRate) { - // set a floor value at 24 kS/s - uint32_t samplerate = inSampleRate < 24000 ? 24000 : inSampleRate; + // set a floor value at 96 kS/s + uint32_t samplerate = inSampleRate < 96000 ? 96000 : inSampleRate; // 250 ms (1/4s) at current sample rate int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4; qDebug("RemoteSourceWorker::getDataSocketBufferSize: %d bytes", bufferSize); diff --git a/plugins/samplesource/remoteinput/remoteinputudphandler.cpp b/plugins/samplesource/remoteinput/remoteinputudphandler.cpp index 44907546e..1ee4f3295 100644 --- a/plugins/samplesource/remoteinput/remoteinputudphandler.cpp +++ b/plugins/samplesource/remoteinput/remoteinputudphandler.cpp @@ -453,8 +453,8 @@ bool RemoteInputUDPHandler::handleMessage(const Message& cmd) int RemoteInputUDPHandler::getDataSocketBufferSize() { - // set a floor value at 24 kS/s - uint32_t samplerate = m_samplerate < 24000 ? 24000 : m_samplerate; + // set a floor value at 96 kS/s + uint32_t samplerate = m_samplerate < 96000 ? 96000 : m_samplerate; // 250 ms (1/4s) at current sample rate int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4; qDebug("RemoteInputUDPHandler::getDataSocketBufferSize: %d bytes", bufferSize);