mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
RxTx semantic move: renamed SampleFifo to SampleSinkFifo
This commit is contained in:
parent
12ac603741
commit
36aeaa3ea5
@ -114,7 +114,7 @@ set(sdrbase_SOURCES
|
|||||||
sdrbase/dsp/nco.cpp
|
sdrbase/dsp/nco.cpp
|
||||||
sdrbase/dsp/pidcontroller.cpp
|
sdrbase/dsp/pidcontroller.cpp
|
||||||
sdrbase/dsp/phaselock.cpp
|
sdrbase/dsp/phaselock.cpp
|
||||||
sdrbase/dsp/samplefifo.cpp
|
sdrbase/dsp/samplesinkfifo.cpp
|
||||||
sdrbase/dsp/samplesinkfifodoublebuffered.cpp
|
sdrbase/dsp/samplesinkfifodoublebuffered.cpp
|
||||||
sdrbase/dsp/basebandsamplesink.cpp
|
sdrbase/dsp/basebandsamplesink.cpp
|
||||||
sdrbase/dsp/nullsink.cpp
|
sdrbase/dsp/nullsink.cpp
|
||||||
@ -205,7 +205,7 @@ set(sdrbase_HEADERS
|
|||||||
sdrbase/dsp/phasediscri.h
|
sdrbase/dsp/phasediscri.h
|
||||||
sdrbase/dsp/phaselock.h
|
sdrbase/dsp/phaselock.h
|
||||||
sdrbase/dsp/pidcontroller.h
|
sdrbase/dsp/pidcontroller.h
|
||||||
sdrbase/dsp/samplefifo.h
|
sdrbase/dsp/samplesinkfifo.h
|
||||||
sdrbase/dsp/samplesinkfifodoublebuffered.h
|
sdrbase/dsp/samplesinkfifodoublebuffered.h
|
||||||
sdrbase/dsp/samplesinkfifodecimator.h
|
sdrbase/dsp/samplesinkfifodecimator.h
|
||||||
sdrbase/dsp/basebandsamplesink.h
|
sdrbase/dsp/basebandsamplesink.h
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "airspythread.h"
|
#include "airspythread.h"
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
|
|
||||||
AirspyThread *AirspyThread::m_this = 0;
|
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),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_dev(dev),
|
m_dev(dev),
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <libairspy/airspy.h>
|
#include <libairspy/airspy.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "dsp/decimators.h"
|
#include "dsp/decimators.h"
|
||||||
|
|
||||||
#define AIRSPY_BLOCKSIZE (1<<17)
|
#define AIRSPY_BLOCKSIZE (1<<17)
|
||||||
@ -30,7 +31,7 @@ class AirspyThread : public QThread {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AirspyThread(struct airspy_device* dev, SampleFifo* sampleFifo, QObject* parent = NULL);
|
AirspyThread(struct airspy_device* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~AirspyThread();
|
~AirspyThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -47,7 +48,7 @@ private:
|
|||||||
struct airspy_device* m_dev;
|
struct airspy_device* m_dev;
|
||||||
qint16 m_buf[2*AIRSPY_BLOCKSIZE];
|
qint16 m_buf[2*AIRSPY_BLOCKSIZE];
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "bladerfthread.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),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_dev(dev),
|
m_dev(dev),
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <libbladeRF.h>
|
#include <libbladeRF.h>
|
||||||
#include "dsp/samplefifo.h"
|
#include "dsp/samplesinkfifo.h"
|
||||||
//#include "dsp/inthalfbandfilter.h"
|
//#include "dsp/inthalfbandfilter.h"
|
||||||
#include "dsp/decimators.h"
|
#include "dsp/decimators.h"
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class BladerfThread : public QThread {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BladerfThread(struct bladerf* dev, SampleFifo* sampleFifo, QObject* parent = NULL);
|
BladerfThread(struct bladerf* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~BladerfThread();
|
~BladerfThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -48,7 +48,7 @@ private:
|
|||||||
struct bladerf* m_dev;
|
struct bladerf* m_dev;
|
||||||
qint16 m_buf[2*BLADERF_BLOCKSIZE];
|
qint16 m_buf[2*BLADERF_BLOCKSIZE];
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "fcdprothread.h"
|
#include "fcdprothread.h"
|
||||||
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "fcdtraits.h"
|
#include "fcdtraits.h"
|
||||||
|
|
||||||
FCDProThread::FCDProThread(SampleFifo* sampleFifo, QObject* parent) :
|
FCDProThread::FCDProThread(SampleSinkFifo* sampleFifo, QObject* parent) :
|
||||||
QThread(parent),
|
QThread(parent),
|
||||||
fcd_handle(NULL),
|
fcd_handle(NULL),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
|
@ -20,15 +20,15 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "dsp/inthalfbandfilter.h"
|
#include "dsp/inthalfbandfilter.h"
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
|
|
||||||
class FCDProThread : public QThread {
|
class FCDProThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FCDProThread(SampleFifo* sampleFifo, QObject* parent = NULL);
|
FCDProThread(SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~FCDProThread();
|
~FCDProThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -44,7 +44,7 @@ private:
|
|||||||
bool m_running;
|
bool m_running;
|
||||||
|
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
int work(int n_items);
|
int work(int n_items);
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "fcdproplusreader.h"
|
#include "fcdproplusreader.h"
|
||||||
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "fcdtraits.h"
|
#include "fcdtraits.h"
|
||||||
|
|
||||||
FCDProPlusReader::FCDProPlusReader(SampleFifo* sampleFifo, QObject* parent) :
|
FCDProPlusReader::FCDProPlusReader(SampleSinkFifo* sampleFifo, QObject* parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_fcdAudioInput(0),
|
m_fcdAudioInput(0),
|
||||||
m_fcdInput(0),
|
m_fcdInput(0),
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
#include "dsp/samplefifo.h"
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "dsp/inthalfbandfilter.h"
|
#include "dsp/inthalfbandfilter.h"
|
||||||
|
|
||||||
class QAudioInput;
|
class QAudioInput;
|
||||||
@ -33,7 +33,7 @@ class FCDProPlusReader : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FCDProPlusReader(SampleFifo* sampleFifo, QObject* parent = NULL);
|
FCDProPlusReader(SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~FCDProPlusReader();
|
~FCDProPlusReader();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -49,7 +49,7 @@ private:
|
|||||||
|
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
QByteArray m_fcdBuffer;
|
QByteArray m_fcdBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
void openFcdAudio(const QAudioDeviceInfo& fcdAudioDeviceInfo);
|
void openFcdAudio(const QAudioDeviceInfo& fcdAudioDeviceInfo);
|
||||||
|
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "fcdproplusthread.h"
|
#include "fcdproplusthread.h"
|
||||||
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "fcdtraits.h"
|
#include "fcdtraits.h"
|
||||||
|
|
||||||
FCDProPlusThread::FCDProPlusThread(SampleFifo* sampleFifo, QObject* parent) :
|
FCDProPlusThread::FCDProPlusThread(SampleSinkFifo* sampleFifo, QObject* parent) :
|
||||||
QThread(parent),
|
QThread(parent),
|
||||||
fcd_handle(NULL),
|
fcd_handle(NULL),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
|
@ -21,15 +21,15 @@
|
|||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "dsp/inthalfbandfilter.h"
|
#include "dsp/inthalfbandfilter.h"
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
|
|
||||||
class FCDProPlusThread : public QThread {
|
class FCDProPlusThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FCDProPlusThread(SampleFifo* sampleFifo, QObject* parent = NULL);
|
FCDProPlusThread(SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~FCDProPlusThread();
|
~FCDProPlusThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -45,7 +45,7 @@ private:
|
|||||||
bool m_running;
|
bool m_running;
|
||||||
|
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
int work(int n_items);
|
int work(int n_items);
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "filesourcethread.h"
|
#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),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_ifstream(samplesStream),
|
m_ifstream(samplesStream),
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "dsp/inthalfbandfilter.h"
|
#include "dsp/inthalfbandfilter.h"
|
||||||
|
|
||||||
#define FILESOURCE_THROTTLE_MS 50
|
#define FILESOURCE_THROTTLE_MS 50
|
||||||
@ -34,7 +35,7 @@ class FileSourceThread : public QThread {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileSourceThread(std::ifstream *samplesStream, SampleFifo* sampleFifo, QObject* parent = NULL);
|
FileSourceThread(std::ifstream *samplesStream, SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~FileSourceThread();
|
~FileSourceThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -56,7 +57,7 @@ private:
|
|||||||
quint8 *m_buf;
|
quint8 *m_buf;
|
||||||
std::size_t m_bufsize;
|
std::size_t m_bufsize;
|
||||||
std::size_t m_chunksize;
|
std::size_t m_chunksize;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
std::size_t m_samplesCount;
|
std::size_t m_samplesCount;
|
||||||
|
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "hackrfthread.h"
|
#include "hackrfthread.h"
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
|
|
||||||
HackRFThread *HackRFThread::m_this = 0;
|
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),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_dev(dev),
|
m_dev(dev),
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <libhackrf/hackrf.h>
|
#include <libhackrf/hackrf.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "dsp/decimators.h"
|
#include "dsp/decimators.h"
|
||||||
|
|
||||||
#define HACKRF_BLOCKSIZE (1<<17)
|
#define HACKRF_BLOCKSIZE (1<<17)
|
||||||
@ -30,7 +31,7 @@ class HackRFThread : public QThread {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HackRFThread(hackrf_device* dev, SampleFifo* sampleFifo, QObject* parent = NULL);
|
HackRFThread(hackrf_device* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~HackRFThread();
|
~HackRFThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -47,7 +48,7 @@ private:
|
|||||||
hackrf_device* m_dev;
|
hackrf_device* m_dev;
|
||||||
qint16 m_buf[2*HACKRF_BLOCKSIZE];
|
qint16 m_buf[2*HACKRF_BLOCKSIZE];
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "rtlsdrthread.h"
|
#include "rtlsdrthread.h"
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
|
|
||||||
#define FCD_BLOCKSIZE 16384
|
#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),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_dev(dev),
|
m_dev(dev),
|
||||||
|
@ -22,15 +22,15 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QWaitCondition>
|
#include <QWaitCondition>
|
||||||
#include <rtl-sdr.h>
|
#include <rtl-sdr.h>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
//#include "dsp/inthalfbandfilter.h"
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "dsp/decimators.h"
|
#include "dsp/decimators.h"
|
||||||
|
|
||||||
class RTLSDRThread : public QThread {
|
class RTLSDRThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RTLSDRThread(rtlsdr_dev_t* dev, SampleFifo* sampleFifo, QObject* parent = NULL);
|
RTLSDRThread(rtlsdr_dev_t* dev, SampleSinkFifo* sampleFifo, QObject* parent = NULL);
|
||||||
~RTLSDRThread();
|
~RTLSDRThread();
|
||||||
|
|
||||||
void startWork();
|
void startWork();
|
||||||
@ -46,7 +46,7 @@ private:
|
|||||||
|
|
||||||
rtlsdr_dev_t* m_dev;
|
rtlsdr_dev_t* m_dev;
|
||||||
SampleVector m_convertBuffer;
|
SampleVector m_convertBuffer;
|
||||||
SampleFifo* m_sampleFifo;
|
SampleSinkFifo* m_sampleFifo;
|
||||||
|
|
||||||
int m_samplerate;
|
int m_samplerate;
|
||||||
unsigned int m_log2Decim;
|
unsigned int m_log2Decim;
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <lz4.h>
|
#include <lz4.h>
|
||||||
|
#include "../../../sdrbase/dsp/samplesinkfifo.h"
|
||||||
#include "util/CRC64.h"
|
#include "util/CRC64.h"
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
|
||||||
class SDRdaemonBufferOld
|
class SDRdaemonBufferOld
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "sdrdaemonudphandler.h"
|
#include "sdrdaemonudphandler.h"
|
||||||
#include "sdrdaemoninput.h"
|
#include "sdrdaemoninput.h"
|
||||||
|
|
||||||
SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) :
|
SDRdaemonUDPHandler::SDRdaemonUDPHandler(SampleSinkFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) :
|
||||||
m_deviceAPI(devieAPI),
|
m_deviceAPI(devieAPI),
|
||||||
m_sdrDaemonBuffer(m_rateDivider),
|
m_sdrDaemonBuffer(m_rateDivider),
|
||||||
m_dataSocket(0),
|
m_dataSocket(0),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#define SDRDAEMON_THROTTLE_MS 50
|
#define SDRDAEMON_THROTTLE_MS 50
|
||||||
|
|
||||||
class SampleFifo;
|
class SampleSinkFifo;
|
||||||
class MessageQueue;
|
class MessageQueue;
|
||||||
class QTimer;
|
class QTimer;
|
||||||
class DeviceAPI;
|
class DeviceAPI;
|
||||||
@ -36,7 +36,7 @@ class SDRdaemonUDPHandler : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SDRdaemonUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI);
|
SDRdaemonUDPHandler(SampleSinkFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI);
|
||||||
~SDRdaemonUDPHandler();
|
~SDRdaemonUDPHandler();
|
||||||
void connectTimer(const QTimer* timer);
|
void connectTimer(const QTimer* timer);
|
||||||
void start();
|
void start();
|
||||||
@ -59,7 +59,7 @@ private:
|
|||||||
bool m_dataConnected;
|
bool m_dataConnected;
|
||||||
char *m_udpBuf;
|
char *m_udpBuf;
|
||||||
qint64 m_udpReadBytes;
|
qint64 m_udpReadBytes;
|
||||||
SampleFifo *m_sampleFifo;
|
SampleSinkFifo *m_sampleFifo;
|
||||||
uint32_t m_samplerate;
|
uint32_t m_samplerate;
|
||||||
uint32_t m_centerFrequency;
|
uint32_t m_centerFrequency;
|
||||||
uint32_t m_tv_sec;
|
uint32_t m_tv_sec;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "sdrdaemonfecinput.h"
|
#include "sdrdaemonfecinput.h"
|
||||||
#include "sdrdaemonfecudphandler.h"
|
#include "sdrdaemonfecudphandler.h"
|
||||||
|
|
||||||
SDRdaemonFECUDPHandler::SDRdaemonFECUDPHandler(SampleFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) :
|
SDRdaemonFECUDPHandler::SDRdaemonFECUDPHandler(SampleSinkFifo *sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *devieAPI) :
|
||||||
m_deviceAPI(devieAPI),
|
m_deviceAPI(devieAPI),
|
||||||
m_sdrDaemonBuffer(m_rateDivider),
|
m_sdrDaemonBuffer(m_rateDivider),
|
||||||
m_dataSocket(0),
|
m_dataSocket(0),
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#define SDRDAEMONFEC_THROTTLE_MS 50
|
#define SDRDAEMONFEC_THROTTLE_MS 50
|
||||||
|
|
||||||
class SampleFifo;
|
class SampleSinkFifo;
|
||||||
class MessageQueue;
|
class MessageQueue;
|
||||||
class QTimer;
|
class QTimer;
|
||||||
class DeviceAPI;
|
class DeviceAPI;
|
||||||
@ -36,7 +36,7 @@ class SDRdaemonFECUDPHandler : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SDRdaemonFECUDPHandler(SampleFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI);
|
SDRdaemonFECUDPHandler(SampleSinkFifo* sampleFifo, MessageQueue *outputMessageQueueToGUI, DeviceAPI *deviceAPI);
|
||||||
~SDRdaemonFECUDPHandler();
|
~SDRdaemonFECUDPHandler();
|
||||||
void connectTimer(const QTimer* timer);
|
void connectTimer(const QTimer* timer);
|
||||||
void start();
|
void start();
|
||||||
@ -57,7 +57,7 @@ private:
|
|||||||
bool m_dataConnected;
|
bool m_dataConnected;
|
||||||
char *m_udpBuf;
|
char *m_udpBuf;
|
||||||
qint64 m_udpReadBytes;
|
qint64 m_udpReadBytes;
|
||||||
SampleFifo *m_sampleFifo;
|
SampleSinkFifo *m_sampleFifo;
|
||||||
uint32_t m_samplerate;
|
uint32_t m_samplerate;
|
||||||
uint32_t m_centerFrequency;
|
uint32_t m_centerFrequency;
|
||||||
uint32_t m_tv_sec;
|
uint32_t m_tv_sec;
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
#define INCLUDE_SAMPLESOURCE_H
|
#define INCLUDE_SAMPLESOURCE_H
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "samplesinkfifo.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
#include "util/messagequeue.h"
|
#include "util/messagequeue.h"
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
@ -42,13 +43,13 @@ public:
|
|||||||
|
|
||||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
MessageQueue *getOutputMessageQueueToGUI() { return &m_outputMessageQueueToGUI; }
|
MessageQueue *getOutputMessageQueueToGUI() { return &m_outputMessageQueueToGUI; }
|
||||||
SampleFifo* getSampleFifo() { return &m_sampleFifo; }
|
SampleSinkFifo* getSampleFifo() { return &m_sampleFifo; }
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SampleFifo m_sampleFifo;
|
SampleSinkFifo m_sampleFifo;
|
||||||
MessageQueue m_inputMessageQueue; //!< Input queue to the source
|
MessageQueue m_inputMessageQueue; //!< Input queue to the source
|
||||||
MessageQueue m_outputMessageQueueToGUI; //!< Output queue specialized for the source GUI
|
MessageQueue m_outputMessageQueueToGUI; //!< Output queue specialized for the source GUI
|
||||||
};
|
};
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#include <dsp/downchannelizer.h>
|
#include <dsp/downchannelizer.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
|
#include "samplesinkfifo.h"
|
||||||
#include "threadedbasebandsamplesink.h"
|
#include "threadedbasebandsamplesink.h"
|
||||||
|
|
||||||
DSPDeviceSourceEngine::DSPDeviceSourceEngine(uint uid, QObject* parent) :
|
DSPDeviceSourceEngine::DSPDeviceSourceEngine(uint uid, QObject* parent) :
|
||||||
@ -242,7 +242,7 @@ void DSPDeviceSourceEngine::imbalance(SampleVector::iterator begin, SampleVector
|
|||||||
|
|
||||||
void DSPDeviceSourceEngine::work()
|
void DSPDeviceSourceEngine::work()
|
||||||
{
|
{
|
||||||
SampleFifo* sampleFifo = m_deviceSampleSource->getSampleFifo();
|
SampleSinkFifo* sampleFifo = m_deviceSampleSource->getSampleFifo();
|
||||||
std::size_t samplesDone = 0;
|
std::size_t samplesDone = 0;
|
||||||
bool positiveOnly = false;
|
bool positiveOnly = false;
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "dsp/samplefifo.h"
|
#include "samplesinkfifo.h"
|
||||||
|
|
||||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||||
|
|
||||||
void SampleFifo::create(uint s)
|
void SampleSinkFifo::create(uint s)
|
||||||
{
|
{
|
||||||
m_size = 0;
|
m_size = 0;
|
||||||
m_fill = 0;
|
m_fill = 0;
|
||||||
@ -33,7 +33,7 @@ void SampleFifo::create(uint s)
|
|||||||
qCritical("SampleFifo: out of memory");
|
qCritical("SampleFifo: out of memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
SampleFifo::SampleFifo(QObject* parent) :
|
SampleSinkFifo::SampleSinkFifo(QObject* parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_data()
|
m_data()
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ SampleFifo::SampleFifo(QObject* parent) :
|
|||||||
m_tail = 0;
|
m_tail = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SampleFifo::SampleFifo(int size, QObject* parent) :
|
SampleSinkFifo::SampleSinkFifo(int size, QObject* parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_data()
|
m_data()
|
||||||
{
|
{
|
||||||
@ -53,21 +53,21 @@ SampleFifo::SampleFifo(int size, QObject* parent) :
|
|||||||
create(size);
|
create(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
SampleFifo::~SampleFifo()
|
SampleSinkFifo::~SampleSinkFifo()
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
||||||
m_size = 0;
|
m_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SampleFifo::setSize(int size)
|
bool SampleSinkFifo::setSize(int size)
|
||||||
{
|
{
|
||||||
create(size);
|
create(size);
|
||||||
|
|
||||||
return m_data.size() == (uint)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);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
uint total;
|
uint total;
|
||||||
@ -110,7 +110,7 @@ uint SampleFifo::write(const quint8* data, uint count)
|
|||||||
return total;
|
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);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
uint count = end - begin;
|
uint count = end - begin;
|
||||||
@ -152,7 +152,7 @@ uint SampleFifo::write(SampleVector::const_iterator begin, SampleVector::const_i
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint SampleFifo::read(SampleVector::iterator begin, SampleVector::iterator end)
|
uint SampleSinkFifo::read(SampleVector::iterator begin, SampleVector::iterator end)
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
uint count = end - begin;
|
uint count = end - begin;
|
||||||
@ -178,7 +178,7 @@ uint SampleFifo::read(SampleVector::iterator begin, SampleVector::iterator end)
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint SampleFifo::readBegin(uint count,
|
uint SampleSinkFifo::readBegin(uint count,
|
||||||
SampleVector::iterator* part1Begin, SampleVector::iterator* part1End,
|
SampleVector::iterator* part1Begin, SampleVector::iterator* part1End,
|
||||||
SampleVector::iterator* part2Begin, SampleVector::iterator* part2End)
|
SampleVector::iterator* part2Begin, SampleVector::iterator* part2End)
|
||||||
{
|
{
|
||||||
@ -216,7 +216,7 @@ uint SampleFifo::readBegin(uint count,
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint SampleFifo::readCommit(uint count)
|
uint SampleSinkFifo::readCommit(uint count)
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
@ -24,7 +24,7 @@
|
|||||||
#include "dsp/dsptypes.h"
|
#include "dsp/dsptypes.h"
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
|
|
||||||
class SDRANGEL_API SampleFifo : public QObject {
|
class SDRANGEL_API SampleSinkFifo : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -42,9 +42,9 @@ private:
|
|||||||
void create(uint s);
|
void create(uint s);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SampleFifo(QObject* parent = NULL);
|
SampleSinkFifo(QObject* parent = NULL);
|
||||||
SampleFifo(int size, QObject* parent = NULL);
|
SampleSinkFifo(int size, QObject* parent = NULL);
|
||||||
~SampleFifo();
|
~SampleSinkFifo();
|
||||||
|
|
||||||
bool setSize(int size);
|
bool setSize(int size);
|
||||||
inline uint size() const { return m_size; }
|
inline uint size() const { return m_size; }
|
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
#include <dsp/basebandsamplesink.h>
|
#include <dsp/basebandsamplesink.h>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "dsp/samplefifo.h"
|
|
||||||
|
#include "samplesinkfifo.h"
|
||||||
#include "util/messagequeue.h"
|
#include "util/messagequeue.h"
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ public:
|
|||||||
void writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end);
|
void writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end);
|
||||||
|
|
||||||
BasebandSampleSink* m_sampleSink;
|
BasebandSampleSink* m_sampleSink;
|
||||||
SampleFifo m_sampleFifo;
|
SampleSinkFifo m_sampleFifo;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void handleFifoData();
|
void handleFifoData();
|
||||||
|
@ -55,7 +55,7 @@ SOURCES += mainwindow.cpp\
|
|||||||
dsp/nco.cpp\
|
dsp/nco.cpp\
|
||||||
dsp/pidcontroller.cpp\
|
dsp/pidcontroller.cpp\
|
||||||
dsp/phaselock.cpp\
|
dsp/phaselock.cpp\
|
||||||
dsp/samplefifo.cpp\
|
dsp/samplesinkfifo.cpp\
|
||||||
dsp/samplesinkfifodoublebuffered.cpp\
|
dsp/samplesinkfifodoublebuffered.cpp\
|
||||||
dsp/basebandsamplesink.cpp\
|
dsp/basebandsamplesink.cpp\
|
||||||
dsp/nullsink.cpp\
|
dsp/nullsink.cpp\
|
||||||
@ -136,7 +136,7 @@ HEADERS += mainwindow.h\
|
|||||||
dsp/phasediscri.h\
|
dsp/phasediscri.h\
|
||||||
dsp/phaselock.h\
|
dsp/phaselock.h\
|
||||||
dsp/pidcontroller.h\
|
dsp/pidcontroller.h\
|
||||||
dsp/samplefifo.h\
|
dsp/samplesinkfifo.h\
|
||||||
dsp/samplesinkfifodoublebuffered.h\
|
dsp/samplesinkfifodoublebuffered.h\
|
||||||
dsp/samplesinkfifodecimator.h\
|
dsp/samplesinkfifodecimator.h\
|
||||||
dsp/basebandsamplesink.h\
|
dsp/basebandsamplesink.h\
|
||||||
|
Loading…
Reference in New Issue
Block a user