1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

LimeSDR: use constant instead of define for buffer size

This commit is contained in:
f4exb
2020-04-09 06:45:12 +02:00
parent 73af940e89
commit b7fc2f255c
5 changed files with 14 additions and 14 deletions
@@ -25,11 +25,11 @@ LimeSDRInputThread::LimeSDRInputThread(lms_stream_t* stream, SampleSinkFifo* sam
QThread(parent),
m_running(false),
m_stream(stream),
m_convertBuffer(LIMESDR_BLOCKSIZE),
m_convertBuffer(DeviceLimeSDR::blockSize),
m_sampleFifo(sampleFifo),
m_log2Decim(0)
{
std::fill(m_buf, m_buf + 2*LIMESDR_BLOCKSIZE, 0);
std::fill(m_buf, m_buf + 2*DeviceLimeSDR::blockSize, 0);
}
LimeSDRInputThread::~LimeSDRInputThread()
@@ -88,7 +88,7 @@ void LimeSDRInputThread::run()
while (m_running)
{
if ((res = LMS_RecvStream(m_stream, (void *) m_buf, LIMESDR_BLOCKSIZE, &metadata, 1000)) < 0)
if ((res = LMS_RecvStream(m_stream, (void *) m_buf, DeviceLimeSDR::blockSize, &metadata, 1000)) < 0)
{
qCritical("LimeSDRInputThread::run read error: %s", strerror(errno));
break;
@@ -27,8 +27,7 @@
#include "dsp/samplesinkfifo.h"
#include "dsp/decimators.h"
#include "limesdr/devicelimesdrshared.h"
#define LIMESDR_BLOCKSIZE (1<<15) //complex samples per buffer
#include "limesdr/devicelimesdr.h"
class LimeSDRInputThread : public QThread, public DeviceLimeSDRShared::ThreadInterface
{
@@ -50,7 +49,7 @@ private:
bool m_running;
lms_stream_t* m_stream;
qint16 m_buf[2*LIMESDR_BLOCKSIZE]; //must hold I+Q values of each sample hence 2xcomplex size
qint16 m_buf[2*DeviceLimeSDR::blockSize]; //must hold I+Q values of each sample hence 2xcomplex size
SampleVector m_convertBuffer;
SampleSinkFifo* m_sampleFifo;