1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-04 06:07:49 -04:00

RxTx semantic move: renamed ThreadedSampleSink to ThreadedBasebandSampleSink

This commit is contained in:
f4exb 2016-10-03 15:55:16 +02:00
parent d1fc02e303
commit dce0ace4ef
31 changed files with 190 additions and 182 deletions

View File

@ -120,7 +120,7 @@ set(sdrbase_SOURCES
sdrbase/dsp/spectrumscopecombovis.cpp sdrbase/dsp/spectrumscopecombovis.cpp
sdrbase/dsp/scopevis.cpp sdrbase/dsp/scopevis.cpp
sdrbase/dsp/spectrumvis.cpp sdrbase/dsp/spectrumvis.cpp
sdrbase/dsp/threadedsamplesink.cpp sdrbase/dsp/threadedbasebandsamplesink.cpp
sdrbase/gui/aboutdialog.cpp sdrbase/gui/aboutdialog.cpp
sdrbase/gui/addpresetdialog.cpp sdrbase/gui/addpresetdialog.cpp
@ -209,7 +209,7 @@ set(sdrbase_HEADERS
sdrbase/dsp/nullsink.h sdrbase/dsp/nullsink.h
sdrbase/dsp/scopevis.h sdrbase/dsp/scopevis.h
sdrbase/dsp/spectrumvis.h sdrbase/dsp/spectrumvis.h
sdrbase/dsp/threadedsamplesink.h sdrbase/dsp/threadedbasebandsamplesink.h
sdrbase/gui/aboutdialog.h sdrbase/gui/aboutdialog.h
sdrbase/gui/addpresetdialog.h sdrbase/gui/addpresetdialog.h

Binary file not shown.

View File

@ -19,8 +19,9 @@
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_chanalyzergui.h" #include "ui_chanalyzergui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/spectrumscopecombovis.h" #include "dsp/spectrumscopecombovis.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
@ -327,7 +328,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAP
m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis); m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis);
m_channelAnalyzer = new ChannelAnalyzer(m_spectrumScopeComboVis); m_channelAnalyzer = new ChannelAnalyzer(m_spectrumScopeComboVis);
m_channelizer = new DownChannelizer(m_channelAnalyzer); m_channelizer = new DownChannelizer(m_channelAnalyzer);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged())); connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);

View File

@ -25,7 +25,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class ChannelAnalyzer; class ChannelAnalyzer;
class SpectrumScopeComboVis; class SpectrumScopeComboVis;
@ -80,7 +80,7 @@ private:
int m_spanLog2; int m_spanLog2;
MovingAverage<Real> m_channelPowerDbAvg; MovingAverage<Real> m_channelPowerDbAvg;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
ChannelAnalyzer* m_channelAnalyzer; ChannelAnalyzer* m_channelAnalyzer;
SpectrumScopeComboVis* m_spectrumScopeComboVis; SpectrumScopeComboVis* m_spectrumScopeComboVis;

View File

@ -3,8 +3,9 @@
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_amdemodgui.h" #include "ui_amdemodgui.h"
#include "dsp/threadedsamplesink.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
@ -221,7 +222,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pare
m_amDemod = new AMDemod(); m_amDemod = new AMDemod();
m_channelizer = new DownChannelizer(m_amDemod); m_channelizer = new DownChannelizer(m_amDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
//m_pluginAPI->addThreadedSink(m_threadedChannelizer); //m_pluginAPI->addThreadedSink(m_threadedChannelizer);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);

View File

@ -9,7 +9,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class AMDemod; class AMDemod;
@ -58,7 +58,7 @@ private:
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
AMDemod* m_amDemod; AMDemod* m_amDemod;
MovingAverage<Real> m_channelPowerDbAvg; MovingAverage<Real> m_channelPowerDbAvg;

View File

@ -26,7 +26,7 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include "dsp/threadedsamplesink.h" #include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "gui/glspectrum.h" #include "gui/glspectrum.h"
@ -382,7 +382,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
m_spectrumVis = new SpectrumVis(ui->glSpectrum); m_spectrumVis = new SpectrumVis(ui->glSpectrum);
m_bfmDemod = new BFMDemod(m_spectrumVis, &m_rdsParser); m_bfmDemod = new BFMDemod(m_spectrumVis, &m_rdsParser);
m_channelizer = new DownChannelizer(m_bfmDemod); m_channelizer = new DownChannelizer(m_bfmDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged())); connect(m_channelizer, SIGNAL(inputSampleRateChanged()), this, SLOT(channelSampleRateChanged()));
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);

View File

@ -28,7 +28,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class SpectrumVis; class SpectrumVis;
class BFMDemod; class BFMDemod;
@ -88,7 +88,7 @@ private:
bool m_doApplySettings; bool m_doApplySettings;
int m_rdsTimerCount; int m_rdsTimerCount;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
SpectrumVis* m_spectrumVis; SpectrumVis* m_spectrumVis;
RDSParser m_rdsParser; RDSParser m_rdsParser;

View File

@ -21,8 +21,9 @@
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QDebug> #include <QDebug>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_dsddemodgui.h" #include "ui_dsddemodgui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/scopevis.h" #include "dsp/scopevis.h"
#include "gui/glscope.h" #include "gui/glscope.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -371,7 +372,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
m_channelizer = new DownChannelizer(m_dsdDemod); m_channelizer = new DownChannelizer(m_dsdDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
//m_channelMarker = new ChannelMarker(this); //m_channelMarker = new ChannelMarker(this);

View File

@ -27,7 +27,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class ScopeVis; class ScopeVis;
class DSDDemod; class DSDDemod;
@ -97,7 +97,7 @@ private:
char m_formatStatusText[82+1]; //!< Fixed signal format dependent status text char m_formatStatusText[82+1]; //!< Fixed signal format dependent status text
SignalFormat m_signalFormat; SignalFormat m_signalFormat;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
ScopeVis* m_scopeVis; ScopeVis* m_scopeVis;

View File

@ -4,9 +4,10 @@
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_lorademodgui.h" #include "ui_lorademodgui.h"
#include "ui_lorademodgui.h" #include "ui_lorademodgui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "gui/glspectrum.h" #include "gui/glspectrum.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -167,7 +168,7 @@ LoRaDemodGUI::LoRaDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget*
m_spectrumVis = new SpectrumVis(ui->glSpectrum); m_spectrumVis = new SpectrumVis(ui->glSpectrum);
m_LoRaDemod = new LoRaDemod(m_spectrumVis); m_LoRaDemod = new LoRaDemod(m_spectrumVis);
m_channelizer = new DownChannelizer(m_LoRaDemod); m_channelizer = new DownChannelizer(m_LoRaDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
ui->glSpectrum->setCenterFrequency(16000); ui->glSpectrum->setCenterFrequency(16000);

View File

@ -9,7 +9,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class LoRaDemod; class LoRaDemod;
class SpectrumVis; class SpectrumVis;
@ -53,7 +53,7 @@ private:
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
LoRaDemod* m_LoRaDemod; LoRaDemod* m_LoRaDemod;
SpectrumVis* m_spectrumVis; SpectrumVis* m_spectrumVis;

View File

@ -4,8 +4,9 @@
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QDebug> #include <QDebug>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_nfmdemodgui.h" #include "ui_nfmdemodgui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/nullsink.h" #include "dsp/nullsink.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
@ -293,7 +294,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
m_channelizer = new DownChannelizer(m_nfmDemod); m_channelizer = new DownChannelizer(m_nfmDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
//m_channelMarker = new ChannelMarker(this); //m_channelMarker = new ChannelMarker(this);

View File

@ -10,7 +10,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class NFMDemod; class NFMDemod;
@ -63,7 +63,7 @@ private:
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
NFMDemod* m_nfmDemod; NFMDemod* m_nfmDemod;
bool m_ctcssOn; bool m_ctcssOn;

View File

@ -4,9 +4,10 @@
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_ssbdemodgui.h" #include "ui_ssbdemodgui.h"
#include "ui_ssbdemodgui.h" #include "ui_ssbdemodgui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "gui/glspectrum.h" #include "gui/glspectrum.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -342,7 +343,7 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
m_spectrumVis = new SpectrumVis(ui->glSpectrum); m_spectrumVis = new SpectrumVis(ui->glSpectrum);
m_ssbDemod = new SSBDemod(m_spectrumVis); m_ssbDemod = new SSBDemod(m_spectrumVis);
m_channelizer = new DownChannelizer(m_ssbDemod); m_channelizer = new DownChannelizer(m_ssbDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));

View File

@ -10,7 +10,7 @@ class PluginAPI;
class DeviceAPI; class DeviceAPI;
class AudioFifo; class AudioFifo;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class SSBDemod; class SSBDemod;
class SpectrumVis; class SpectrumVis;
@ -70,7 +70,7 @@ private:
bool m_audioMute; bool m_audioMute;
MovingAverage<Real> m_channelPowerDbAvg; MovingAverage<Real> m_channelPowerDbAvg;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
SSBDemod* m_ssbDemod; SSBDemod* m_ssbDemod;
SpectrumVis* m_spectrumVis; SpectrumVis* m_spectrumVis;

View File

@ -4,8 +4,9 @@
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QDebug> #include <QDebug>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "ui_wfmdemodgui.h" #include "ui_wfmdemodgui.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
@ -236,7 +237,7 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
m_wfmDemod = new WFMDemod(0); m_wfmDemod = new WFMDemod(0);
m_channelizer = new DownChannelizer(m_wfmDemod); m_channelizer = new DownChannelizer(m_wfmDemod);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
connect(&m_pluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); connect(&m_pluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));

View File

@ -9,7 +9,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class WFMDemod; class WFMDemod;
@ -57,7 +57,7 @@ private:
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
WFMDemod* m_wfmDemod; WFMDemod* m_wfmDemod;
MovingAverage<Real> m_channelPowerDbAvg; MovingAverage<Real> m_channelPowerDbAvg;

View File

@ -1,9 +1,9 @@
#include "../../channelrx/tcpsrc/tcpsrcgui.h" #include "../../channelrx/tcpsrc/tcpsrcgui.h"
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
@ -203,7 +203,7 @@ TCPSrcGUI::TCPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
m_spectrumVis = new SpectrumVis(ui->glSpectrum); m_spectrumVis = new SpectrumVis(ui->glSpectrum);
m_tcpSrc = new TCPSrc(m_pluginAPI->getMainWindowMessageQueue(), this, m_spectrumVis); m_tcpSrc = new TCPSrc(m_pluginAPI->getMainWindowMessageQueue(), this, m_spectrumVis);
m_channelizer = new DownChannelizer(m_tcpSrc); m_channelizer = new DownChannelizer(m_tcpSrc);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));

View File

@ -11,7 +11,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class TCPSrc; class TCPSrc;
class SpectrumVis; class SpectrumVis;
@ -72,7 +72,7 @@ private:
bool m_doApplySettings; bool m_doApplySettings;
// RF path // RF path
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
SpectrumVis* m_spectrumVis; SpectrumVis* m_spectrumVis;

View File

@ -18,9 +18,9 @@
#include "../../channelrx/udpsrc/udpsrcgui.h" #include "../../channelrx/udpsrc/udpsrcgui.h"
#include <dsp/downchannelizer.h> #include <dsp/downchannelizer.h>
#include "../../../sdrbase/dsp/threadedbasebandsamplesink.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/spectrumvis.h" #include "dsp/spectrumvis.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
@ -241,7 +241,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
m_spectrumVis = new SpectrumVis(ui->glSpectrum); m_spectrumVis = new SpectrumVis(ui->glSpectrum);
m_udpSrc = new UDPSrc(m_pluginAPI->getMainWindowMessageQueue(), this, m_spectrumVis); m_udpSrc = new UDPSrc(m_pluginAPI->getMainWindowMessageQueue(), this, m_spectrumVis);
m_channelizer = new DownChannelizer(m_udpSrc); m_channelizer = new DownChannelizer(m_udpSrc);
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
m_deviceAPI->addThreadedSink(m_threadedChannelizer); m_deviceAPI->addThreadedSink(m_threadedChannelizer);
ui->fmDeviation->setEnabled(false); ui->fmDeviation->setEnabled(false);

View File

@ -28,7 +28,7 @@
class PluginAPI; class PluginAPI;
class DeviceAPI; class DeviceAPI;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DownChannelizer; class DownChannelizer;
class UDPSrc; class UDPSrc;
class SpectrumVis; class SpectrumVis;
@ -101,7 +101,7 @@ private:
bool m_doApplySettings; bool m_doApplySettings;
// RF path // RF path
ThreadedSampleSink* m_threadedChannelizer; ThreadedBasebandSampleSink* m_threadedChannelizer;
DownChannelizer* m_channelizer; DownChannelizer* m_channelizer;
SpectrumVis* m_spectrumVis; SpectrumVis* m_spectrumVis;

View File

@ -52,12 +52,12 @@ void DeviceAPI::removeSink(BasebandSampleSink* sink)
m_deviceEngine->removeSink(sink); m_deviceEngine->removeSink(sink);
} }
void DeviceAPI::addThreadedSink(ThreadedSampleSink* sink) void DeviceAPI::addThreadedSink(ThreadedBasebandSampleSink* sink)
{ {
m_deviceEngine->addThreadedSink(sink); m_deviceEngine->addThreadedSink(sink);
} }
void DeviceAPI::removeThreadedSink(ThreadedSampleSink* sink) void DeviceAPI::removeThreadedSink(ThreadedBasebandSampleSink* sink)
{ {
m_deviceEngine->removeThreadedSink(sink); m_deviceEngine->removeThreadedSink(sink);
} }

View File

@ -29,7 +29,7 @@ class DSPDeviceEngine;
class GLSpectrum; class GLSpectrum;
class ChannelWindow; class ChannelWindow;
class BasebandSampleSink; class BasebandSampleSink;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class DeviceSampleSource; class DeviceSampleSource;
class MessageQueue; class MessageQueue;
class ChannelMarker; class ChannelMarker;
@ -45,8 +45,8 @@ public:
// Device engine stuff // Device engine stuff
void addSink(BasebandSampleSink* sink); //!< Add a sample sink to 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 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 addThreadedSink(ThreadedBasebandSampleSink* 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 removeThreadedSink(ThreadedBasebandSampleSink* sink); //!< Remove a sample sink that runs on its own thread from device engine
void setSource(DeviceSampleSource* source); //!< Set device engine sample source type void setSource(DeviceSampleSource* source); //!< Set device engine sample source type
bool initAcquisition(); //!< Initialize device engine acquisition sequence bool initAcquisition(); //!< Initialize device engine acquisition sequence
bool startAcquisition(); //!< Start device engine acquisition sequence bool startAcquisition(); //!< Start device engine acquisition sequence

View File

@ -25,7 +25,7 @@
class DeviceSampleSource; class DeviceSampleSource;
class BasebandSampleSink; class BasebandSampleSink;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class AudioFifo; class AudioFifo;
class SDRANGEL_API DSPExit : public Message { class SDRANGEL_API DSPExit : public Message {
@ -106,24 +106,24 @@ class SDRANGEL_API DSPAddThreadedSampleSink : public Message {
MESSAGE_CLASS_DECLARATION MESSAGE_CLASS_DECLARATION
public: public:
DSPAddThreadedSampleSink(ThreadedSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { } DSPAddThreadedSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
ThreadedSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; } ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
private: private:
ThreadedSampleSink* m_threadedSampleSink; ThreadedBasebandSampleSink* m_threadedSampleSink;
}; };
class SDRANGEL_API DSPRemoveThreadedSampleSink : public Message { class SDRANGEL_API DSPRemoveThreadedSampleSink : public Message {
MESSAGE_CLASS_DECLARATION MESSAGE_CLASS_DECLARATION
public: public:
DSPRemoveThreadedSampleSink(ThreadedSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { } DSPRemoveThreadedSampleSink(ThreadedBasebandSampleSink* threadedSampleSink) : Message(), m_threadedSampleSink(threadedSampleSink) { }
ThreadedSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; } ThreadedBasebandSampleSink* getThreadedSampleSink() const { return m_threadedSampleSink; }
private: private:
ThreadedSampleSink* m_threadedSampleSink; ThreadedBasebandSampleSink* m_threadedSampleSink;
}; };
class SDRANGEL_API DSPAddAudioSink : public Message { class SDRANGEL_API DSPAddAudioSink : public Message {

View File

@ -22,8 +22,8 @@
#include <QDebug> #include <QDebug>
#include "dsp/dspdeviceengine.h" #include "dsp/dspdeviceengine.h"
#include "dsp/samplefifo.h" #include "dsp/samplefifo.h"
#include "dsp/threadedsamplesink.h"
#include "dsp/dspcommands.h" #include "dsp/dspcommands.h"
#include "threadedbasebandsamplesink.h"
DSPDeviceEngine::DSPDeviceEngine(uint uid, QObject* parent) : DSPDeviceEngine::DSPDeviceEngine(uint uid, QObject* parent) :
m_uid(uid), m_uid(uid),
@ -132,14 +132,14 @@ void DSPDeviceEngine::removeSink(BasebandSampleSink* sink)
m_syncMessenger.sendWait(cmd); m_syncMessenger.sendWait(cmd);
} }
void DSPDeviceEngine::addThreadedSink(ThreadedSampleSink* sink) void DSPDeviceEngine::addThreadedSink(ThreadedBasebandSampleSink* sink)
{ {
qDebug() << "DSPDeviceEngine::addThreadedSink: " << sink->objectName().toStdString().c_str(); qDebug() << "DSPDeviceEngine::addThreadedSink: " << sink->objectName().toStdString().c_str();
DSPAddThreadedSampleSink cmd(sink); DSPAddThreadedSampleSink cmd(sink);
m_syncMessenger.sendWait(cmd); m_syncMessenger.sendWait(cmd);
} }
void DSPDeviceEngine::removeThreadedSink(ThreadedSampleSink* sink) void DSPDeviceEngine::removeThreadedSink(ThreadedBasebandSampleSink* sink)
{ {
qDebug() << "DSPDeviceEngine::removeThreadedSink: " << sink->objectName().toStdString().c_str(); qDebug() << "DSPDeviceEngine::removeThreadedSink: " << sink->objectName().toStdString().c_str();
DSPRemoveThreadedSampleSink cmd(sink); DSPRemoveThreadedSampleSink cmd(sink);
@ -562,13 +562,13 @@ void DSPDeviceEngine::handleSynchronousMessages()
} }
else if (DSPAddThreadedSampleSink::match(*message)) else if (DSPAddThreadedSampleSink::match(*message))
{ {
ThreadedSampleSink *threadedSink = ((DSPAddThreadedSampleSink*) message)->getThreadedSampleSink(); ThreadedBasebandSampleSink *threadedSink = ((DSPAddThreadedSampleSink*) message)->getThreadedSampleSink();
m_threadedSampleSinks.push_back(threadedSink); m_threadedSampleSinks.push_back(threadedSink);
threadedSink->start(); threadedSink->start();
} }
else if (DSPRemoveThreadedSampleSink::match(*message)) else if (DSPRemoveThreadedSampleSink::match(*message))
{ {
ThreadedSampleSink* threadedSink = ((DSPRemoveThreadedSampleSink*) message)->getThreadedSampleSink(); ThreadedBasebandSampleSink* threadedSink = ((DSPRemoveThreadedSampleSink*) message)->getThreadedSampleSink();
threadedSink->stop(); threadedSink->stop();
m_threadedSampleSinks.remove(threadedSink); m_threadedSampleSinks.remove(threadedSink);
} }

View File

@ -31,7 +31,7 @@
class DeviceSampleSource; class DeviceSampleSource;
class BasebandSampleSink; class BasebandSampleSink;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class SDRANGEL_API DSPDeviceEngine : public QThread { class SDRANGEL_API DSPDeviceEngine : public QThread {
Q_OBJECT Q_OBJECT
@ -66,8 +66,8 @@ public:
void addSink(BasebandSampleSink* sink); //!< Add a sample sink void addSink(BasebandSampleSink* sink); //!< Add a sample sink
void removeSink(BasebandSampleSink* sink); //!< Remove 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 addThreadedSink(ThreadedBasebandSampleSink* 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 void removeThreadedSink(ThreadedBasebandSampleSink* sink); //!< Remove a sample sink that runs on its own thread
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure DSP corrections void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure DSP corrections
@ -94,7 +94,7 @@ private:
typedef std::list<BasebandSampleSink*> SampleSinks; typedef std::list<BasebandSampleSink*> SampleSinks;
SampleSinks m_sampleSinks; //!< sample sinks within main thread (usually spectrum, file output) SampleSinks m_sampleSinks; //!< sample sinks within main thread (usually spectrum, file output)
typedef std::list<ThreadedSampleSink*> ThreadedSampleSinks; typedef std::list<ThreadedBasebandSampleSink*> ThreadedSampleSinks;
ThreadedSampleSinks m_threadedSampleSinks; //!< sample sinks on their own threads (usually channels) ThreadedSampleSinks m_threadedSampleSinks; //!< sample sinks on their own threads (usually channels)
uint m_sampleRate; uint m_sampleRate;

View File

@ -1,97 +1,97 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB // // Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths // // written by Edouard Griffiths //
// // // //
// This program is free software; you can redistribute it and/or modify // // This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by // // it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or // // the Free Software Foundation as version 3 of the License, or //
// // // //
// This program is distributed in the hope that it will be useful, // // This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of // // but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. // // GNU General Public License V3 for more details. //
// // // //
// You should have received a copy of the GNU General Public License // // You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_DSPENGINE_H #ifndef INCLUDE_DSPENGINE_H
#define INCLUDE_DSPENGINE_H #define INCLUDE_DSPENGINE_H
#include <QObject> #include <QObject>
#include <vector> #include <vector>
#include "dsp/dspdeviceengine.h" #include "dsp/dspdeviceengine.h"
#include "audio/audiooutput.h" #include "audio/audiooutput.h"
#include "util/export.h" #include "util/export.h"
#ifdef DSD_USE_SERIALDV #ifdef DSD_USE_SERIALDV
#include "dsp/dvserialengine.h" #include "dsp/dvserialengine.h"
#endif #endif
class DSPDeviceEngine; class DSPDeviceEngine;
class ThreadedSampleSink; class ThreadedBasebandSampleSink;
class SDRANGEL_API DSPEngine : public QObject { class SDRANGEL_API DSPEngine : public QObject {
Q_OBJECT Q_OBJECT
public: public:
DSPEngine(); DSPEngine();
~DSPEngine(); ~DSPEngine();
static DSPEngine *instance(); static DSPEngine *instance();
uint getAudioSampleRate() const { return m_audioSampleRate; } uint getAudioSampleRate() const { return m_audioSampleRate; }
DSPDeviceEngine *addDeviceEngine(); DSPDeviceEngine *addDeviceEngine();
void removeLastDeviceEngine(); void removeLastDeviceEngine();
void stopAllAcquisitions(); void stopAllAcquisitions();
void stopAllDeviceEngines(); void stopAllDeviceEngines();
void startAudio(); void startAudio();
void stopAudio(); void stopAudio();
void startAudioImmediate(); void startAudioImmediate();
void stopAudioImmediate(); void stopAudioImmediate();
DSPDeviceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; } DSPDeviceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; }
DSPDeviceEngine *getDeviceEngineByUID(uint uid); DSPDeviceEngine *getDeviceEngineByUID(uint uid);
void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink
void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink
// Serial DV methods: // Serial DV methods:
bool hasDVSerialSupport() bool hasDVSerialSupport()
{ {
#ifdef DSD_USE_SERIALDV #ifdef DSD_USE_SERIALDV
return m_dvSerialSupport; return m_dvSerialSupport;
#else #else
return false; return false;
#endif #endif
} }
void setDVSerialSupport(bool support); void setDVSerialSupport(bool support);
void getDVSerialNames(std::vector<std::string>& deviceNames) void getDVSerialNames(std::vector<std::string>& deviceNames)
{ {
#ifdef DSD_USE_SERIALDV #ifdef DSD_USE_SERIALDV
m_dvSerialEngine.getDevicesNames(deviceNames); m_dvSerialEngine.getDevicesNames(deviceNames);
#endif #endif
} }
void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo) void pushMbeFrame(const unsigned char *mbeFrame, int mbeRateIndex, int mbeVolumeIndex, unsigned char channels, AudioFifo *audioFifo)
{ {
#ifdef DSD_USE_SERIALDV #ifdef DSD_USE_SERIALDV
m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo); m_dvSerialEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, audioFifo);
#endif #endif
} }
private: private:
std::vector<DSPDeviceEngine*> m_deviceEngines; std::vector<DSPDeviceEngine*> m_deviceEngines;
uint m_deviceEnginesUIDSequence; uint m_deviceEnginesUIDSequence;
AudioOutput m_audioOutput; AudioOutput m_audioOutput;
uint m_audioSampleRate; uint m_audioSampleRate;
bool m_dvSerialSupport; bool m_dvSerialSupport;
#ifdef DSD_USE_SERIALDV #ifdef DSD_USE_SERIALDV
DVSerialEngine m_dvSerialEngine; DVSerialEngine m_dvSerialEngine;
#endif #endif
}; };
#endif // INCLUDE_DSPENGINE_H #endif // INCLUDE_DSPENGINE_H

View File

@ -1,27 +1,28 @@
#include "threadedbasebandsamplesink.h"
#include <QThread> #include <QThread>
#include <QDebug> #include <QDebug>
#include "dsp/threadedsamplesink.h"
#include "dsp/dspcommands.h" #include "dsp/dspcommands.h"
#include "util/message.h" #include "util/message.h"
ThreadedSampleFifo::ThreadedSampleFifo(BasebandSampleSink *sampleSink, std::size_t size) : ThreadedBasebandSampleFifo::ThreadedBasebandSampleFifo(BasebandSampleSink *sampleSink, std::size_t size) :
m_sampleSink(sampleSink) m_sampleSink(sampleSink)
{ {
connect(&m_sampleFifo, SIGNAL(dataReady()), this, SLOT(handleFifoData())); connect(&m_sampleFifo, SIGNAL(dataReady()), this, SLOT(handleFifoData()));
m_sampleFifo.setSize(size); m_sampleFifo.setSize(size);
} }
ThreadedSampleFifo::~ThreadedSampleFifo() ThreadedBasebandSampleFifo::~ThreadedBasebandSampleFifo()
{ {
m_sampleFifo.readCommit(m_sampleFifo.fill()); m_sampleFifo.readCommit(m_sampleFifo.fill());
} }
void ThreadedSampleFifo::writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end) void ThreadedBasebandSampleFifo::writeToFifo(SampleVector::const_iterator& begin, SampleVector::const_iterator& end)
{ {
m_sampleFifo.write(begin, end); m_sampleFifo.write(begin, end);
} }
void ThreadedSampleFifo::handleFifoData() // FIXME: Fixed? Move it to the new threadable sink class void ThreadedBasebandSampleFifo::handleFifoData() // FIXME: Fixed? Move it to the new threadable sink class
{ {
bool positiveOnly = false; bool positiveOnly = false;
@ -62,7 +63,7 @@ void ThreadedSampleFifo::handleFifoData() // FIXME: Fixed? Move it to the new th
} }
} }
ThreadedSampleSink::ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *parent) : ThreadedBasebandSampleSink::ThreadedBasebandSampleSink(BasebandSampleSink* sampleSink, QObject *parent) :
m_sampleSink(sampleSink) m_sampleSink(sampleSink)
{ {
QString name = "ThreadedSampleSink(" + m_sampleSink->objectName() + ")"; QString name = "ThreadedSampleSink(" + m_sampleSink->objectName() + ")";
@ -71,7 +72,7 @@ ThreadedSampleSink::ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *
qDebug() << "ThreadedSampleSink::ThreadedSampleSink: " << name; qDebug() << "ThreadedSampleSink::ThreadedSampleSink: " << name;
m_thread = new QThread(parent); m_thread = new QThread(parent);
m_threadedSampleFifo = new ThreadedSampleFifo(m_sampleSink); m_threadedSampleFifo = new ThreadedBasebandSampleFifo(m_sampleSink);
//moveToThread(m_thread); // FIXME: Fixed? the intermediate FIFO should be handled within the sink. Define a new type of sink that is compatible with threading //moveToThread(m_thread); // FIXME: Fixed? the intermediate FIFO should be handled within the sink. Define a new type of sink that is compatible with threading
m_sampleSink->moveToThread(m_thread); m_sampleSink->moveToThread(m_thread);
m_threadedSampleFifo->moveToThread(m_thread); m_threadedSampleFifo->moveToThread(m_thread);
@ -82,20 +83,20 @@ ThreadedSampleSink::ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *
qDebug() << "ThreadedSampleSink::ThreadedSampleSink: thread: " << thread() << " m_thread: " << m_thread; qDebug() << "ThreadedSampleSink::ThreadedSampleSink: thread: " << thread() << " m_thread: " << m_thread;
} }
ThreadedSampleSink::~ThreadedSampleSink() ThreadedBasebandSampleSink::~ThreadedBasebandSampleSink()
{ {
delete m_threadedSampleFifo; // Valgrind memcheck delete m_threadedSampleFifo; // Valgrind memcheck
delete m_thread; delete m_thread;
} }
void ThreadedSampleSink::start() void ThreadedBasebandSampleSink::start()
{ {
qDebug() << "ThreadedSampleSink::start"; qDebug() << "ThreadedSampleSink::start";
m_thread->start(); m_thread->start();
m_sampleSink->start(); m_sampleSink->start();
} }
void ThreadedSampleSink::stop() void ThreadedBasebandSampleSink::stop()
{ {
qDebug() << "ThreadedSampleSink::stop"; qDebug() << "ThreadedSampleSink::stop";
m_sampleSink->stop(); m_sampleSink->stop();
@ -103,19 +104,19 @@ void ThreadedSampleSink::stop()
m_thread->wait(); m_thread->wait();
} }
void ThreadedSampleSink::feed(SampleVector::const_iterator begin, SampleVector::const_iterator end, bool positiveOnly) void ThreadedBasebandSampleSink::feed(SampleVector::const_iterator begin, SampleVector::const_iterator end, bool positiveOnly)
{ {
//m_sampleSink->feed(begin, end, positiveOnly); //m_sampleSink->feed(begin, end, positiveOnly);
//m_sampleFifo.write(begin, end); //m_sampleFifo.write(begin, end);
m_threadedSampleFifo->writeToFifo(begin, end); m_threadedSampleFifo->writeToFifo(begin, end);
} }
bool ThreadedSampleSink::handleSinkMessage(const Message& cmd) bool ThreadedBasebandSampleSink::handleSinkMessage(const Message& cmd)
{ {
return m_sampleSink->handleMessage(cmd); return m_sampleSink->handleMessage(cmd);
} }
QString ThreadedSampleSink::getSampleSinkObjectName() const QString ThreadedBasebandSampleSink::getSampleSinkObjectName() const
{ {
return m_sampleSink->objectName(); return m_sampleSink->objectName();
} }

View File

@ -31,12 +31,12 @@ class QThread;
* Because Qt is a piece of shit this class cannot be a nested protected class of ThreadedSampleSink * Because Qt is a piece of shit this class cannot be a nested protected class of ThreadedSampleSink
* So let's make everything public * So let's make everything public
*/ */
class ThreadedSampleFifo : public QObject { class ThreadedBasebandSampleFifo : public QObject {
Q_OBJECT Q_OBJECT
public: public:
ThreadedSampleFifo(BasebandSampleSink* sampleSink, std::size_t size = 1<<18); ThreadedBasebandSampleFifo(BasebandSampleSink* sampleSink, std::size_t size = 1<<18);
~ThreadedSampleFifo(); ~ThreadedBasebandSampleFifo();
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;
@ -49,12 +49,12 @@ public slots:
/** /**
* This class is a wrapper for SampleSink that runs the SampleSink object in its own thread * This class is a wrapper for SampleSink that runs the SampleSink object in its own thread
*/ */
class SDRANGEL_API ThreadedSampleSink : public QObject { class SDRANGEL_API ThreadedBasebandSampleSink : public QObject {
Q_OBJECT Q_OBJECT
public: public:
ThreadedSampleSink(BasebandSampleSink* sampleSink, QObject *parent = 0); ThreadedBasebandSampleSink(BasebandSampleSink* sampleSink, QObject *parent = 0);
~ThreadedSampleSink(); ~ThreadedBasebandSampleSink();
const BasebandSampleSink *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* getInputMessageQueue() { return m_sampleSink->getInputMessageQueue(); } //!< Return pointer to sample sink's input message queue
@ -71,7 +71,7 @@ public:
protected: protected:
QThread *m_thread; //!< The thead object QThread *m_thread; //!< The thead object
ThreadedSampleFifo *m_threadedSampleFifo; ThreadedBasebandSampleFifo *m_threadedSampleFifo;
BasebandSampleSink* m_sampleSink; BasebandSampleSink* m_sampleSink;
}; };

View File

@ -61,7 +61,7 @@ SOURCES += mainwindow.cpp\
dsp/spectrumscopecombovis.cpp\ dsp/spectrumscopecombovis.cpp\
dsp/scopevis.cpp\ dsp/scopevis.cpp\
dsp/spectrumvis.cpp\ dsp/spectrumvis.cpp\
dsp/threadedsamplesink.cpp\ dsp/threadedbasebandsamplesink.cpp\
gui/aboutdialog.cpp\ gui/aboutdialog.cpp\
gui/addpresetdialog.cpp\ gui/addpresetdialog.cpp\
gui/basicchannelsettingswidget.cpp\ gui/basicchannelsettingswidget.cpp\
@ -140,7 +140,7 @@ HEADERS += mainwindow.h\
dsp/nullsink.h\ dsp/nullsink.h\
dsp/scopevis.h\ dsp/scopevis.h\
dsp/spectrumvis.h\ dsp/spectrumvis.h\
dsp/threadedsamplesink.h\ dsp/threadedbasebandsamplesink.h\
gui/aboutdialog.h\ gui/aboutdialog.h\
gui/addpresetdialog.h\ gui/addpresetdialog.h\
gui/audiodialog.h\ gui/audiodialog.h\