mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 07:46:37 -04:00
SoapySDR: Process number of elements that actually were returned, not requested
This commit is contained in:
parent
3388e385b6
commit
21255f8d82
@ -160,24 +160,24 @@ void SoapySDRInputThread::run()
|
|||||||
{
|
{
|
||||||
if (m_nbChannels > 1)
|
if (m_nbChannels > 1)
|
||||||
{
|
{
|
||||||
callbackMIIQ(buffs, numElems*2); // size given in number of I or Q samples (2 items per sample)
|
callbackMIIQ(buffs, ret*2); // size given in number of I or Q samples (2 items per sample)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (m_decimatorType)
|
switch (m_decimatorType)
|
||||||
{
|
{
|
||||||
case Decimator8:
|
case Decimator8:
|
||||||
callbackSI8IQ((const qint8*) buffs[0], numElems*2);
|
callbackSI8IQ((const qint8*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case Decimator12:
|
case Decimator12:
|
||||||
callbackSI12IQ((const qint16*) buffs[0], numElems*2);
|
callbackSI12IQ((const qint16*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case Decimator16:
|
case Decimator16:
|
||||||
callbackSI16IQ((const qint16*) buffs[0], numElems*2);
|
callbackSI16IQ((const qint16*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case DecimatorFloat:
|
case DecimatorFloat:
|
||||||
default:
|
default:
|
||||||
callbackSIFIQ((const float*) buffs[0], numElems*2);
|
callbackSIFIQ((const float*) buffs[0], ret*2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,24 +185,24 @@ void SoapySDRInputThread::run()
|
|||||||
{
|
{
|
||||||
if (m_nbChannels > 1)
|
if (m_nbChannels > 1)
|
||||||
{
|
{
|
||||||
callbackMIQI(buffs, numElems*2); // size given in number of I or Q samples (2 items per sample)
|
callbackMIQI(buffs, ret*2); // size given in number of I or Q samples (2 items per sample)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (m_decimatorType)
|
switch (m_decimatorType)
|
||||||
{
|
{
|
||||||
case Decimator8:
|
case Decimator8:
|
||||||
callbackSI8QI((const qint8*) buffs[0], numElems*2);
|
callbackSI8QI((const qint8*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case Decimator12:
|
case Decimator12:
|
||||||
callbackSI12QI((const qint16*) buffs[0], numElems*2);
|
callbackSI12QI((const qint16*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case Decimator16:
|
case Decimator16:
|
||||||
callbackSI16QI((const qint16*) buffs[0], numElems*2);
|
callbackSI16QI((const qint16*) buffs[0], ret*2);
|
||||||
break;
|
break;
|
||||||
case DecimatorFloat:
|
case DecimatorFloat:
|
||||||
default:
|
default:
|
||||||
callbackSIFQI((const float*) buffs[0], numElems*2);
|
callbackSIFQI((const float*) buffs[0], ret*2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user