diff --git a/doc/img/SSBDemod_plugin.png b/doc/img/SSBDemod_plugin.png
index e8437037a..01c670ad4 100644
Binary files a/doc/img/SSBDemod_plugin.png and b/doc/img/SSBDemod_plugin.png differ
diff --git a/doc/img/SSBDemod_plugin.xcf b/doc/img/SSBDemod_plugin.xcf
index 9e3857bb4..4e8d04834 100644
Binary files a/doc/img/SSBDemod_plugin.xcf and b/doc/img/SSBDemod_plugin.xcf differ
diff --git a/plugins/channelrx/demodssb/readme.md b/plugins/channelrx/demodssb/readme.md
index c92e84b52..eaf6995d9 100644
--- a/plugins/channelrx/demodssb/readme.md
+++ b/plugins/channelrx/demodssb/readme.md
@@ -144,13 +144,11 @@ To avoid unwanted squelch opening on short transient bursts only signals wilth p
When the power threshold is close to the noise floor a few milliseconds help in preventing noise power wiggle to open the squelch.
-
12: Copy audio to UDP
+13: Audio mute and audio output select
-Copies audio output to UDP. Output is mono S16LE samples regardless of binaural/monaural operation.
+Left click on this button to toggle audio mute for this channel.
-13: Audio mute
-
-Use this button to toggle audio mute for this channel.
+If you right click on it a dialog will open to select the audio output device.
14: Spectrum display
diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp
index cc355f172..59e40b498 100644
--- a/plugins/channelrx/demodssb/ssbdemod.cpp
+++ b/plugins/channelrx/demodssb/ssbdemod.cpp
@@ -38,7 +38,6 @@ MESSAGE_CLASS_DEFINITION(SSBDemod::MsgConfigureChannelizer, Message)
const QString SSBDemod::m_channelIdURI = "de.maintech.sdrangelove.channel.ssb";
const QString SSBDemod::m_channelId = "SSBDemod";
-const int SSBDemod::m_udpBlockSize = 512;
SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) :
ChannelSinkAPI(m_channelIdURI),
@@ -87,9 +86,6 @@ SSBDemod::SSBDemod(DeviceSourceAPI *deviceAPI) :
SSBFilter = new fftfilt(m_LowCutoff / m_audioSampleRate, m_Bandwidth / m_audioSampleRate, ssbFftLen);
DSBFilter = new fftfilt((2.0f * m_Bandwidth) / m_audioSampleRate, 2 * ssbFftLen);
- m_audioNetSink = new AudioNetSink(0); // parent thread allocated dynamically - no RTP
- m_audioNetSink->setDestination(m_settings.m_udpAddress, m_settings.m_udpPort);
-
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true);
@@ -104,7 +100,6 @@ SSBDemod::~SSBDemod()
if (SSBFilter) delete SSBFilter;
if (DSBFilter) delete DSBFilter;
DSPEngine::instance()->getAudioDeviceManager()->removeAudioSink(&m_audioFifo);
- delete m_audioNetSink;
m_deviceAPI->removeChannelAPI(this);
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
@@ -220,8 +215,6 @@ void SSBDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
{
m_audioBuffer[m_audioBufferFill].r = 0;
m_audioBuffer[m_audioBufferFill].l = 0;
-
- if (m_settings.m_copyAudioToUDP) { m_audioNetSink->write(0); }
}
else
{
@@ -237,8 +230,6 @@ void SSBDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
m_audioBuffer[m_audioBufferFill].r = (qint16)(sideband[i].real() * m_volume * agcVal);
m_audioBuffer[m_audioBufferFill].l = (qint16)(sideband[i].imag() * m_volume * agcVal);
}
-
- if (m_settings.m_copyAudioToUDP) { m_audioNetSink->write(m_audioBuffer[m_audioBufferFill].r + m_audioBuffer[m_audioBufferFill].l); }
}
else
{
@@ -246,8 +237,6 @@ void SSBDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
qint16 sample = (qint16)(demod * m_volume * agcVal);
m_audioBuffer[m_audioBufferFill].l = sample;
m_audioBuffer[m_audioBufferFill].r = sample;
-
- if (m_settings.m_copyAudioToUDP) { m_audioNetSink->write(sample); }
}
}
@@ -332,7 +321,6 @@ bool SSBDemod::handleMessage(const Message& cmd)
BasebandSampleSink::MsgThreadedSink& cfg = (BasebandSampleSink::MsgThreadedSink&) cmd;
const QThread *thread = cfg.getThread();
qDebug("SSBDemod::handleMessage: BasebandSampleSink::MsgThreadedSink: %p", thread);
- m_audioNetSink->moveToThread(const_cast(thread)); // use the thread for udp sinks
return true;
}
else if (DSPConfigureAudio::match(cmd))
@@ -428,7 +416,6 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
<< " m_audioFlipChannels: " << settings.m_audioFlipChannels
<< " m_dsb: " << settings.m_dsb
<< " m_audioMute: " << settings.m_audioMute
- << " m_copyAudioToUDP: " << settings.m_copyAudioToUDP
<< " m_agcActive: " << settings.m_agc
<< " m_agcClamping: " << settings.m_agcClamping
<< " m_agcTimeLog2: " << settings.m_agcTimeLog2
@@ -522,12 +509,6 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force)
<< " agcClamping: " << agcClamping;
}
- if ((m_settings.m_udpAddress != settings.m_udpAddress)
- || (m_settings.m_udpPort != settings.m_udpPort) || force)
- {
- m_audioNetSink->setDestination(settings.m_udpAddress, settings.m_udpPort);
- }
-
if ((settings.m_audioDeviceName != m_settings.m_audioDeviceName) || force)
{
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h
index 77700efb8..834baa38b 100644
--- a/plugins/channelrx/demodssb/ssbdemod.h
+++ b/plugins/channelrx/demodssb/ssbdemod.h
@@ -276,8 +276,6 @@ private:
uint m_audioBufferFill;
AudioFifo m_audioFifo;
quint32 m_audioSampleRate;
- AudioNetSink *m_audioNetSink;
- static const int m_udpBlockSize;
QMutex m_settingsMutex;
diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp
index 7b9438adb..c5b9cf720 100644
--- a/plugins/channelrx/demodssb/ssbdemodgui.cpp
+++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp
@@ -222,12 +222,6 @@ void SSBDemodGUI::on_flipSidebands_clicked(bool checked __attribute__((unused)))
ui->lowCut->setValue(-lcValue);
}
-void SSBDemodGUI::on_copyAudioToUDP_toggled(bool checked)
-{
- m_settings.m_copyAudioToUDP = checked;
- applySettings();
-}
-
void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
{
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
@@ -235,14 +229,11 @@ void SSBDemodGUI::onMenuDialogCalled(const QPoint &p)
dialog.exec();
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
- m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
- m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
m_settings.m_title = m_channelMarker.getTitle();
setWindowTitle(m_settings.m_title);
setTitleColor(m_settings.m_rgbColor);
- displayUDPAddress();
applySettings();
}
@@ -486,7 +477,6 @@ void SSBDemodGUI::displaySettings()
setTitleColor(m_settings.m_rgbColor);
setWindowTitle(m_channelMarker.getTitle());
- displayUDPAddress();
blockApplySettings(true);
@@ -541,16 +531,10 @@ void SSBDemodGUI::displaySettings()
ui->agcThresholdGate->setValue(m_settings.m_agcThresholdGate);
s = QString::number(ui->agcThresholdGate->value(), 'f', 0);
ui->agcThresholdGateText->setText(s);
- ui->copyAudioToUDP->setChecked(m_settings.m_copyAudioToUDP);
blockApplySettings(false);
}
-void SSBDemodGUI::displayUDPAddress()
-{
- ui->copyAudioToUDP->setToolTip(QString("Copy audio output to UDP %1:%2").arg(m_settings.m_udpAddress).arg(m_settings.m_udpPort));
-}
-
void SSBDemodGUI::displayAGCPowerThreshold(int value)
{
if (value == SSBDemodSettings::m_minPowerThresholdDB)
diff --git a/plugins/channelrx/demodssb/ssbdemodgui.h b/plugins/channelrx/demodssb/ssbdemodgui.h
index 3e81e9dbb..24eca4639 100644
--- a/plugins/channelrx/demodssb/ssbdemodgui.h
+++ b/plugins/channelrx/demodssb/ssbdemodgui.h
@@ -72,7 +72,6 @@ private:
void applySettings(bool force = false);
void applyBandwidths(bool force = false);
void displaySettings();
- void displayUDPAddress();
void displayAGCPowerThreshold(int value);
@@ -95,7 +94,6 @@ private slots:
void on_audioMute_toggled(bool checked);
void on_spanLog2_valueChanged(int value);
void on_flipSidebands_clicked(bool checked);
- void on_copyAudioToUDP_toggled(bool copy);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void handleInputMessages();
diff --git a/plugins/channelrx/demodssb/ssbdemodgui.ui b/plugins/channelrx/demodssb/ssbdemodgui.ui
index f1d2b60bd..d204799e1 100644
--- a/plugins/channelrx/demodssb/ssbdemodgui.ui
+++ b/plugins/channelrx/demodssb/ssbdemodgui.ui
@@ -854,16 +854,6 @@
- -
-
-
- Copy audio to UDP
-
-
- U
-
-
-
-
diff --git a/plugins/channelrx/demodssb/ssbdemodsettings.cpp b/plugins/channelrx/demodssb/ssbdemodsettings.cpp
index 6645e0725..fbc4b7689 100644
--- a/plugins/channelrx/demodssb/ssbdemodsettings.cpp
+++ b/plugins/channelrx/demodssb/ssbdemodsettings.cpp
@@ -44,7 +44,6 @@ void SSBDemodSettings::resetToDefaults()
m_audioMute = false;
m_agc = false;
m_agcClamping = false;
- m_copyAudioToUDP = false;
m_agcPowerThreshold = -40;
m_agcThresholdGate = 4;
m_agcTimeLog2 = 7;
@@ -53,8 +52,6 @@ void SSBDemodSettings::resetToDefaults()
m_volume = 3.0;
m_spanLog2 = 3;
m_inputFrequencyOffset = 0;
- m_udpAddress = "127.0.0.1";
- m_udpPort = 9999;
m_rgbColor = QColor(0, 255, 0).rgb();
m_title = "SSB Demodulator";
m_audioDeviceName = AudioDeviceManager::m_defaultDeviceName;
diff --git a/plugins/channelrx/demodssb/ssbdemodsettings.h b/plugins/channelrx/demodssb/ssbdemodsettings.h
index 16530ec09..7b6ac2035 100644
--- a/plugins/channelrx/demodssb/ssbdemodsettings.h
+++ b/plugins/channelrx/demodssb/ssbdemodsettings.h
@@ -32,14 +32,11 @@ struct SSBDemodSettings
bool m_audioFlipChannels;
bool m_dsb;
bool m_audioMute;
- bool m_copyAudioToUDP;
bool m_agc;
bool m_agcClamping;
int m_agcTimeLog2;
int m_agcPowerThreshold;
int m_agcThresholdGate;
- QString m_udpAddress;
- quint16 m_udpPort;
quint32 m_rgbColor;
QString m_title;
QString m_audioDeviceName;