SoapySDR support: allow overflow on reads. Changed timeout to 10 times the block time (actually)

This commit is contained in:
f4exb 2018-11-20 00:30:44 +01:00
parent 47b9852bcc
commit f04201a528
2 changed files with 10 additions and 2 deletions

View File

@ -124,7 +124,7 @@ void SoapySDROutputThread::run()
int flags(0);
long long timeNs(0);
float blockTime = ((float) numElems) / (m_sampleRate <= 0 ? 1024000 : m_sampleRate);
long timeoutUs = 2000000 * blockTime; // 10 times the block time
long timeoutUs = 10000000 * blockTime; // 10 times the block time
qDebug("SoapySDROutputThread::run: numElems: %u elemSize: %u timeoutUs: %ld", numElems, elemSize, timeoutUs);
qDebug("SoapySDROutputThread::run: start running loop");
@ -137,6 +137,10 @@ void SoapySDROutputThread::run()
{
qWarning("SoapySDROutputThread::run: timeout: flags: %d timeNs: %lld timeoutUs: %ld", flags, timeNs, timeoutUs);
}
else if (ret == SOAPY_SDR_OVERFLOW)
{
qWarning("SoapySDROutputThread::run: overflow: flags: %d timeNs: %lld timeoutUs: %ld", flags, timeNs, timeoutUs);
}
else if (ret < 0)
{
qCritical("SoapySDROutputThread::run: Unexpected write stream error: %s", SoapySDR::errToStr(ret));

View File

@ -129,7 +129,7 @@ void SoapySDRInputThread::run()
int flags(0);
long long timeNs(0);
float blockTime = ((float) numElems) / (m_sampleRate <= 0 ? 1024000 : m_sampleRate);
long timeoutUs = 2000000 * blockTime; // 10 times the block time
long timeoutUs = 10000000 * blockTime; // 10 times the block time
qDebug("SoapySDRInputThread::run: numElems: %u elemSize: %u timeoutUs: %ld", numElems, elemSize, timeoutUs);
qDebug("SoapySDRInputThread::run: start running loop");
@ -142,6 +142,10 @@ void SoapySDRInputThread::run()
{
qWarning("SoapySDRInputThread::run: timeout: flags: %d timeNs: %lld timeoutUs: %ld", flags, timeNs, timeoutUs);
}
else if (ret == SOAPY_SDR_OVERFLOW)
{
qWarning("SoapySDRInputThread::run: overflow: flags: %d timeNs: %lld timeoutUs: %ld", flags, timeNs, timeoutUs);
}
else if (ret < 0)
{
qCritical("SoapySDRInputThread::run: Unexpected read stream error: %s", SoapySDR::errToStr(ret));