mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
DSD demod: use AudioSample type for the UDP sink buffer
This commit is contained in:
parent
7277757b7c
commit
115379bcf2
@ -75,7 +75,7 @@ DSDDemod::DSDDemod(BasebandSampleSink* sampleSink) :
|
||||
DSPEngine::instance()->addAudioSink(&m_audioFifo1);
|
||||
DSPEngine::instance()->addAudioSink(&m_audioFifo2);
|
||||
|
||||
m_udpBufferAudio = new UDPSink<qint16>(this, m_udpBlockSize, m_config.m_udpPort);
|
||||
m_udpBufferAudio = new UDPSink<AudioSample>(this, m_udpBlockSize, m_config.m_udpPort);
|
||||
m_audioFifo1.setUDPSink(m_udpBufferAudio);
|
||||
m_audioFifo2.setUDPSink(m_udpBufferAudio);
|
||||
|
||||
|
@ -324,7 +324,7 @@ private:
|
||||
QMutex m_settingsMutex;
|
||||
|
||||
PhaseDiscriminators m_phaseDiscri;
|
||||
UDPSink<qint16> *m_udpBufferAudio;
|
||||
UDPSink<AudioSample> *m_udpBufferAudio;
|
||||
|
||||
static const int m_udpBlockSize;
|
||||
|
||||
|
@ -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)))
|
||||
{
|
||||
/*
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
|
||||
#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<qint16> *udpSink) { m_udpSink = udpSink; }
|
||||
void setUDPSink(UDPSink<AudioSample> *udpSink) { m_udpSink = udpSink; }
|
||||
void setCopyToUDP(bool copyToUDP) { m_copyToUDP = copyToUDP; }
|
||||
|
||||
private:
|
||||
@ -65,7 +67,7 @@ private:
|
||||
QWaitCondition m_writeWaitCondition;
|
||||
QWaitCondition m_readWaitCondition;
|
||||
|
||||
UDPSink<qint16> *m_udpSink;
|
||||
UDPSink<AudioSample> *m_udpSink;
|
||||
bool m_copyToUDP;
|
||||
|
||||
bool create(uint32_t numSamples);
|
||||
|
Loading…
Reference in New Issue
Block a user