Remote source/input: increase minimum UDP buffer size based on 96 kS/s

This commit is contained in:
f4exb 2021-12-18 06:24:47 +01:00
parent 35adc25450
commit 78be244dc6
3 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ void RemoteSourceSource::handleDataFrame(RemoteDataFrame* dataFrame)
{ {
if (dataFrame->m_rxControlBlock.m_blockCount < RemoteNbOrginalBlocks) 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 else
{ {

View File

@ -194,8 +194,8 @@ void RemoteSourceWorker::processData()
int RemoteSourceWorker::getDataSocketBufferSize(uint32_t inSampleRate) int RemoteSourceWorker::getDataSocketBufferSize(uint32_t inSampleRate)
{ {
// set a floor value at 24 kS/s // set a floor value at 96 kS/s
uint32_t samplerate = inSampleRate < 24000 ? 24000 : inSampleRate; uint32_t samplerate = inSampleRate < 96000 ? 96000 : inSampleRate;
// 250 ms (1/4s) at current sample rate // 250 ms (1/4s) at current sample rate
int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4; int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4;
qDebug("RemoteSourceWorker::getDataSocketBufferSize: %d bytes", bufferSize); qDebug("RemoteSourceWorker::getDataSocketBufferSize: %d bytes", bufferSize);

View File

@ -453,8 +453,8 @@ bool RemoteInputUDPHandler::handleMessage(const Message& cmd)
int RemoteInputUDPHandler::getDataSocketBufferSize() int RemoteInputUDPHandler::getDataSocketBufferSize()
{ {
// set a floor value at 24 kS/s // set a floor value at 96 kS/s
uint32_t samplerate = m_samplerate < 24000 ? 24000 : m_samplerate; uint32_t samplerate = m_samplerate < 96000 ? 96000 : m_samplerate;
// 250 ms (1/4s) at current sample rate // 250 ms (1/4s) at current sample rate
int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4; int bufferSize = (samplerate * 2 * (SDR_RX_SAMP_SZ == 16 ? 2 : 4)) / 4;
qDebug("RemoteInputUDPHandler::getDataSocketBufferSize: %d bytes", bufferSize); qDebug("RemoteInputUDPHandler::getDataSocketBufferSize: %d bytes", bufferSize);