mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
UDP sink: use sample format from settings. Bumped version to v3.7.5
This commit is contained in:
parent
a61348948a
commit
e298042545
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
sdrangel (3.7.5-1) unstable; urgency=medium
|
||||
|
||||
* GUI and demod separation step 1 full
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 08 Oct 2017 23:14:18 +0200
|
||||
|
||||
sdrangel (3.7.4-1) unstable; urgency=medium
|
||||
|
||||
* GUI and demod separation step 1 full
|
||||
|
@ -120,7 +120,7 @@ void UDPSink::pull(Sample& sample)
|
||||
|
||||
void UDPSink::modulateSample()
|
||||
{
|
||||
if (m_running.m_sampleFormat == FormatS16LE) // Linear I/Q transponding
|
||||
if (m_running.m_sampleFormat == UDPSinkSettings::FormatS16LE) // Linear I/Q transponding
|
||||
{
|
||||
Sample s;
|
||||
|
||||
@ -144,7 +144,7 @@ void UDPSink::modulateSample()
|
||||
m_modSample.imag(0.0f);
|
||||
}
|
||||
}
|
||||
else if (m_running.m_sampleFormat == FormatNFM)
|
||||
else if (m_running.m_sampleFormat == UDPSinkSettings::FormatNFM)
|
||||
{
|
||||
FixReal t;
|
||||
readMonoSample(t);
|
||||
@ -167,7 +167,7 @@ void UDPSink::modulateSample()
|
||||
m_modSample.imag(0.0f);
|
||||
}
|
||||
}
|
||||
else if (m_running.m_sampleFormat == FormatAM)
|
||||
else if (m_running.m_sampleFormat == UDPSinkSettings::FormatAM)
|
||||
{
|
||||
FixReal t;
|
||||
readMonoSample(t);
|
||||
@ -188,7 +188,7 @@ void UDPSink::modulateSample()
|
||||
m_modSample.imag(0.0f);
|
||||
}
|
||||
}
|
||||
else if ((m_running.m_sampleFormat == FormatLSB) || (m_running.m_sampleFormat == FormatUSB))
|
||||
else if ((m_running.m_sampleFormat == UDPSinkSettings::FormatLSB) || (m_running.m_sampleFormat == UDPSinkSettings::FormatUSB))
|
||||
{
|
||||
FixReal t;
|
||||
Complex c, ci;
|
||||
@ -206,7 +206,7 @@ void UDPSink::modulateSample()
|
||||
ci.real((t / 32768.0f) * m_running.m_gainOut);
|
||||
ci.imag(0.0f);
|
||||
|
||||
n_out = m_SSBFilter->runSSB(ci, &filtered, (m_running.m_sampleFormat == FormatUSB));
|
||||
n_out = m_SSBFilter->runSSB(ci, &filtered, (m_running.m_sampleFormat == UDPSinkSettings::FormatUSB));
|
||||
|
||||
if (n_out > 0)
|
||||
{
|
||||
@ -432,7 +432,7 @@ bool UDPSink::handleMessage(const Message& cmd)
|
||||
}
|
||||
|
||||
void UDPSink::configure(MessageQueue* messageQueue,
|
||||
SampleFormat sampleFormat,
|
||||
UDPSinkSettings::SampleFormat sampleFormat,
|
||||
Real outputSampleRate,
|
||||
Real rfBandwidth,
|
||||
int fmDeviation,
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "util/message.h"
|
||||
|
||||
#include "udpsinkudphandler.h"
|
||||
#include "udpsinksettings.h"
|
||||
|
||||
class UDPSinkGUI;
|
||||
|
||||
@ -35,15 +36,6 @@ class UDPSink : public BasebandSampleSource {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum SampleFormat {
|
||||
FormatS16LE,
|
||||
FormatNFM,
|
||||
FormatLSB,
|
||||
FormatUSB,
|
||||
FormatAM,
|
||||
FormatNone
|
||||
};
|
||||
|
||||
UDPSink(MessageQueue* uiMessageQueue, UDPSinkGUI* udpSinkGUI, BasebandSampleSink* spectrum);
|
||||
virtual ~UDPSink();
|
||||
|
||||
@ -58,7 +50,7 @@ public:
|
||||
bool getSquelchOpen() const { return m_squelchOpen; }
|
||||
|
||||
void configure(MessageQueue* messageQueue,
|
||||
SampleFormat sampleFormat,
|
||||
UDPSinkSettings::SampleFormat sampleFormat,
|
||||
Real inputSampleRate,
|
||||
Real rfBandwidth,
|
||||
int fmDeviation,
|
||||
@ -91,7 +83,7 @@ private:
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
SampleFormat getSampleFormat() const { return m_sampleFormat; }
|
||||
UDPSinkSettings::SampleFormat getSampleFormat() const { return m_sampleFormat; }
|
||||
Real getInputSampleRate() const { return m_inputSampleRate; }
|
||||
Real getRFBandwidth() const { return m_rfBandwidth; }
|
||||
int getFMDeviation() const { return m_fmDeviation; }
|
||||
@ -108,7 +100,8 @@ private:
|
||||
bool getAutoRWBalance() const { return m_autoRWBalance; }
|
||||
bool getStereoInput() const { return m_stereoInput; }
|
||||
|
||||
static MsgUDPSinkConfigure* create(SampleFormat
|
||||
static MsgUDPSinkConfigure* create(
|
||||
UDPSinkSettings::SampleFormat
|
||||
sampleFormat,
|
||||
Real inputSampleRate,
|
||||
Real rfBandwidth,
|
||||
@ -126,7 +119,8 @@ private:
|
||||
bool stereoInput,
|
||||
bool force)
|
||||
{
|
||||
return new MsgUDPSinkConfigure(sampleFormat,
|
||||
return new MsgUDPSinkConfigure(
|
||||
sampleFormat,
|
||||
inputSampleRate,
|
||||
rfBandwidth,
|
||||
fmDeviation,
|
||||
@ -145,7 +139,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
SampleFormat m_sampleFormat;
|
||||
UDPSinkSettings::SampleFormat m_sampleFormat;
|
||||
Real m_inputSampleRate;
|
||||
Real m_rfBandwidth;
|
||||
int m_fmDeviation;
|
||||
@ -162,7 +156,8 @@ private:
|
||||
bool m_stereoInput;
|
||||
bool m_force;
|
||||
|
||||
MsgUDPSinkConfigure(SampleFormat sampleFormat,
|
||||
MsgUDPSinkConfigure(
|
||||
UDPSinkSettings::SampleFormat sampleFormat,
|
||||
Real inputSampleRate,
|
||||
Real rfBandwidth,
|
||||
int fmDeviation,
|
||||
|
@ -121,11 +121,11 @@ bool UDPSinkGUI::deserialize(const QByteArray& data)
|
||||
d.readS32(2, &s32tmp, 0);
|
||||
m_channelMarker.setCenterFrequency(s32tmp);
|
||||
|
||||
d.readS32(3, &s32tmp, UDPSink::FormatS16LE);
|
||||
if (s32tmp < (int) UDPSink::FormatNone) {
|
||||
d.readS32(3, &s32tmp, UDPSinkSettings::FormatS16LE);
|
||||
if (s32tmp < (int) UDPSinkSettings::FormatNone) {
|
||||
ui->sampleFormat->setCurrentIndex(s32tmp);
|
||||
} else {
|
||||
ui->sampleFormat->setCurrentIndex(((int) UDPSink::FormatNone) - 1);
|
||||
ui->sampleFormat->setCurrentIndex(((int) UDPSinkSettings::FormatNone) - 1);
|
||||
}
|
||||
d.readReal(4, &realtmp, 48000);
|
||||
ui->sampleRate->setText(QString("%1").arg(realtmp, 0));
|
||||
@ -308,38 +308,38 @@ void UDPSinkGUI::applySettings(bool force)
|
||||
inputSampleRate,
|
||||
m_channelMarker.getCenterFrequency());
|
||||
|
||||
UDPSink::SampleFormat sampleFormat;
|
||||
UDPSinkSettings::SampleFormat sampleFormat;
|
||||
|
||||
switch(ui->sampleFormat->currentIndex())
|
||||
{
|
||||
case 0:
|
||||
sampleFormat = UDPSink::FormatS16LE;
|
||||
sampleFormat = UDPSinkSettings::FormatS16LE;
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
ui->stereoInput->setChecked(true);
|
||||
ui->stereoInput->setEnabled(false);
|
||||
break;
|
||||
case 1:
|
||||
sampleFormat = UDPSink::FormatNFM;
|
||||
sampleFormat = UDPSinkSettings::FormatNFM;
|
||||
ui->fmDeviation->setEnabled(true);
|
||||
ui->stereoInput->setEnabled(true);
|
||||
break;
|
||||
case 2:
|
||||
sampleFormat = UDPSink::FormatLSB;
|
||||
sampleFormat = UDPSinkSettings::FormatLSB;
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
ui->stereoInput->setEnabled(true);
|
||||
break;
|
||||
case 3:
|
||||
sampleFormat = UDPSink::FormatUSB;
|
||||
sampleFormat = UDPSinkSettings::FormatUSB;
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
ui->stereoInput->setEnabled(true);
|
||||
break;
|
||||
case 4:
|
||||
sampleFormat = UDPSink::FormatAM;
|
||||
sampleFormat = UDPSinkSettings::FormatAM;
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
ui->stereoInput->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
sampleFormat = UDPSink::FormatS16LE;
|
||||
sampleFormat = UDPSinkSettings::FormatS16LE;
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
ui->stereoInput->setChecked(true);
|
||||
ui->stereoInput->setEnabled(false);
|
||||
@ -397,13 +397,13 @@ void UDPSinkGUI::on_deltaFrequency_changed(qint64 value)
|
||||
|
||||
void UDPSinkGUI::on_sampleFormat_currentIndexChanged(int index)
|
||||
{
|
||||
if ((index == (int) UDPSink::FormatNFM)) {
|
||||
if ((index == (int) UDPSinkSettings::FormatNFM)) {
|
||||
ui->fmDeviation->setEnabled(true);
|
||||
} else {
|
||||
ui->fmDeviation->setEnabled(false);
|
||||
}
|
||||
|
||||
if (index == (int) UDPSink::FormatAM) {
|
||||
if (index == (int) UDPSinkSettings::FormatAM) {
|
||||
ui->amModPercent->setEnabled(true);
|
||||
} else {
|
||||
ui->amModPercent->setEnabled(false);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
#include "udpsink.h"
|
||||
#include "udpsinksettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSinkAPI;
|
||||
@ -94,7 +95,8 @@ private:
|
||||
ChannelMarker m_channelMarker;
|
||||
|
||||
// settings
|
||||
UDPSink::SampleFormat m_sampleFormat;
|
||||
UDPSinkSettings m_settings;
|
||||
UDPSinkSettings::SampleFormat m_sampleFormat;
|
||||
Real m_inputSampleRate;
|
||||
Real m_rfBandwidth;
|
||||
int m_fmDeviation;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Sink"),
|
||||
QString("3.6.1"),
|
||||
QString("3.7.5"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -84,7 +84,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Version 3.7.4 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html></string>
|
||||
<string><html><head/><body><p>Version 3.7.5 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -501,9 +501,9 @@ void MainWindow::createStatusBar()
|
||||
{
|
||||
QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR);
|
||||
#if QT_VERSION >= 0x050400
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.4 " + qtVersionStr + QSysInfo::prettyProductName(), this);
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.5 " + qtVersionStr + QSysInfo::prettyProductName(), this);
|
||||
#else
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.4 " + qtVersionStr, this);
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.5 " + qtVersionStr, this);
|
||||
#endif
|
||||
statusBar()->addPermanentWidget(m_showSystemWidget);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user