diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputthread.cpp b/plugins/samplesink/soapysdroutput/soapysdroutputthread.cpp index 3b2cc4175..50df22745 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputthread.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutputthread.cpp @@ -124,9 +124,11 @@ void SoapySDROutputThread::run() int flags(0); long long timeNs(0); float blockTime = ((float) numElems) / (m_sampleRate <= 0 ? 1024000 : m_sampleRate); - long timeoutUs = 10000000 * blockTime; // 10 times the block time + long initialTtimeoutUs = 10000000 * blockTime; // 10 times the block time + long timeoutUs = initialTtimeoutUs < 250000 ? 250000 : initialTtimeoutUs; // 250ms minimum - qDebug("SoapySDROutputThread::run: numElems: %u elemSize: %u timeoutUs: %ld", numElems, elemSize, timeoutUs); + qDebug("SoapySDROutputThread::run: numElems: %u elemSize: %u initialTtimeoutUs: %ld timeoutUs: %ld", + numElems, elemSize, initialTtimeoutUs, timeoutUs); qDebug("SoapySDROutputThread::run: start running loop"); while (m_running) diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputthread.cpp b/plugins/samplesource/soapysdrinput/soapysdrinputthread.cpp index 97ab36586..e01164aaf 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputthread.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinputthread.cpp @@ -129,9 +129,11 @@ void SoapySDRInputThread::run() int flags(0); long long timeNs(0); float blockTime = ((float) numElems) / (m_sampleRate <= 0 ? 1024000 : m_sampleRate); - long timeoutUs = 10000000 * blockTime; // 10 times the block time + long initialTtimeoutUs = 10000000 * blockTime; // 10 times the block time + long timeoutUs = initialTtimeoutUs < 250000 ? 250000 : initialTtimeoutUs; // 250ms minimum - qDebug("SoapySDRInputThread::run: numElems: %u elemSize: %u timeoutUs: %ld", numElems, elemSize, timeoutUs); + qDebug("SoapySDRInputThread::run: numElems: %u elemSize: %u initialTtimeoutUs: %ld timeoutUs: %ld", + numElems, elemSize, initialTtimeoutUs, timeoutUs); qDebug("SoapySDRInputThread::run: start running loop"); while (m_running)