diff --git a/CMakeLists.txt b/CMakeLists.txt index d6ccb8f47..78217b4f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(sdrbase_SOURCES sdrbase/dsp/nco.cpp sdrbase/dsp/pidcontroller.cpp sdrbase/dsp/phaselock.cpp - sdrbase/dsp/samplefifo.cpp + sdrbase/dsp/samplesinkfifo.cpp sdrbase/dsp/samplesinkfifodoublebuffered.cpp sdrbase/dsp/basebandsamplesink.cpp sdrbase/dsp/nullsink.cpp @@ -205,7 +205,7 @@ set(sdrbase_HEADERS sdrbase/dsp/phasediscri.h sdrbase/dsp/phaselock.h sdrbase/dsp/pidcontroller.h - sdrbase/dsp/samplefifo.h + sdrbase/dsp/samplesinkfifo.h sdrbase/dsp/samplesinkfifodoublebuffered.h sdrbase/dsp/samplesinkfifodecimator.h sdrbase/dsp/basebandsamplesink.h diff --git a/plugins/samplesource/airspy/airspythread.cpp b/plugins/samplesource/airspy/airspythread.cpp index b516f5bcd..647d24df7 100644 --- a/plugins/samplesource/airspy/airspythread.cpp +++ b/plugins/samplesource/airspy/airspythread.cpp @@ -18,11 +18,12 @@ #include #include "airspythread.h" -#include "dsp/samplefifo.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" AirspyThread *AirspyThread::m_this = 0; -AirspyThread::AirspyThread(struct airspy_device* dev, SampleFifo* sampleFifo, QObject* parent) : +AirspyThread::AirspyThread(struct airspy_device* dev, SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), m_running(false), m_dev(dev), diff --git a/plugins/samplesource/airspy/airspythread.h b/plugins/samplesource/airspy/airspythread.h index 29097bf39..35d72bc11 100644 --- a/plugins/samplesource/airspy/airspythread.h +++ b/plugins/samplesource/airspy/airspythread.h @@ -21,7 +21,8 @@ #include #include #include -#include "dsp/samplefifo.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "dsp/decimators.h" #define AIRSPY_BLOCKSIZE (1<<17) @@ -30,7 +31,7 @@ class AirspyThread : public QThread { Q_OBJECT public: - AirspyThread(struct airspy_device* dev, SampleFifo* sampleFifo, QObject* parent = NULL); + AirspyThread(struct airspy_device* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~AirspyThread(); void startWork(); @@ -47,7 +48,7 @@ private: struct airspy_device* m_dev; qint16 m_buf[2*AIRSPY_BLOCKSIZE]; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; int m_samplerate; unsigned int m_log2Decim; diff --git a/plugins/samplesource/bladerf/bladerfthread.cpp b/plugins/samplesource/bladerf/bladerfthread.cpp index eae447d3e..3d7074307 100644 --- a/plugins/samplesource/bladerf/bladerfthread.cpp +++ b/plugins/samplesource/bladerf/bladerfthread.cpp @@ -16,12 +16,12 @@ #include #include -#include "dsp/samplefifo.h" #include "bladerfthread.h" +#include "../../../sdrbase/dsp/samplesinkfifo.h" -BladerfThread::BladerfThread(struct bladerf* dev, SampleFifo* sampleFifo, QObject* parent) : +BladerfThread::BladerfThread(struct bladerf* dev, SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), m_running(false), m_dev(dev), diff --git a/plugins/samplesource/bladerf/bladerfthread.h b/plugins/samplesource/bladerf/bladerfthread.h index a1d1691a4..85f94213d 100644 --- a/plugins/samplesource/bladerf/bladerfthread.h +++ b/plugins/samplesource/bladerf/bladerfthread.h @@ -21,7 +21,7 @@ #include #include #include -#include "dsp/samplefifo.h" +#include "dsp/samplesinkfifo.h" //#include "dsp/inthalfbandfilter.h" #include "dsp/decimators.h" @@ -31,7 +31,7 @@ class BladerfThread : public QThread { Q_OBJECT public: - BladerfThread(struct bladerf* dev, SampleFifo* sampleFifo, QObject* parent = NULL); + BladerfThread(struct bladerf* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~BladerfThread(); void startWork(); @@ -48,7 +48,7 @@ private: struct bladerf* m_dev; qint16 m_buf[2*BLADERF_BLOCKSIZE]; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; int m_samplerate; unsigned int m_log2Decim; diff --git a/plugins/samplesource/fcdpro/fcdprothread.cpp b/plugins/samplesource/fcdpro/fcdprothread.cpp index 6ad7430a2..83be7c3cc 100644 --- a/plugins/samplesource/fcdpro/fcdprothread.cpp +++ b/plugins/samplesource/fcdpro/fcdprothread.cpp @@ -18,11 +18,12 @@ #include #include #include -#include "dsp/samplefifo.h" #include "fcdprothread.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "fcdtraits.h" -FCDProThread::FCDProThread(SampleFifo* sampleFifo, QObject* parent) : +FCDProThread::FCDProThread(SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), fcd_handle(NULL), m_running(false), diff --git a/plugins/samplesource/fcdpro/fcdprothread.h b/plugins/samplesource/fcdpro/fcdprothread.h index e4b8b496d..e7d8b72e5 100644 --- a/plugins/samplesource/fcdpro/fcdprothread.h +++ b/plugins/samplesource/fcdpro/fcdprothread.h @@ -20,15 +20,15 @@ #include #include #include -#include "dsp/samplefifo.h" #include "dsp/inthalfbandfilter.h" #include +#include "../../../sdrbase/dsp/samplesinkfifo.h" class FCDProThread : public QThread { Q_OBJECT public: - FCDProThread(SampleFifo* sampleFifo, QObject* parent = NULL); + FCDProThread(SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~FCDProThread(); void startWork(); @@ -44,7 +44,7 @@ private: bool m_running; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; void run(); int work(int n_items); diff --git a/plugins/samplesource/fcdproplus/fcdproplusreader.cpp b/plugins/samplesource/fcdproplus/fcdproplusreader.cpp index 1c37b4ab1..ad392cec3 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusreader.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusreader.cpp @@ -24,11 +24,12 @@ #include #include -#include "dsp/samplefifo.h" #include "fcdproplusreader.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "fcdtraits.h" -FCDProPlusReader::FCDProPlusReader(SampleFifo* sampleFifo, QObject* parent) : +FCDProPlusReader::FCDProPlusReader(SampleSinkFifo* sampleFifo, QObject* parent) : QObject(parent), m_fcdAudioInput(0), m_fcdInput(0), diff --git a/plugins/samplesource/fcdproplus/fcdproplusreader.h b/plugins/samplesource/fcdproplus/fcdproplusreader.h index 5a69dab82..76aae634e 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusreader.h +++ b/plugins/samplesource/fcdproplus/fcdproplusreader.h @@ -22,7 +22,7 @@ #include #include -#include "dsp/samplefifo.h" +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "dsp/inthalfbandfilter.h" class QAudioInput; @@ -33,7 +33,7 @@ class FCDProPlusReader : public QObject { Q_OBJECT public: - FCDProPlusReader(SampleFifo* sampleFifo, QObject* parent = NULL); + FCDProPlusReader(SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~FCDProPlusReader(); void startWork(); @@ -49,7 +49,7 @@ private: SampleVector m_convertBuffer; QByteArray m_fcdBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; void openFcdAudio(const QAudioDeviceInfo& fcdAudioDeviceInfo); diff --git a/plugins/samplesource/fcdproplus/fcdproplusthread.cpp b/plugins/samplesource/fcdproplus/fcdproplusthread.cpp index 82ce94495..5bf083590 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusthread.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusthread.cpp @@ -18,11 +18,12 @@ #include #include #include -#include "dsp/samplefifo.h" #include "fcdproplusthread.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "fcdtraits.h" -FCDProPlusThread::FCDProPlusThread(SampleFifo* sampleFifo, QObject* parent) : +FCDProPlusThread::FCDProPlusThread(SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), fcd_handle(NULL), m_running(false), diff --git a/plugins/samplesource/fcdproplus/fcdproplusthread.h b/plugins/samplesource/fcdproplus/fcdproplusthread.h index 0c2f72dc5..75629c726 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusthread.h +++ b/plugins/samplesource/fcdproplus/fcdproplusthread.h @@ -21,15 +21,15 @@ #include #include #include -#include "dsp/samplefifo.h" #include "dsp/inthalfbandfilter.h" #include +#include "../../../sdrbase/dsp/samplesinkfifo.h" class FCDProPlusThread : public QThread { Q_OBJECT public: - FCDProPlusThread(SampleFifo* sampleFifo, QObject* parent = NULL); + FCDProPlusThread(SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~FCDProPlusThread(); void startWork(); @@ -45,7 +45,7 @@ private: bool m_running; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; void run(); int work(int n_items); diff --git a/plugins/samplesource/filesource/filesourcethread.cpp b/plugins/samplesource/filesource/filesourcethread.cpp index ddda282e3..db4e6ea8f 100644 --- a/plugins/samplesource/filesource/filesourcethread.cpp +++ b/plugins/samplesource/filesource/filesourcethread.cpp @@ -17,12 +17,12 @@ #include #include #include -#include "dsp/samplefifo.h" #include #include "filesourcethread.h" +#include "../../../sdrbase/dsp/samplesinkfifo.h" -FileSourceThread::FileSourceThread(std::ifstream *samplesStream, SampleFifo* sampleFifo, QObject* parent) : +FileSourceThread::FileSourceThread(std::ifstream *samplesStream, SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), m_running(false), m_ifstream(samplesStream), diff --git a/plugins/samplesource/filesource/filesourcethread.h b/plugins/samplesource/filesource/filesourcethread.h index 560605218..9c92c275f 100644 --- a/plugins/samplesource/filesource/filesourcethread.h +++ b/plugins/samplesource/filesource/filesourcethread.h @@ -25,7 +25,8 @@ #include #include #include -#include "dsp/samplefifo.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "dsp/inthalfbandfilter.h" #define FILESOURCE_THROTTLE_MS 50 @@ -34,7 +35,7 @@ class FileSourceThread : public QThread { Q_OBJECT public: - FileSourceThread(std::ifstream *samplesStream, SampleFifo* sampleFifo, QObject* parent = NULL); + FileSourceThread(std::ifstream *samplesStream, SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~FileSourceThread(); void startWork(); @@ -56,7 +57,7 @@ private: quint8 *m_buf; std::size_t m_bufsize; std::size_t m_chunksize; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; std::size_t m_samplesCount; int m_samplerate; diff --git a/plugins/samplesource/hackrf/hackrfthread.cpp b/plugins/samplesource/hackrf/hackrfthread.cpp index 96089860b..c9fdf909d 100644 --- a/plugins/samplesource/hackrf/hackrfthread.cpp +++ b/plugins/samplesource/hackrf/hackrfthread.cpp @@ -17,12 +17,12 @@ #include #include -#include "dsp/samplefifo.h" #include "hackrfthread.h" +#include "../../../sdrbase/dsp/samplesinkfifo.h" HackRFThread *HackRFThread::m_this = 0; -HackRFThread::HackRFThread(hackrf_device* dev, SampleFifo* sampleFifo, QObject* parent) : +HackRFThread::HackRFThread(hackrf_device* dev, SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), m_running(false), m_dev(dev), diff --git a/plugins/samplesource/hackrf/hackrfthread.h b/plugins/samplesource/hackrf/hackrfthread.h index 6dd1d384b..0a4190c40 100644 --- a/plugins/samplesource/hackrf/hackrfthread.h +++ b/plugins/samplesource/hackrf/hackrfthread.h @@ -21,7 +21,8 @@ #include #include #include -#include "dsp/samplefifo.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "dsp/decimators.h" #define HACKRF_BLOCKSIZE (1<<17) @@ -30,7 +31,7 @@ class HackRFThread : public QThread { Q_OBJECT public: - HackRFThread(hackrf_device* dev, SampleFifo* sampleFifo, QObject* parent = NULL); + HackRFThread(hackrf_device* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~HackRFThread(); void startWork(); @@ -47,7 +48,7 @@ private: hackrf_device* m_dev; qint16 m_buf[2*HACKRF_BLOCKSIZE]; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; int m_samplerate; unsigned int m_log2Decim; diff --git a/plugins/samplesource/rtlsdr/rtlsdrthread.cpp b/plugins/samplesource/rtlsdr/rtlsdrthread.cpp index 80a75c2ef..6d1aae0fa 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrthread.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrthread.cpp @@ -18,11 +18,12 @@ #include #include #include "rtlsdrthread.h" -#include "dsp/samplefifo.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #define FCD_BLOCKSIZE 16384 -RTLSDRThread::RTLSDRThread(rtlsdr_dev_t* dev, SampleFifo* sampleFifo, QObject* parent) : +RTLSDRThread::RTLSDRThread(rtlsdr_dev_t* dev, SampleSinkFifo* sampleFifo, QObject* parent) : QThread(parent), m_running(false), m_dev(dev), diff --git a/plugins/samplesource/rtlsdr/rtlsdrthread.h b/plugins/samplesource/rtlsdr/rtlsdrthread.h index d7a4caa8c..8aad5b0ee 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrthread.h +++ b/plugins/samplesource/rtlsdr/rtlsdrthread.h @@ -22,15 +22,15 @@ #include #include #include -#include "dsp/samplefifo.h" -//#include "dsp/inthalfbandfilter.h" + +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "dsp/decimators.h" class RTLSDRThread : public QThread { Q_OBJECT public: - RTLSDRThread(rtlsdr_dev_t* dev, SampleFifo* sampleFifo, QObject* parent = NULL); + RTLSDRThread(rtlsdr_dev_t* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL); ~RTLSDRThread(); void startWork(); @@ -46,7 +46,7 @@ private: rtlsdr_dev_t* m_dev; SampleVector m_convertBuffer; - SampleFifo* m_sampleFifo; + SampleSinkFifo* m_sampleFifo; int m_samplerate; unsigned int m_log2Decim; diff --git a/plugins/samplesource/sdrdaemon/sdrdaemonbufferold.h b/plugins/samplesource/sdrdaemon/sdrdaemonbufferold.h index 57aeebddc..1d12a867b 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemonbufferold.h +++ b/plugins/samplesource/sdrdaemon/sdrdaemonbufferold.h @@ -21,8 +21,8 @@ #include #include #include +#include "../../../sdrbase/dsp/samplesinkfifo.h" #include "util/CRC64.h" -#include "dsp/samplefifo.h" class SDRdaemonBufferOld { diff --git a/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.cpp b/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.cpp index 19ec8859e..7d3f420d4 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.cpp @@ -25,7 +25,7 @@ #include "sdrdaemonudphandler.h" #include "sdrdaemoninput.h" -SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) : +SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleSinkFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) : m_deviceAPI(devieAPI), m_sdrDaemonBuffer(m_rateDivider), m_dataSocket(0), diff --git a/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.h b/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.h index 2f230a1ac..0c0aef7a9 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.h +++ b/plugins/samplesource/sdrdaemon/sdrdaemonudphandler.h @@ -27,7 +27,7 @@ #define SDRDAEMON_THROTTLE_MS 50 -class SampleFifo; +class SampleSinkFifo; class MessageQueue; class QTimer; class DeviceAPI; @@ -36,7 +36,7 @@ class SDRdaemonUDPHandler : public QObject { Q_OBJECT public: - SDRdaemonUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI); + SDRdaemonUDPHandler(SampleSinkFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI); ~SDRdaemonUDPHandler(); void connectTimer(const QTimer* timer); void start(); @@ -59,7 +59,7 @@ private: bool m_dataConnected; char *m_udpBuf; qint64 m_udpReadBytes; - SampleFifo *m_sampleFifo; + SampleSinkFifo *m_sampleFifo; uint32_t m_samplerate; uint32_t m_centerFrequency; uint32_t m_tv_sec; diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.cpp b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.cpp index 6009902d6..be4089534 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.cpp +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.cpp @@ -25,7 +25,7 @@ #include "sdrdaemonfecinput.h" #include "sdrdaemonfecudphandler.h" -SDRdaemonFECUDPHandler::SDRdaemonFECUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) : +SDRdaemonFECUDPHandler::SDRdaemonFECUDPHandler(SampleSinkFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) : m_deviceAPI(devieAPI), m_sdrDaemonBuffer(m_rateDivider), m_dataSocket(0), diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.h b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.h index 76cddaceb..b038f8814 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.h +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecudphandler.h @@ -27,7 +27,7 @@ #define SDRDAEMONFEC_THROTTLE_MS 50 -class SampleFifo; +class SampleSinkFifo; class MessageQueue; class QTimer; class DeviceAPI; @@ -36,7 +36,7 @@ class SDRdaemonFECUDPHandler : public QObject { Q_OBJECT public: - SDRdaemonFECUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI); + SDRdaemonFECUDPHandler(SampleSinkFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI); ~SDRdaemonFECUDPHandler(); void connectTimer(const QTimer* timer); void start(); @@ -57,7 +57,7 @@ private: bool m_dataConnected; char *m_udpBuf; qint64 m_udpReadBytes; - SampleFifo *m_sampleFifo; + SampleSinkFifo *m_sampleFifo; uint32_t m_samplerate; uint32_t m_centerFrequency; uint32_t m_tv_sec; diff --git a/sdrbase/dsp/devicesamplesource.h b/sdrbase/dsp/devicesamplesource.h index d1ef88c43..3c269429d 100644 --- a/sdrbase/dsp/devicesamplesource.h +++ b/sdrbase/dsp/devicesamplesource.h @@ -19,7 +19,8 @@ #define INCLUDE_SAMPLESOURCE_H #include -#include "dsp/samplefifo.h" + +#include "samplesinkfifo.h" #include "util/message.h" #include "util/messagequeue.h" #include "util/export.h" @@ -42,13 +43,13 @@ public: MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } MessageQueue *getOutputMessageQueueToGUI() { return &m_outputMessageQueueToGUI; } - SampleFifo* getSampleFifo() { return &m_sampleFifo; } + SampleSinkFifo* getSampleFifo() { return &m_sampleFifo; } protected slots: void handleInputMessages(); protected: - SampleFifo m_sampleFifo; + SampleSinkFifo m_sampleFifo; MessageQueue m_inputMessageQueue; //!< Input queue to the source MessageQueue m_outputMessageQueueToGUI; //!< Output queue specialized for the source GUI }; diff --git a/sdrbase/dsp/dspdevicesourceengine.cpp b/sdrbase/dsp/dspdevicesourceengine.cpp index 0eb47348d..0b556bb5a 100644 --- a/sdrbase/dsp/dspdevicesourceengine.cpp +++ b/sdrbase/dsp/dspdevicesourceengine.cpp @@ -22,8 +22,8 @@ #include #include #include -#include "dsp/samplefifo.h" #include "dsp/dspcommands.h" +#include "samplesinkfifo.h" #include "threadedbasebandsamplesink.h" DSPDeviceSourceEngine::DSPDeviceSourceEngine(uint uid, QObject* parent) : @@ -242,7 +242,7 @@ void DSPDeviceSourceEngine::imbalance(SampleVector::iterator begin, SampleVector void DSPDeviceSourceEngine::work() { - SampleFifo* sampleFifo = m_deviceSampleSource->getSampleFifo(); + SampleSinkFifo* sampleFifo = m_deviceSampleSource->getSampleFifo(); std::size_t samplesDone = 0; bool positiveOnly = false; diff --git a/sdrbase/dsp/samplefifo.cpp b/sdrbase/dsp/samplesinkfifo.cpp similarity index 90% rename from sdrbase/dsp/samplefifo.cpp rename to sdrbase/dsp/samplesinkfifo.cpp index caa49693d..967c08953 100644 --- a/sdrbase/dsp/samplefifo.cpp +++ b/sdrbase/dsp/samplesinkfifo.cpp @@ -15,11 +15,11 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "dsp/samplefifo.h" +#include "samplesinkfifo.h" #define MIN(x, y) (((x) < (y)) ? (x) : (y)) -void SampleFifo::create(uint s) +void SampleSinkFifo::create(uint s) { m_size = 0; m_fill = 0; @@ -33,7 +33,7 @@ void SampleFifo::create(uint s) qCritical("SampleFifo: out of memory"); } -SampleFifo::SampleFifo(QObject* parent) : +SampleSinkFifo::SampleSinkFifo(QObject* parent) : QObject(parent), m_data() { @@ -44,7 +44,7 @@ SampleFifo::SampleFifo(QObject* parent) : m_tail = 0; } -SampleFifo::SampleFifo(int size, QObject* parent) : +SampleSinkFifo::SampleSinkFifo(int size, QObject* parent) : QObject(parent), m_data() { @@ -53,21 +53,21 @@ SampleFifo::SampleFifo(int size, QObject* parent) : create(size); } -SampleFifo::~SampleFifo() +SampleSinkFifo::~SampleSinkFifo() { QMutexLocker mutexLocker(&m_mutex); m_size = 0; } -bool SampleFifo::setSize(int size) +bool SampleSinkFifo::setSize(int size) { create(size); return m_data.size() == (uint)size; } -uint SampleFifo::write(const quint8* data, uint count) +uint SampleSinkFifo::write(const quint8* data, uint count) { QMutexLocker mutexLocker(&m_mutex); uint total; @@ -110,7 +110,7 @@ uint SampleFifo::write(const quint8* data, uint count) return total; } -uint SampleFifo::write(SampleVector::const_iterator begin, SampleVector::const_iterator end) +uint SampleSinkFifo::write(SampleVector::const_iterator begin, SampleVector::const_iterator end) { QMutexLocker mutexLocker(&m_mutex); uint count = end - begin; @@ -152,7 +152,7 @@ uint SampleFifo::write(SampleVector::const_iterator begin, SampleVector::const_i return total; } -uint SampleFifo::read(SampleVector::iterator begin, SampleVector::iterator end) +uint SampleSinkFifo::read(SampleVector::iterator begin, SampleVector::iterator end) { QMutexLocker mutexLocker(&m_mutex); uint count = end - begin; @@ -178,7 +178,7 @@ uint SampleFifo::read(SampleVector::iterator begin, SampleVector::iterator end) return total; } -uint SampleFifo::readBegin(uint count, +uint SampleSinkFifo::readBegin(uint count, SampleVector::iterator* part1Begin, SampleVector::iterator* part1End, SampleVector::iterator* part2Begin, SampleVector::iterator* part2End) { @@ -216,7 +216,7 @@ uint SampleFifo::readBegin(uint count, return total; } -uint SampleFifo::readCommit(uint count) +uint SampleSinkFifo::readCommit(uint count) { QMutexLocker mutexLocker(&m_mutex); diff --git a/sdrbase/dsp/samplefifo.h b/sdrbase/dsp/samplesinkfifo.h similarity index 93% rename from sdrbase/dsp/samplefifo.h rename to sdrbase/dsp/samplesinkfifo.h index f2cfe1648..35fcc027c 100644 --- a/sdrbase/dsp/samplefifo.h +++ b/sdrbase/dsp/samplesinkfifo.h @@ -24,7 +24,7 @@ #include "dsp/dsptypes.h" #include "util/export.h" -class SDRANGEL_API SampleFifo : public QObject { +class SDRANGEL_API SampleSinkFifo : public QObject { Q_OBJECT private: @@ -42,9 +42,9 @@ private: void create(uint s); public: - SampleFifo(QObject* parent = NULL); - SampleFifo(int size, QObject* parent = NULL); - ~SampleFifo(); + SampleSinkFifo(QObject* parent = NULL); + SampleSinkFifo(int size, QObject* parent = NULL); + ~SampleSinkFifo(); bool setSize(int size); inline uint size() const { return m_size; } diff --git a/sdrbase/dsp/threadedbasebandsamplesink.h b/sdrbase/dsp/threadedbasebandsamplesink.h index 3cac0e3bc..fc50477ff 100644 --- a/sdrbase/dsp/threadedbasebandsamplesink.h +++ b/sdrbase/dsp/threadedbasebandsamplesink.h @@ -20,7 +20,8 @@ #include #include -#include "dsp/samplefifo.h" + +#include "samplesinkfifo.h" #include "util/messagequeue.h" #include "util/export.h" @@ -40,7 +41,7 @@ public: void writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end); BasebandSampleSink* m_sampleSink; - SampleFifo m_sampleFifo; + SampleSinkFifo m_sampleFifo; public slots: void handleFifoData(); diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index 62f20bced..34ef89226 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -55,7 +55,7 @@ SOURCES += mainwindow.cpp\ dsp/nco.cpp\ dsp/pidcontroller.cpp\ dsp/phaselock.cpp\ - dsp/samplefifo.cpp\ + dsp/samplesinkfifo.cpp\ dsp/samplesinkfifodoublebuffered.cpp\ dsp/basebandsamplesink.cpp\ dsp/nullsink.cpp\ @@ -136,7 +136,7 @@ HEADERS += mainwindow.h\ dsp/phasediscri.h\ dsp/phaselock.h\ dsp/pidcontroller.h\ - dsp/samplefifo.h\ + dsp/samplesinkfifo.h\ dsp/samplesinkfifodoublebuffered.h\ dsp/samplesinkfifodecimator.h\ dsp/basebandsamplesink.h\