From f8e90827acb319c0d7065a47a5a1c100eb2708ab Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 11 Sep 2018 23:45:56 +0200 Subject: [PATCH] Renamed the UDPSink from sdrbase utils to UDPSinkUtil --- plugins/channelrx/demoddsd/dsddemod.h | 1 - plugins/channelrx/udpsrc/udpsrc.cpp | 6 +++--- plugins/channelrx/udpsrc/udpsrc.h | 8 ++++---- sdrbase/util/{udpsink.h => udpsinkutil.h} | 10 +++++----- 4 files changed, 12 insertions(+), 13 deletions(-) rename sdrbase/util/{udpsink.h => udpsinkutil.h} (94%) diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index f5d906723..207a05f60 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -33,7 +33,6 @@ #include "dsp/afsquelch.h" #include "audio/audiofifo.h" #include "util/message.h" -#include "util/udpsink.h" #include "util/doublebufferfifo.h" #include "dsddemodsettings.h" diff --git a/plugins/channelrx/udpsrc/udpsrc.cpp b/plugins/channelrx/udpsrc/udpsrc.cpp index 25689e017..3cc35f112 100644 --- a/plugins/channelrx/udpsrc/udpsrc.cpp +++ b/plugins/channelrx/udpsrc/udpsrc.cpp @@ -62,9 +62,9 @@ UDPSrc::UDPSrc(DeviceSourceAPI *deviceAPI) : { setObjectName(m_channelId); - m_udpBuffer16 = new UDPSink(this, udpBlockSize, m_settings.m_udpPort); - m_udpBufferMono16 = new UDPSink(this, udpBlockSize, m_settings.m_udpPort); - m_udpBuffer24 = new UDPSink(this, udpBlockSize, m_settings.m_udpPort); + m_udpBuffer16 = new UDPSinkUtil(this, udpBlockSize, m_settings.m_udpPort); + m_udpBufferMono16 = new UDPSinkUtil(this, udpBlockSize, m_settings.m_udpPort); + m_udpBuffer24 = new UDPSinkUtil(this, udpBlockSize, m_settings.m_udpPort); m_audioSocket = new QUdpSocket(this); m_udpAudioBuf = new char[m_udpAudioPayloadSize]; diff --git a/plugins/channelrx/udpsrc/udpsrc.h b/plugins/channelrx/udpsrc/udpsrc.h index e582a8845..74dc18cb4 100644 --- a/plugins/channelrx/udpsrc/udpsrc.h +++ b/plugins/channelrx/udpsrc/udpsrc.h @@ -30,7 +30,7 @@ #include "dsp/movingaverage.h" #include "dsp/agc.h" #include "dsp/bandpass.h" -#include "util/udpsink.h" +#include "util/udpsinkutil.h" #include "util/message.h" #include "audio/audiofifo.h" @@ -197,9 +197,9 @@ protected: fftfilt* UDPFilter; SampleVector m_sampleBuffer; - UDPSink *m_udpBuffer16; - UDPSink *m_udpBufferMono16; - UDPSink *m_udpBuffer24; + UDPSinkUtil *m_udpBuffer16; + UDPSinkUtil *m_udpBufferMono16; + UDPSinkUtil *m_udpBuffer24; AudioVector m_audioBuffer; uint m_audioBufferFill; diff --git a/sdrbase/util/udpsink.h b/sdrbase/util/udpsinkutil.h similarity index 94% rename from sdrbase/util/udpsink.h rename to sdrbase/util/udpsinkutil.h index 17ed66a2b..04bf4f820 100644 --- a/sdrbase/util/udpsink.h +++ b/sdrbase/util/udpsinkutil.h @@ -26,10 +26,10 @@ #include template -class UDPSink +class UDPSinkUtil { public: - UDPSink(QObject *parent, unsigned int udpSize) : + UDPSinkUtil(QObject *parent, unsigned int udpSize) : m_udpSize(udpSize), m_udpSamples(udpSize/sizeof(T)), m_address(QHostAddress::LocalHost), @@ -41,7 +41,7 @@ public: m_socket = new QUdpSocket(parent); } - UDPSink(QObject *parent, unsigned int udpSize, unsigned int port) : + UDPSinkUtil(QObject *parent, unsigned int udpSize, unsigned int port) : m_udpSize(udpSize), m_udpSamples(udpSize/sizeof(T)), m_address(QHostAddress::LocalHost), @@ -53,7 +53,7 @@ public: m_socket = new QUdpSocket(parent); } - UDPSink (QObject *parent, unsigned int udpSize, QHostAddress& address, unsigned int port) : + UDPSinkUtil (QObject *parent, unsigned int udpSize, QHostAddress& address, unsigned int port) : m_udpSize(udpSize), m_udpSamples(udpSize/sizeof(T)), m_address(address), @@ -65,7 +65,7 @@ public: m_socket = new QUdpSocket(parent); } - ~UDPSink() + ~UDPSinkUtil() { delete[] m_sampleBuffer; delete m_socket;