mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Remove tabs.
This commit is contained in:
parent
c30af7f39f
commit
720630c2fb
@ -77,27 +77,27 @@ void AirspyHFWorker::setLog2Decimation(unsigned int log2_decim)
|
||||
// Decimate according to specified log2 (ex: log2=4 => decim=16)
|
||||
void AirspyHFWorker::callbackIQ(const float* inBuf, qint32 len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const float* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const float* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
@ -135,32 +135,32 @@ void AirspyHFWorker::callbackIQ(const float* inBuf, qint32 len)
|
||||
|
||||
m_replayBuffer->unlock();
|
||||
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
}
|
||||
|
||||
void AirspyHFWorker::callbackQI(const float* inBuf, qint32 len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const float* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const float* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
@ -198,7 +198,7 @@ void AirspyHFWorker::callbackQI(const float* inBuf, qint32 len)
|
||||
|
||||
m_replayBuffer->unlock();
|
||||
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
}
|
||||
|
||||
int AirspyHFWorker::rx_callback(airspyhf_transfer_t* transfer)
|
||||
|
@ -114,24 +114,24 @@ void LimeSDRInputThread::callbackIQ(const qint16* inBuf, qint32 len)
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
@ -171,24 +171,24 @@ void LimeSDRInputThread::callbackQI(const qint16* inBuf, qint32 len)
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
@ -216,7 +216,7 @@ void LimeSDRInputThread::callbackQI(const qint16* inBuf, qint32 len)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_replayBuffer->unlock();
|
||||
|
||||
|
@ -98,240 +98,240 @@ void RTLSDRThread::run()
|
||||
// Len is total samples (i.e. one I and Q pair will have len=2)
|
||||
void RTLSDRThread::callbackIQ(const quint8* inBuf, qint32 len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const quint8* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const quint8* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
m_decimatorsIQ.decimate1(&it, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_fcPos == 0) // Infradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_inf(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_fcPos == 1) // Supradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_sup(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_sup(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_sup(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_sup(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_sup(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_sup(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // Centered
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_cen(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_cen(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_cen(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_cen(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_cen(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_cen(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
m_decimatorsIQ.decimate1(&it, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_fcPos == 0) // Infradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_inf(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_fcPos == 1) // Supradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_sup(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_sup(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_sup(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_sup(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_sup(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_sup(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // Centered
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsIQ.decimate2_cen(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsIQ.decimate4_cen(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsIQ.decimate8_cen(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsIQ.decimate16_cen(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsIQ.decimate32_cen(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsIQ.decimate64_cen(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_replayBuffer->unlock();
|
||||
m_replayBuffer->unlock();
|
||||
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
|
||||
if(!m_running)
|
||||
rtlsdr_cancel_async(m_dev);
|
||||
if(!m_running)
|
||||
rtlsdr_cancel_async(m_dev);
|
||||
}
|
||||
|
||||
void RTLSDRThread::callbackQI(const quint8* inBuf, qint32 len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const quint8* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const quint8* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
m_decimatorsQI.decimate1(&it, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_fcPos == 0) // Infradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_inf(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_fcPos == 1) // Supradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_sup(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_sup(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_sup(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_sup(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_sup(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_sup(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // Centered
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_cen(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_cen(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_cen(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_cen(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_cen(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_cen(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
m_decimatorsQI.decimate1(&it, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_fcPos == 0) // Infradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_inf(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_fcPos == 1) // Supradyne
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_sup(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_sup(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_sup(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_sup(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_sup(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_sup(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // Centered
|
||||
{
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimatorsQI.decimate2_cen(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimatorsQI.decimate4_cen(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimatorsQI.decimate8_cen(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimatorsQI.decimate16_cen(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimatorsQI.decimate32_cen(&it, buf, len);
|
||||
break;
|
||||
case 6:
|
||||
m_decimatorsQI.decimate64_cen(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_replayBuffer->unlock();
|
||||
m_replayBuffer->unlock();
|
||||
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
m_sampleFifo->write(m_convertBuffer.begin(), it);
|
||||
|
||||
if(!m_running)
|
||||
rtlsdr_cancel_async(m_dev);
|
||||
if(!m_running)
|
||||
rtlsdr_cancel_async(m_dev);
|
||||
}
|
||||
|
||||
void RTLSDRThread::callbackHelper(unsigned char* buf, uint32_t len, void* ctx)
|
||||
|
@ -177,24 +177,24 @@ void SDRPlayV3Thread::callbackIQ(const qint16* inBuf, qint32 len)
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
@ -293,24 +293,24 @@ void SDRPlayV3Thread::callbackQI(const qint16* inBuf, qint32 len)
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
if (m_log2Decim == 0)
|
||||
{
|
||||
|
@ -198,24 +198,24 @@ void USRPInputThread::callbackIQ(const qint16* inBuf, qint32 len)
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
||||
// Save data to replay buffer
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
m_replayBuffer->lock();
|
||||
bool replayEnabled = m_replayBuffer->getSize() > 0;
|
||||
if (replayEnabled) {
|
||||
m_replayBuffer->write(inBuf, len);
|
||||
}
|
||||
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
const qint16* buf = inBuf;
|
||||
qint32 remaining = len;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
{
|
||||
// Choose between live data or replayed data
|
||||
if (replayEnabled && m_replayBuffer->useReplay()) {
|
||||
len = m_replayBuffer->read(remaining, buf);
|
||||
} else {
|
||||
len = remaining;
|
||||
}
|
||||
remaining -= len;
|
||||
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user