From da362823dce770a2ed0b2a0b89b7e07cf17e1c09 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 19 Apr 2018 00:52:01 +0200 Subject: [PATCH] UDPSink: use neutral denomination for I/Q sample size with sample size format --- plugins/channeltx/udpsink/readme.md | 2 +- plugins/channeltx/udpsink/udpsink.cpp | 2 +- plugins/channeltx/udpsink/udpsinkgui.cpp | 6 +++--- plugins/channeltx/udpsink/udpsinkgui.ui | 2 +- plugins/channeltx/udpsink/udpsinksettings.cpp | 2 +- plugins/channeltx/udpsink/udpsinksettings.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/channeltx/udpsink/readme.md b/plugins/channeltx/udpsink/readme.md index 8c81da302..d578d1329 100644 --- a/plugins/channeltx/udpsink/readme.md +++ b/plugins/channeltx/udpsink/readme.md @@ -42,7 +42,7 @@ Sample rate in samples per second of the signal that is recveived on UDP. The ac Combo box to specify the type of samples that are received and sent in the channel. - - `S16LE I/Q`: Raw I/Q samples on signed 16 bits integers with Little Endian layout. Use it with software that sends I/Q data as output like GNUradio with the `UDP source` block. The output is interleaved I and Q samples. It can also match the UDP source plugin with the same `S16LE I/Q` format and can be used for linear transposition. + - `SnLE I/Q`: Raw I/Q samples on signed 16 or 24 bits integers with Little Endian layout. Use it with software that sends I/Q data as output like GNUradio with the `UDP source` block. The output is interleaved I and Q samples. It can also match the UDP source plugin with the same `S16LE I/Q` format and compiled for the same sample I/Q size and can be used for linear transposition. - `S16LE NFM`: receives 16 bits signed integers on 1 (mono) or 2 (stereo) channels with Little Endian layout. It produces a mono signal with narrow bandwidth FM modulation. Stereo input channels are mixed before modulation. There is no DC block so it can be used with modulating signals where the DC component is important like digital signals. - `S16LE LSB`: Takes a 1 (mono) or 2 (stereo) channels AF signal and produces a LSB modulated signal. Stereo input channels are mixed before modulation. - `S16LE USB`: Takes a 1 (mono) or 2 (stereo) channels AF signal and produces a USB modulated signal. Stereo input channels are mixed before modulation. diff --git a/plugins/channeltx/udpsink/udpsink.cpp b/plugins/channeltx/udpsink/udpsink.cpp index 0acb9b186..890749b7e 100644 --- a/plugins/channeltx/udpsink/udpsink.cpp +++ b/plugins/channeltx/udpsink/udpsink.cpp @@ -149,7 +149,7 @@ void UDPSink::pull(Sample& sample) void UDPSink::modulateSample() { - if (m_settings.m_sampleFormat == UDPSinkSettings::FormatS16LE) // Linear I/Q transponding + if (m_settings.m_sampleFormat == UDPSinkSettings::FormatSnLE) // Linear I/Q transponding { Sample s; diff --git a/plugins/channeltx/udpsink/udpsinkgui.cpp b/plugins/channeltx/udpsink/udpsinkgui.cpp index 02c370346..701fdf9a9 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.cpp +++ b/plugins/channeltx/udpsink/udpsinkgui.cpp @@ -492,7 +492,7 @@ void UDPSinkGUI::setSampleFormatIndex(const UDPSinkSettings::SampleFormat& sampl { switch(sampleFormat) { - case UDPSinkSettings::FormatS16LE: + case UDPSinkSettings::FormatSnLE: ui->sampleFormat->setCurrentIndex(0); ui->fmDeviation->setEnabled(false); ui->stereoInput->setChecked(true); @@ -532,7 +532,7 @@ void UDPSinkGUI::setSampleFormat(int index) switch(index) { case 0: - m_settings.m_sampleFormat = UDPSinkSettings::FormatS16LE; + m_settings.m_sampleFormat = UDPSinkSettings::FormatSnLE; ui->fmDeviation->setEnabled(false); ui->stereoInput->setChecked(true); ui->stereoInput->setEnabled(false); @@ -558,7 +558,7 @@ void UDPSinkGUI::setSampleFormat(int index) ui->stereoInput->setEnabled(true); break; default: - m_settings.m_sampleFormat = UDPSinkSettings::FormatS16LE; + m_settings.m_sampleFormat = UDPSinkSettings::FormatSnLE; ui->fmDeviation->setEnabled(false); ui->stereoInput->setChecked(true); ui->stereoInput->setEnabled(false); diff --git a/plugins/channeltx/udpsink/udpsinkgui.ui b/plugins/channeltx/udpsink/udpsinkgui.ui index f7a3d3492..0a547742d 100644 --- a/plugins/channeltx/udpsink/udpsinkgui.ui +++ b/plugins/channeltx/udpsink/udpsinkgui.ui @@ -825,7 +825,7 @@ - S16LE I/Q + SnLE I/Q diff --git a/plugins/channeltx/udpsink/udpsinksettings.cpp b/plugins/channeltx/udpsink/udpsinksettings.cpp index df9f16af4..2c0ca7a56 100644 --- a/plugins/channeltx/udpsink/udpsinksettings.cpp +++ b/plugins/channeltx/udpsink/udpsinksettings.cpp @@ -30,7 +30,7 @@ UDPSinkSettings::UDPSinkSettings() : void UDPSinkSettings::resetToDefaults() { - m_sampleFormat = FormatS16LE; + m_sampleFormat = FormatSnLE; m_inputSampleRate = 48000; m_inputFrequencyOffset = 0; m_rfBandwidth = 12500; diff --git a/plugins/channeltx/udpsink/udpsinksettings.h b/plugins/channeltx/udpsink/udpsinksettings.h index e060752a0..9442fe627 100644 --- a/plugins/channeltx/udpsink/udpsinksettings.h +++ b/plugins/channeltx/udpsink/udpsinksettings.h @@ -26,7 +26,7 @@ class Serializable; struct UDPSinkSettings { enum SampleFormat { - FormatS16LE, + FormatSnLE, FormatNFM, FormatLSB, FormatUSB,