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

RxTx semantic move: renamed SampleSink to BasebandSampleSink

This commit is contained in:
f4exb 2016-10-02 22:29:04 +02:00
parent 20c6fb19cc
commit 78513854ac
38 changed files with 103 additions and 103 deletions

View File

@ -115,7 +115,7 @@ set(sdrbase_SOURCES
sdrbase/dsp/pidcontroller.cpp
sdrbase/dsp/phaselock.cpp
sdrbase/dsp/samplefifo.cpp
sdrbase/dsp/samplesink.cpp
sdrbase/dsp/basebandsamplesink.cpp
sdrbase/dsp/nullsink.cpp
sdrbase/dsp/spectrumscopecombovis.cpp
sdrbase/dsp/scopevis.cpp
@ -205,7 +205,7 @@ set(sdrbase_HEADERS
sdrbase/dsp/phaselock.h
sdrbase/dsp/pidcontroller.h
sdrbase/dsp/samplefifo.h
sdrbase/dsp/samplesink.h
sdrbase/dsp/basebandsamplesink.h
sdrbase/dsp/nullsink.h
sdrbase/dsp/scopevis.h
sdrbase/dsp/spectrumvis.h

View File

@ -25,7 +25,7 @@
MESSAGE_CLASS_DEFINITION(ChannelAnalyzer::MsgConfigureChannelAnalyzer, Message)
ChannelAnalyzer::ChannelAnalyzer(SampleSink* sampleSink) :
ChannelAnalyzer::ChannelAnalyzer(BasebandSampleSink* sampleSink) :
m_sampleSink(sampleSink),
m_settingsMutex(QMutex::Recursive)
{

View File

@ -17,9 +17,9 @@
#ifndef INCLUDE_CHANALYZER_H
#define INCLUDE_CHANALYZER_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/fftfilt.h"
#include "audio/audiofifo.h"
@ -27,9 +27,9 @@
#define ssbFftLen 1024
class ChannelAnalyzer : public SampleSink {
class ChannelAnalyzer : public BasebandSampleSink {
public:
ChannelAnalyzer(SampleSink* m_sampleSink);
ChannelAnalyzer(BasebandSampleSink* m_sampleSink);
virtual ~ChannelAnalyzer();
void configure(MessageQueue* messageQueue,
@ -98,7 +98,7 @@ private:
fftfilt* SSBFilter;
fftfilt* DSBFilter;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
SampleVector m_sampleBuffer;
QMutex m_settingsMutex;
};

View File

@ -17,9 +17,9 @@
#ifndef INCLUDE_AMDEMOD_H
#define INCLUDE_AMDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/lowpass.h"
@ -28,7 +28,7 @@
#include "audio/audiofifo.h"
#include "util/message.h"
class AMDemod : public SampleSink {
class AMDemod : public BasebandSampleSink {
Q_OBJECT
public:
AMDemod();

View File

@ -34,7 +34,7 @@ MESSAGE_CLASS_DEFINITION(BFMDemod::MsgConfigureBFMDemod, Message)
const Real BFMDemod::default_deemphasis = 50.0; // 50 us
BFMDemod::BFMDemod(SampleSink* sampleSink, RDSParser *rdsParser) :
BFMDemod::BFMDemod(BasebandSampleSink* sampleSink, RDSParser *rdsParser) :
m_sampleSink(sampleSink),
m_rdsParser(rdsParser),
m_audioFifo(4, 250000),

View File

@ -18,9 +18,9 @@
#ifndef INCLUDE_BFMDEMOD_H
#define INCLUDE_BFMDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/lowpass.h"
@ -37,9 +37,9 @@
class RDSParser;
class BFMDemod : public SampleSink {
class BFMDemod : public BasebandSampleSink {
public:
BFMDemod(SampleSink* sampleSink, RDSParser* rdsParser);
BFMDemod(BasebandSampleSink* sampleSink, RDSParser* rdsParser);
virtual ~BFMDemod();
void configure(MessageQueue* messageQueue,
@ -201,7 +201,7 @@ private:
AudioVector m_audioBuffer;
uint m_audioBufferFill;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
AudioFifo m_audioFifo;
SampleVector m_sampleBuffer;
QMutex m_settingsMutex;

View File

@ -32,7 +32,7 @@ static const Real afSqTones[2] = {1200.0, 6400.0}; // {1200.0, 8000.0};
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message)
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message)
DSDDemod::DSDDemod(SampleSink* sampleSink) :
DSDDemod::DSDDemod(BasebandSampleSink* sampleSink) :
m_sampleCount(0),
m_squelchCount(0),
m_squelchOpen(false),

View File

@ -18,10 +18,10 @@
#ifndef INCLUDE_DSDDEMOD_H
#define INCLUDE_DSDDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <dsp/phasediscri.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/lowpass.h"
@ -36,9 +36,9 @@
class DSDDemodGUI;
class DSDDemod : public SampleSink {
class DSDDemod : public BasebandSampleSink {
public:
DSDDemod(SampleSink* sampleSink);
DSDDemod(BasebandSampleSink* sampleSink);
~DSDDemod();
void configure(MessageQueue* messageQueue,
@ -264,7 +264,7 @@ private:
AudioFifo m_audioFifo1;
AudioFifo m_audioFifo2;
SampleSink* m_scope;
BasebandSampleSink* m_scope;
bool m_scopeEnabled;
DSDDecoder m_dsdDecoder;

View File

@ -26,7 +26,7 @@
MESSAGE_CLASS_DEFINITION(LoRaDemod::MsgConfigureLoRaDemod, Message)
LoRaDemod::LoRaDemod(SampleSink* sampleSink) :
LoRaDemod::LoRaDemod(BasebandSampleSink* sampleSink) :
m_sampleSink(sampleSink),
m_settingsMutex(QMutex::Recursive)
{

View File

@ -18,9 +18,9 @@
#ifndef INCLUDE_LoRaDEMOD_H
#define INCLUDE_LoRaDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "util/message.h"
@ -32,9 +32,9 @@
#define LORA_SFFT_LEN (SPREADFACTOR / 2)
#define LORA_SQUELCH (3)
class LoRaDemod : public SampleSink {
class LoRaDemod : public BasebandSampleSink {
public:
LoRaDemod(SampleSink* sampleSink);
LoRaDemod(BasebandSampleSink* sampleSink);
virtual ~LoRaDemod();
void configure(MessageQueue* messageQueue, Real Bandwidth);
@ -96,7 +96,7 @@ private:
Interpolator m_interpolator;
Real m_sampleDistanceRemain;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
SampleVector m_sampleBuffer;
QMutex m_settingsMutex;
};

View File

@ -18,10 +18,10 @@
#ifndef INCLUDE_NFMDEMOD_H
#define INCLUDE_NFMDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <dsp/phasediscri.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/lowpass.h"
@ -35,7 +35,7 @@
class NFMDemodGUI;
class NFMDemod : public SampleSink {
class NFMDemod : public BasebandSampleSink {
public:
NFMDemod();
~NFMDemod();

View File

@ -27,7 +27,7 @@
MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureSSBDemod, Message)
SSBDemod::SSBDemod(SampleSink* sampleSink) :
SSBDemod::SSBDemod(BasebandSampleSink* sampleSink) :
m_sampleSink(sampleSink),
m_audioFifo(4, 24000),
m_settingsMutex(QMutex::Recursive),

View File

@ -18,9 +18,9 @@
#ifndef INCLUDE_SSBDEMOD_H
#define INCLUDE_SSBDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/fftfilt.h"
@ -29,9 +29,9 @@
#define ssbFftLen 1024
class SSBDemod : public SampleSink {
class SSBDemod : public BasebandSampleSink {
public:
SSBDemod(SampleSink* sampleSink);
SSBDemod(BasebandSampleSink* sampleSink);
virtual ~SSBDemod();
void configure(MessageQueue* messageQueue,
@ -135,7 +135,7 @@ private:
fftfilt* SSBFilter;
fftfilt* DSBFilter;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
SampleVector m_sampleBuffer;
AudioVector m_audioBuffer;

View File

@ -28,7 +28,7 @@
MESSAGE_CLASS_DEFINITION(WFMDemod::MsgConfigureWFMDemod, Message)
WFMDemod::WFMDemod(SampleSink* sampleSink) :
WFMDemod::WFMDemod(BasebandSampleSink* sampleSink) :
m_sampleSink(sampleSink),
m_audioFifo(4, 250000),
m_settingsMutex(QMutex::Recursive)

View File

@ -18,9 +18,9 @@
#ifndef INCLUDE_WFMDEMOD_H
#define INCLUDE_WFMDEMOD_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <vector>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/interpolator.h"
#include "dsp/lowpass.h"
@ -32,9 +32,9 @@
#define rfFilterFftLength 1024
class WFMDemod : public SampleSink {
class WFMDemod : public BasebandSampleSink {
public:
WFMDemod(SampleSink* sampleSink);
WFMDemod(BasebandSampleSink* sampleSink);
virtual ~WFMDemod();
void configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, Real volume, Real squelch);
@ -127,7 +127,7 @@ private:
AudioVector m_audioBuffer;
uint m_audioBufferFill;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
AudioFifo m_audioFifo;
SampleVector m_sampleBuffer;
QMutex m_settingsMutex;

View File

@ -26,7 +26,7 @@ MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcConfigure, Message)
MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcConnection, Message)
MESSAGE_CLASS_DEFINITION(TCPSrc::MsgTCPSrcSpectrum, Message)
TCPSrc::TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, SampleSink* spectrum) :
TCPSrc::TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, BasebandSampleSink* spectrum) :
m_settingsMutex(QMutex::Recursive)
{
setObjectName("TCPSrc");

View File

@ -1,9 +1,9 @@
#ifndef INCLUDE_TCPSRC_H
#define INCLUDE_TCPSRC_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <QHostAddress>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/fftfilt.h"
#include "dsp/interpolator.h"
@ -15,7 +15,7 @@ class QTcpServer;
class QTcpSocket;
class TCPSrcGUI;
class TCPSrc : public SampleSink {
class TCPSrc : public BasebandSampleSink {
Q_OBJECT
public:
@ -26,7 +26,7 @@ public:
FormatNone
};
TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, SampleSink* spectrum);
TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, BasebandSampleSink* spectrum);
virtual ~TCPSrc();
void configure(MessageQueue* messageQueue, SampleFormat sampleFormat, Real outputSampleRate, Real rfBandwidth, int tcpPort, int boost);
@ -160,7 +160,7 @@ protected:
SampleVector m_sampleBuffer;
SampleVector m_sampleBufferSSB;
SampleSink* m_spectrum;
BasebandSampleSink* m_spectrum;
bool m_spectrumEnabled;
QTcpServer* m_tcpServer;

View File

@ -29,7 +29,7 @@ MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcConfigure, Message)
MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcConfigureImmediate, Message)
MESSAGE_CLASS_DEFINITION(UDPSrc::MsgUDPSrcSpectrum, Message)
UDPSrc::UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, SampleSink* spectrum) :
UDPSrc::UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, BasebandSampleSink* spectrum) :
m_settingsMutex(QMutex::Recursive),
m_udpPort(9999),
m_audioFifo(4, 24000),

View File

@ -18,9 +18,9 @@
#ifndef INCLUDE_UDPSRC_H
#define INCLUDE_UDPSRC_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include <QHostAddress>
#include "dsp/samplesink.h"
#include "dsp/nco.h"
#include "dsp/fftfilt.h"
#include "dsp/interpolator.h"
@ -33,7 +33,7 @@
class QUdpSocket;
class UDPSrcGUI;
class UDPSrc : public SampleSink {
class UDPSrc : public BasebandSampleSink {
Q_OBJECT
public:
@ -56,7 +56,7 @@ public:
typedef std::vector<AudioSample> AudioVector;
UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, SampleSink* spectrum);
UDPSrc(MessageQueue* uiMessageQueue, UDPSrcGUI* udpSrcGUI, BasebandSampleSink* spectrum);
virtual ~UDPSrc();
void configure(MessageQueue* messageQueue,
@ -239,7 +239,7 @@ protected:
uint m_audioBufferFill;
AudioFifo m_audioFifo;
SampleSink* m_spectrum;
BasebandSampleSink* m_spectrum;
bool m_spectrumEnabled;
quint32 m_nextSSBId;

View File

@ -42,12 +42,12 @@ DeviceAPI::~DeviceAPI()
{
}
void DeviceAPI::addSink(SampleSink *sink)
void DeviceAPI::addSink(BasebandSampleSink *sink)
{
m_deviceEngine->addSink(sink);
}
void DeviceAPI::removeSink(SampleSink* sink)
void DeviceAPI::removeSink(BasebandSampleSink* sink)
{
m_deviceEngine->removeSink(sink);
}

View File

@ -28,7 +28,7 @@ class MainWindow;
class DSPDeviceEngine;
class GLSpectrum;
class ChannelWindow;
class SampleSink;
class BasebandSampleSink;
class ThreadedSampleSink;
class SampleSource;
class MessageQueue;
@ -43,8 +43,8 @@ class SDRANGEL_API DeviceAPI : public QObject {
public:
// Device engine stuff
void addSink(SampleSink* sink); //!< Add a sample sink to device engine
void removeSink(SampleSink* sink); //!< Remove a sample sink from device engine
void addSink(BasebandSampleSink* sink); //!< Add a sample sink to device engine
void removeSink(BasebandSampleSink* sink); //!< Remove a sample sink from device engine
void addThreadedSink(ThreadedSampleSink* sink); //!< Add a sample sink that will run on its own thread to device engine
void removeThreadedSink(ThreadedSampleSink* sink); //!< Remove a sample sink that runs on its own thread from device engine
void setSource(SampleSource* source); //!< Set device engine sample source type

View File

@ -1,16 +1,16 @@
#include "dsp/samplesink.h"
#include <dsp/basebandsamplesink.h>
#include "util/message.h"
SampleSink::SampleSink()
BasebandSampleSink::BasebandSampleSink()
{
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
}
SampleSink::~SampleSink()
BasebandSampleSink::~BasebandSampleSink()
{
}
void SampleSink::handleInputMessages()
void BasebandSampleSink::handleInputMessages()
{
Message* message;

View File

@ -8,11 +8,11 @@
class Message;
class SDRANGEL_API SampleSink : public QObject {
class SDRANGEL_API BasebandSampleSink : public QObject {
Q_OBJECT
public:
SampleSink();
virtual ~SampleSink();
BasebandSampleSink();
virtual ~BasebandSampleSink();
virtual void start() = 0;
virtual void stop() = 0;

View File

@ -7,7 +7,7 @@
MESSAGE_CLASS_DEFINITION(DownChannelizer::MsgChannelizerNotification, Message)
DownChannelizer::DownChannelizer(SampleSink* sampleSink) :
DownChannelizer::DownChannelizer(BasebandSampleSink* sampleSink) :
m_sampleSink(sampleSink),
m_inputSampleRate(0),
m_requestedOutputSampleRate(0),

View File

@ -1,16 +1,16 @@
#ifndef INCLUDE_CHANNELIZER_H
#define INCLUDE_CHANNELIZER_H
#include <dsp/basebandsamplesink.h>
#include <list>
#include <QMutex>
#include "dsp/samplesink.h"
#include "util/export.h"
#include "util/message.h"
class MessageQueue;
class IntHalfbandFilter;
class SDRANGEL_API DownChannelizer : public SampleSink {
class SDRANGEL_API DownChannelizer : public BasebandSampleSink {
Q_OBJECT
public:
class SDRANGEL_API MsgChannelizerNotification : public Message {
@ -31,7 +31,7 @@ public:
qint64 m_frequencyOffset;
};
DownChannelizer(SampleSink* sampleSink);
DownChannelizer(BasebandSampleSink* sampleSink);
virtual ~DownChannelizer();
void configure(MessageQueue* messageQueue, int sampleRate, int centerFrequency);
@ -64,7 +64,7 @@ protected:
};
typedef std::list<FilterStage*> FilterStages;
FilterStages m_filterStages;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
int m_inputSampleRate;
int m_requestedOutputSampleRate;
int m_requestedCenterFrequency;

View File

@ -24,7 +24,7 @@
#include "util/export.h"
class SampleSource;
class SampleSink;
class BasebandSampleSink;
class ThreadedSampleSink;
class AudioFifo;
@ -82,24 +82,24 @@ class SDRANGEL_API DSPAddSink : public Message {
MESSAGE_CLASS_DECLARATION
public:
DSPAddSink(SampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
DSPAddSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
SampleSink* getSampleSink() const { return m_sampleSink; }
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
private:
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
};
class SDRANGEL_API DSPRemoveSink : public Message {
MESSAGE_CLASS_DECLARATION
public:
DSPRemoveSink(SampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
DSPRemoveSink(BasebandSampleSink* sampleSink) : Message(), m_sampleSink(sampleSink) { }
SampleSink* getSampleSink() const { return m_sampleSink; }
BasebandSampleSink* getSampleSink() const { return m_sampleSink; }
private:
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
};
class SDRANGEL_API DSPAddThreadedSampleSink : public Message {

View File

@ -15,12 +15,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <dsp/basebandsamplesink.h>
#include <dsp/downchannelizer.h>
#include <stdio.h>
#include <QDebug>
#include "dsp/dspdeviceengine.h"
#include "dsp/samplefifo.h"
#include "dsp/samplesink.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/dspcommands.h"
#include "dsp/samplesource.h"
@ -118,14 +118,14 @@ void DSPDeviceEngine::setSourceSequence(int sequence)
m_sampleSourceSequence = sequence;
}
void DSPDeviceEngine::addSink(SampleSink* sink)
void DSPDeviceEngine::addSink(BasebandSampleSink* sink)
{
qDebug() << "DSPDeviceEngine::addSink: " << sink->objectName().toStdString().c_str();
DSPAddSink cmd(sink);
m_syncMessenger.sendWait(cmd);
}
void DSPDeviceEngine::removeSink(SampleSink* sink)
void DSPDeviceEngine::removeSink(BasebandSampleSink* sink)
{
qDebug() << "DSPDeviceEngine::removeSink: " << sink->objectName().toStdString().c_str();
DSPRemoveSink cmd(sink);
@ -547,12 +547,12 @@ void DSPDeviceEngine::handleSynchronousMessages()
}
else if (DSPAddSink::match(*message))
{
SampleSink* sink = ((DSPAddSink*) message)->getSampleSink();
BasebandSampleSink* sink = ((DSPAddSink*) message)->getSampleSink();
m_sampleSinks.push_back(sink);
}
else if (DSPRemoveSink::match(*message))
{
SampleSink* sink = ((DSPRemoveSink*) message)->getSampleSink();
BasebandSampleSink* sink = ((DSPRemoveSink*) message)->getSampleSink();
if(m_state == StRunning) {
sink->stop();

View File

@ -30,7 +30,7 @@
#include "util/export.h"
class SampleSource;
class SampleSink;
class BasebandSampleSink;
class ThreadedSampleSink;
class SDRANGEL_API DSPDeviceEngine : public QThread {
@ -63,8 +63,8 @@ public:
void setSource(SampleSource* source); //!< Set the sample source type
void setSourceSequence(int sequence); //!< Set the sample source sequence in type
void addSink(SampleSink* sink); //!< Add a sample sink
void removeSink(SampleSink* sink); //!< Remove a sample sink
void addSink(BasebandSampleSink* sink); //!< Add a sample sink
void removeSink(BasebandSampleSink* sink); //!< Remove a sample sink
void addThreadedSink(ThreadedSampleSink* sink); //!< Add a sample sink that will run on its own thread
void removeThreadedSink(ThreadedSampleSink* sink); //!< Remove a sample sink that runs on its own thread
@ -91,7 +91,7 @@ private:
SampleSource* m_sampleSource;
int m_sampleSourceSequence;
typedef std::list<SampleSink*> SampleSinks;
typedef std::list<BasebandSampleSink*> SampleSinks;
SampleSinks m_sampleSinks; //!< sample sinks within main thread (usually spectrum, file output)
typedef std::list<ThreadedSampleSink*> ThreadedSampleSinks;

View File

@ -6,7 +6,7 @@
#include <QDebug>
FileRecord::FileRecord() :
SampleSink(),
BasebandSampleSink(),
m_fileName(std::string("test.sdriq")),
m_sampleRate(0),
m_centerFrequency(0),
@ -18,7 +18,7 @@ FileRecord::FileRecord() :
}
FileRecord::FileRecord(const std::string& filename) :
SampleSink(),
BasebandSampleSink(),
m_fileName(std::string(filename)),
m_sampleRate(0),
m_centerFrequency(0),

View File

@ -1,17 +1,17 @@
#ifndef INCLUDE_FILESINK_H
#define INCLUDE_FILESINK_H
#include <dsp/basebandsamplesink.h>
#include <string>
#include <iostream>
#include <fstream>
#include <ctime>
#include "dsp/samplesink.h"
#include "util/export.h"
class Message;
class SDRANGEL_API FileRecord : public SampleSink {
class SDRANGEL_API FileRecord : public BasebandSampleSink {
public:
struct Header

View File

@ -1,12 +1,12 @@
#ifndef INCLUDE_NULLSINK_H
#define INCLUDE_NULLSINK_H
#include "dsp/samplesink.h"
#include <dsp/basebandsamplesink.h>
#include "util/export.h"
class Message;
class SDRANGEL_API NullSink : public SampleSink {
class SDRANGEL_API NullSink : public BasebandSampleSink {
public:
NullSink();

View File

@ -2,14 +2,14 @@
#define INCLUDE_SCOPEVIS_H
#include <boost/circular_buffer.hpp>
#include "dsp/samplesink.h"
#include <dsp/basebandsamplesink.h>
#include "util/export.h"
#include "util/message.h"
class GLScope;
class MessageQueue;
class SDRANGEL_API ScopeVis : public SampleSink {
class SDRANGEL_API ScopeVis : public BasebandSampleSink {
public:
enum TriggerChannel {
TriggerFreeRun,

View File

@ -1,14 +1,14 @@
#ifndef INCLUDE_SPECTRUMSCOPECOMBOVIS_H
#define INCLUDE_SPECTRUMSCOPECOMBOVIS_H
#include "dsp/samplesink.h"
#include <dsp/basebandsamplesink.h>
#include "dsp/spectrumvis.h"
#include "dsp/scopevis.h"
#include "util/export.h"
class Message;
class SDRANGEL_API SpectrumScopeComboVis : public SampleSink {
class SDRANGEL_API SpectrumScopeComboVis : public BasebandSampleSink {
public:
SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis);

View File

@ -15,7 +15,7 @@ inline double log2f(double n)
MESSAGE_CLASS_DEFINITION(SpectrumVis::MsgConfigureSpectrumVis, Message)
SpectrumVis::SpectrumVis(GLSpectrum* glSpectrum) :
SampleSink(),
BasebandSampleSink(),
m_fft(FFTEngine::create()),
m_fftBuffer(MAX_FFT_SIZE),
m_logPowerSpectrum(MAX_FFT_SIZE),

View File

@ -1,8 +1,8 @@
#ifndef INCLUDE_SPECTRUMVIS_H
#define INCLUDE_SPECTRUMVIS_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include "dsp/samplesink.h"
#include "dsp/fftengine.h"
#include "fftwindow.h"
#include "util/export.h"
@ -11,7 +11,7 @@
class GLSpectrum;
class MessageQueue;
class SDRANGEL_API SpectrumVis : public SampleSink {
class SDRANGEL_API SpectrumVis : public BasebandSampleSink {
public:
class SDRANGEL_API MsgConfigureSpectrumVis : public Message {

View File

@ -4,7 +4,7 @@
#include "dsp/dspcommands.h"
#include "util/message.h"
ThreadedSampleFifo::ThreadedSampleFifo(SampleSink *sampleSink, std::size_t size) :
ThreadedSampleFifo::ThreadedSampleFifo(BasebandSampleSink *sampleSink, std::size_t size) :
m_sampleSink(sampleSink)
{
connect(&m_sampleFifo, SIGNAL(dataReady()), this, SLOT(handleFifoData()));
@ -62,7 +62,7 @@ void ThreadedSampleFifo::handleFifoData() // FIXME: Fixed? Move it to the new th
}
}
ThreadedSampleSink::ThreadedSampleSink(SampleSink* sampleSink, QObject *parent) :
ThreadedSampleSink::ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *parent) :
m_sampleSink(sampleSink)
{
QString name = "ThreadedSampleSink(" + m_sampleSink->objectName() + ")";

View File

@ -18,13 +18,13 @@
#ifndef INCLUDE_THREADEDSAMPLESINK_H
#define INCLUDE_THREADEDSAMPLESINK_H
#include <dsp/basebandsamplesink.h>
#include <QMutex>
#include "samplesink.h"
#include "dsp/samplefifo.h"
#include "util/messagequeue.h"
#include "util/export.h"
class SampleSink;
class BasebandSampleSink;
class QThread;
/**
@ -35,11 +35,11 @@ class ThreadedSampleFifo : public QObject {
Q_OBJECT
public:
ThreadedSampleFifo(SampleSink* sampleSink, std::size_t size = 1<<18);
ThreadedSampleFifo(BasebandSampleSink* sampleSink, std::size_t size = 1<<18);
~ThreadedSampleFifo();
void writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end);
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
SampleFifo m_sampleFifo;
public slots:
@ -53,10 +53,10 @@ class SDRANGEL_API ThreadedSampleSink : public QObject {
Q_OBJECT
public:
ThreadedSampleSink(SampleSink* sampleSink, QObject *parent = 0);
ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *parent = 0);
~ThreadedSampleSink();
const SampleSink *getSink() const { return m_sampleSink; }
const BasebandSampleSink *getSink() const { return m_sampleSink; }
MessageQueue* getInputMessageQueue() { return m_sampleSink->getInputMessageQueue(); } //!< Return pointer to sample sink's input message queue
MessageQueue* getOutputMessageQueue() { return m_sampleSink->getOutputMessageQueue(); } //!< Return pointer to sample sink's output message queue
@ -72,7 +72,7 @@ protected:
QThread *m_thread; //!< The thead object
ThreadedSampleFifo *m_threadedSampleFifo;
SampleSink* m_sampleSink;
BasebandSampleSink* m_sampleSink;
};
#endif // INCLUDE_THREADEDSAMPLESINK_H

View File

@ -56,7 +56,7 @@ SOURCES += mainwindow.cpp\
dsp/pidcontroller.cpp\
dsp/phaselock.cpp\
dsp/samplefifo.cpp\
dsp/samplesink.cpp\
dsp/basebandsamplesink.cpp\
dsp/nullsink.cpp\
dsp/spectrumscopecombovis.cpp\
dsp/scopevis.cpp\
@ -136,7 +136,7 @@ HEADERS += mainwindow.h\
dsp/phaselock.h\
dsp/pidcontroller.h\
dsp/samplefifo.h\
dsp/samplesink.h\
dsp/basebandsamplesink.h\
dsp/nullsink.h\
dsp/scopevis.h\
dsp/spectrumvis.h\