diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index 813e9e088..8a333fe18 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -75,7 +75,7 @@ DSDDemod::DSDDemod(BasebandSampleSink* sampleSink) : DSPEngine::instance()->addAudioSink(&m_audioFifo1); DSPEngine::instance()->addAudioSink(&m_audioFifo2); - m_udpBufferAudio = new UDPSink(this, m_udpBlockSize, m_config.m_udpPort); + m_udpBufferAudio = new UDPSink(this, m_udpBlockSize, m_config.m_udpPort); m_audioFifo1.setUDPSink(m_udpBufferAudio); m_audioFifo2.setUDPSink(m_udpBufferAudio); diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index 5bede2fd0..3b17ad66b 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -324,7 +324,7 @@ private: QMutex m_settingsMutex; PhaseDiscriminators m_phaseDiscri; - UDPSink *m_udpBufferAudio; + UDPSink *m_udpBufferAudio; static const int m_udpBlockSize; diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index 7ce0e7d02..82f366703 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -284,6 +284,11 @@ void DSDDemodGUI::on_symbolPLLLock_toggled(bool checked) applySettings(); } +void DSDDemodGUI::on_udpOutput_toggled(bool checked __attribute__((unused))) +{ + applySettings(); +} + void DSDDemodGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool rollDown __attribute__((unused))) { /* diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h index aa2a7ba38..eb9b9f017 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.h +++ b/plugins/channelrx/demoddsd/dsddemodgui.h @@ -76,6 +76,7 @@ private slots: void on_squelch_valueChanged(int value); void on_audioMute_toggled(bool checked); void on_symbolPLLLock_toggled(bool checked); + void on_udpOutput_toggled(bool checked); void onWidgetRolled(QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void tick(); diff --git a/sdrbase/audio/audiofifo.cpp b/sdrbase/audio/audiofifo.cpp index daa5a8582..c3a4f5327 100644 --- a/sdrbase/audio/audiofifo.cpp +++ b/sdrbase/audio/audiofifo.cpp @@ -77,7 +77,7 @@ uint AudioFifo::write(const quint8* data, uint32_t numSamples, int timeout_ms) if (m_copyToUDP && m_udpSink) { - m_udpSink->write((qint16 *) data, numSamples); + m_udpSink->write((AudioSample *) data, numSamples); } if(m_fifo == 0) diff --git a/sdrbase/audio/audiofifo.h b/sdrbase/audio/audiofifo.h index 2df7a04a0..71859ef53 100644 --- a/sdrbase/audio/audiofifo.h +++ b/sdrbase/audio/audiofifo.h @@ -21,6 +21,8 @@ #include #include #include + +#include "dsp/dsptypes.h" #include "util/export.h" #include "util/udpsink.h" @@ -45,7 +47,7 @@ public: inline bool isFull() const { return m_fill == m_size; } inline uint32_t size() const { return m_size; } - void setUDPSink(UDPSink *udpSink) { m_udpSink = udpSink; } + void setUDPSink(UDPSink *udpSink) { m_udpSink = udpSink; } void setCopyToUDP(bool copyToUDP) { m_copyToUDP = copyToUDP; } private: @@ -65,7 +67,7 @@ private: QWaitCondition m_writeWaitCondition; QWaitCondition m_readWaitCondition; - UDPSink *m_udpSink; + UDPSink *m_udpSink; bool m_copyToUDP; bool create(uint32_t numSamples);