1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

Tx plugins: corrected FIFO begin iterator vs number of samples read

This commit is contained in:
f4exb 2019-10-27 08:02:08 +01:00
parent 31a7a0fdde
commit 4949e1fd04
7 changed files with 11 additions and 11 deletions

View File

@ -84,7 +84,7 @@ void Bladerf1OutputThread::callback(qint16* buf, qint32 len)
{
SampleVector::iterator beginRead;
m_sampleFifo->readAdvance(beginRead, len/(1<<m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_log2Interp);
if (m_log2Interp == 0)
{

View File

@ -203,7 +203,7 @@ void BladeRF2OutputThread::callbackSO(qint16* buf, qint32 len, unsigned int chan
SampleVector::iterator beginRead;
m_channels[channel].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[channel].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[channel].m_log2Interp);
if (m_channels[channel].m_log2Interp == 0)
{

View File

@ -120,7 +120,7 @@ void HackRFOutputThread::callback(qint8* buf, qint32 len)
{
SampleVector::iterator beginRead;
m_sampleFifo->readAdvance(beginRead, len/(2*(1<<m_log2Interp)));
beginRead -= len/2;
beginRead -= len/(2*(1<<m_log2Interp));
if (m_log2Interp == 0)
{

View File

@ -110,7 +110,7 @@ void LimeSDROutputThread::callback(qint16* buf, qint32 len)
{
SampleVector::iterator beginRead;
m_sampleFifo->readAdvance(beginRead, len/(1<<m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_log2Interp);
if (m_log2Interp == 0)
{

View File

@ -117,7 +117,7 @@ void PlutoSDROutputThread::convert(qint16* buf, qint32 len)
// pull samples from baseband generator
SampleVector::iterator beginRead;
m_sampleFifo->readAdvance(beginRead, len/(2*(1<<m_log2Interp)));
beginRead -= len/2;
beginRead -= len/(2*(1<<m_log2Interp));
if (m_log2Interp == 0)
{

View File

@ -293,7 +293,7 @@ void SoapySDROutputThread::callbackSO8(qint8* buf, qint32 len, unsigned int chan
SampleVector::iterator beginRead;
m_channels[channel].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[channel].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[channel].m_log2Interp);
if (m_channels[channel].m_log2Interp == 0)
{
@ -346,7 +346,7 @@ void SoapySDROutputThread::callbackSO12(qint16* buf, qint32 len, unsigned int ch
SampleVector::iterator beginRead;
m_channels[channel].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[channel].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[channel].m_log2Interp);
if (m_channels[channel].m_log2Interp == 0)
{
@ -399,7 +399,7 @@ void SoapySDROutputThread::callbackSO16(qint16* buf, qint32 len, unsigned int ch
SampleVector::iterator beginRead;
m_channels[channel].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[channel].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[channel].m_log2Interp);
if (m_channels[channel].m_log2Interp == 0)
{
@ -453,7 +453,7 @@ void SoapySDROutputThread::callbackSOIF(float* buf, qint32 len, unsigned int cha
SampleVector::iterator beginRead;
m_channels[channel].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[channel].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[channel].m_log2Interp);
if (m_channels[channel].m_log2Interp == 0)
{

View File

@ -236,7 +236,7 @@ void XTRXOutputThread::callback(qint16* buf, qint32 len)
SampleVector::iterator beginRead;
m_channels[m_uniqueChannelIndex].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[m_uniqueChannelIndex].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[m_uniqueChannelIndex].m_log2Interp);
if (m_channels[m_uniqueChannelIndex].m_log2Interp == 0)
{
@ -289,7 +289,7 @@ void XTRXOutputThread::callbackSO(qint16* buf, qint32 len)
SampleVector::iterator beginRead;
m_channels[m_uniqueChannelIndex].m_sampleFifo->readAdvance(beginRead, len/(1<<m_channels[m_uniqueChannelIndex].m_log2Interp));
beginRead -= len;
beginRead -= len/(1<<m_channels[m_uniqueChannelIndex].m_log2Interp);
if (m_channels[m_uniqueChannelIndex].m_log2Interp == 0)
{