mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
NFM Modulator: implemented channel mute
This commit is contained in:
parent
cd3191a9dc
commit
61df7de043
@ -107,6 +107,13 @@ void NFMMod::configure(MessageQueue* messageQueue,
|
|||||||
|
|
||||||
void NFMMod::pull(Sample& sample)
|
void NFMMod::pull(Sample& sample)
|
||||||
{
|
{
|
||||||
|
if (m_running.m_channelMute)
|
||||||
|
{
|
||||||
|
sample.m_real = 0.0f;
|
||||||
|
sample.m_imag = 0.0f;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Complex ci;
|
Complex ci;
|
||||||
Real t;
|
Real t;
|
||||||
|
|
||||||
@ -292,7 +299,7 @@ bool NFMMod::handleMessage(const Message& cmd)
|
|||||||
m_config.m_fmDeviation = cfg.getFMDeviation();
|
m_config.m_fmDeviation = cfg.getFMDeviation();
|
||||||
m_config.m_toneFrequency = cfg.getToneFrequency();
|
m_config.m_toneFrequency = cfg.getToneFrequency();
|
||||||
m_config.m_volumeFactor = cfg.getVolumeFactor();
|
m_config.m_volumeFactor = cfg.getVolumeFactor();
|
||||||
m_config.m_audioMute = cfg.getAudioMute();
|
m_config.m_channelMute = cfg.getChannelMute();
|
||||||
m_config.m_playLoop = cfg.getPlayLoop();
|
m_config.m_playLoop = cfg.getPlayLoop();
|
||||||
m_config.m_ctcssOn = cfg.getCTCSSOn();
|
m_config.m_ctcssOn = cfg.getCTCSSOn();
|
||||||
m_config.m_ctcssFrequency = cfg.getCTCSSFrequency();
|
m_config.m_ctcssFrequency = cfg.getCTCSSFrequency();
|
||||||
@ -305,7 +312,7 @@ bool NFMMod::handleMessage(const Message& cmd)
|
|||||||
<< " m_fmDeviation: " << m_config.m_fmDeviation
|
<< " m_fmDeviation: " << m_config.m_fmDeviation
|
||||||
<< " m_toneFrequency: " << m_config.m_toneFrequency
|
<< " m_toneFrequency: " << m_config.m_toneFrequency
|
||||||
<< " m_volumeFactor: " << m_config.m_volumeFactor
|
<< " m_volumeFactor: " << m_config.m_volumeFactor
|
||||||
<< " m_audioMute: " << m_config.m_audioMute
|
<< " m_channelMute: " << m_config.m_channelMute
|
||||||
<< " m_playLoop: " << m_config.m_playLoop
|
<< " m_playLoop: " << m_config.m_playLoop
|
||||||
<< " m_ctcssOn: " << m_config.m_ctcssOn
|
<< " m_ctcssOn: " << m_config.m_ctcssOn
|
||||||
<< " m_ctcssFrequency: " << m_config.m_ctcssFrequency;
|
<< " m_ctcssFrequency: " << m_config.m_ctcssFrequency;
|
||||||
@ -416,7 +423,7 @@ void NFMMod::apply()
|
|||||||
m_running.m_fmDeviation = m_config.m_fmDeviation;
|
m_running.m_fmDeviation = m_config.m_fmDeviation;
|
||||||
m_running.m_volumeFactor = m_config.m_volumeFactor;
|
m_running.m_volumeFactor = m_config.m_volumeFactor;
|
||||||
m_running.m_audioSampleRate = m_config.m_audioSampleRate;
|
m_running.m_audioSampleRate = m_config.m_audioSampleRate;
|
||||||
m_running.m_audioMute = m_config.m_audioMute;
|
m_running.m_channelMute = m_config.m_channelMute;
|
||||||
m_running.m_playLoop = m_config.m_playLoop;
|
m_running.m_playLoop = m_config.m_playLoop;
|
||||||
m_running.m_ctcssOn = m_config.m_ctcssOn;
|
m_running.m_ctcssOn = m_config.m_ctcssOn;
|
||||||
m_running.m_ctcssFrequency = m_config.m_ctcssFrequency;
|
m_running.m_ctcssFrequency = m_config.m_ctcssFrequency;
|
||||||
|
@ -184,7 +184,7 @@ public:
|
|||||||
float fmDeviation,
|
float fmDeviation,
|
||||||
float toneFrequency,
|
float toneFrequency,
|
||||||
float volumeFactor,
|
float volumeFactor,
|
||||||
bool audioMute,
|
bool channelMute,
|
||||||
bool playLoop,
|
bool playLoop,
|
||||||
bool ctcssOn,
|
bool ctcssOn,
|
||||||
float ctcssFrequency);
|
float ctcssFrequency);
|
||||||
@ -219,7 +219,7 @@ private:
|
|||||||
float getFMDeviation() const { return m_fmDeviation; }
|
float getFMDeviation() const { return m_fmDeviation; }
|
||||||
float getToneFrequency() const { return m_toneFrequency; }
|
float getToneFrequency() const { return m_toneFrequency; }
|
||||||
float getVolumeFactor() const { return m_volumeFactor; }
|
float getVolumeFactor() const { return m_volumeFactor; }
|
||||||
bool getAudioMute() const { return m_audioMute; }
|
bool getChannelMute() const { return m_channelMute; }
|
||||||
bool getPlayLoop() const { return m_playLoop; }
|
bool getPlayLoop() const { return m_playLoop; }
|
||||||
bool getCTCSSOn() const { return m_ctcssOn; }
|
bool getCTCSSOn() const { return m_ctcssOn; }
|
||||||
float getCTCSSFrequency() const { return m_ctcssFrequency; }
|
float getCTCSSFrequency() const { return m_ctcssFrequency; }
|
||||||
@ -229,7 +229,7 @@ private:
|
|||||||
float fmDeviation,
|
float fmDeviation,
|
||||||
float toneFrequency,
|
float toneFrequency,
|
||||||
float volumeFactor,
|
float volumeFactor,
|
||||||
bool audioMute,
|
bool channelMute,
|
||||||
bool playLoop,
|
bool playLoop,
|
||||||
bool ctcssOn,
|
bool ctcssOn,
|
||||||
float ctcssFrequency)
|
float ctcssFrequency)
|
||||||
@ -239,7 +239,7 @@ private:
|
|||||||
fmDeviation,
|
fmDeviation,
|
||||||
toneFrequency,
|
toneFrequency,
|
||||||
volumeFactor,
|
volumeFactor,
|
||||||
audioMute,
|
channelMute,
|
||||||
playLoop,
|
playLoop,
|
||||||
ctcssOn,
|
ctcssOn,
|
||||||
ctcssFrequency);
|
ctcssFrequency);
|
||||||
@ -251,7 +251,7 @@ private:
|
|||||||
float m_fmDeviation;
|
float m_fmDeviation;
|
||||||
float m_toneFrequency;
|
float m_toneFrequency;
|
||||||
float m_volumeFactor;
|
float m_volumeFactor;
|
||||||
bool m_audioMute;
|
bool m_channelMute;
|
||||||
bool m_playLoop;
|
bool m_playLoop;
|
||||||
bool m_ctcssOn;
|
bool m_ctcssOn;
|
||||||
float m_ctcssFrequency;
|
float m_ctcssFrequency;
|
||||||
@ -261,7 +261,7 @@ private:
|
|||||||
float fmDeviation,
|
float fmDeviation,
|
||||||
float toneFrequency,
|
float toneFrequency,
|
||||||
float volumeFactor,
|
float volumeFactor,
|
||||||
bool audioMute,
|
bool channelMute,
|
||||||
bool playLoop,
|
bool playLoop,
|
||||||
bool ctcssOn,
|
bool ctcssOn,
|
||||||
float ctcssFrequency) :
|
float ctcssFrequency) :
|
||||||
@ -271,7 +271,7 @@ private:
|
|||||||
m_fmDeviation(fmDeviation),
|
m_fmDeviation(fmDeviation),
|
||||||
m_toneFrequency(toneFrequency),
|
m_toneFrequency(toneFrequency),
|
||||||
m_volumeFactor(volumeFactor),
|
m_volumeFactor(volumeFactor),
|
||||||
m_audioMute(audioMute),
|
m_channelMute(channelMute),
|
||||||
m_playLoop(playLoop),
|
m_playLoop(playLoop),
|
||||||
m_ctcssOn(ctcssOn),
|
m_ctcssOn(ctcssOn),
|
||||||
m_ctcssFrequency(ctcssFrequency)
|
m_ctcssFrequency(ctcssFrequency)
|
||||||
@ -300,7 +300,7 @@ private:
|
|||||||
float m_toneFrequency;
|
float m_toneFrequency;
|
||||||
float m_volumeFactor;
|
float m_volumeFactor;
|
||||||
quint32 m_audioSampleRate;
|
quint32 m_audioSampleRate;
|
||||||
bool m_audioMute;
|
bool m_channelMute;
|
||||||
bool m_playLoop;
|
bool m_playLoop;
|
||||||
bool m_ctcssOn;
|
bool m_ctcssOn;
|
||||||
float m_ctcssFrequency;
|
float m_ctcssFrequency;
|
||||||
@ -314,7 +314,7 @@ private:
|
|||||||
m_toneFrequency(1000.0f),
|
m_toneFrequency(1000.0f),
|
||||||
m_volumeFactor(1.0f),
|
m_volumeFactor(1.0f),
|
||||||
m_audioSampleRate(0),
|
m_audioSampleRate(0),
|
||||||
m_audioMute(false),
|
m_channelMute(false),
|
||||||
m_playLoop(false),
|
m_playLoop(false),
|
||||||
m_ctcssOn(false),
|
m_ctcssOn(false),
|
||||||
m_ctcssFrequency(88.5)
|
m_ctcssFrequency(88.5)
|
||||||
|
@ -261,7 +261,7 @@ void NFMModGUI::on_toneFrequency_valueChanged(int value)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NFMModGUI::on_audioMute_toggled(bool checked)
|
void NFMModGUI::on_channelMute_toggled(bool checked)
|
||||||
{
|
{
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
@ -477,7 +477,7 @@ void NFMModGUI::applySettings()
|
|||||||
ui->fmDev->value() * 100.0f, // value is in '100 Hz
|
ui->fmDev->value() * 100.0f, // value is in '100 Hz
|
||||||
ui->toneFrequency->value() * 10.0f,
|
ui->toneFrequency->value() * 10.0f,
|
||||||
ui->volume->value() / 10.0f,
|
ui->volume->value() / 10.0f,
|
||||||
ui->audioMute->isChecked(),
|
ui->channelMute->isChecked(),
|
||||||
ui->playLoop->isChecked(),
|
ui->playLoop->isChecked(),
|
||||||
ui->ctcssOn->isChecked(),
|
ui->ctcssOn->isChecked(),
|
||||||
m_ctcssTones[ui->ctcss->currentIndex()]);
|
m_ctcssTones[ui->ctcss->currentIndex()]);
|
||||||
|
@ -66,7 +66,7 @@ private slots:
|
|||||||
void on_fmDev_valueChanged(int value);
|
void on_fmDev_valueChanged(int value);
|
||||||
void on_toneFrequency_valueChanged(int value);
|
void on_toneFrequency_valueChanged(int value);
|
||||||
void on_volume_valueChanged(int value);
|
void on_volume_valueChanged(int value);
|
||||||
void on_audioMute_toggled(bool checked);
|
void on_channelMute_toggled(bool checked);
|
||||||
void on_tone_toggled(bool checked);
|
void on_tone_toggled(bool checked);
|
||||||
void on_morseKeyer_toggled(bool checked);
|
void on_morseKeyer_toggled(bool checked);
|
||||||
void on_mic_toggled(bool checked);
|
void on_mic_toggled(bool checked);
|
||||||
|
@ -56,7 +56,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -158,7 +167,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="audioMute">
|
<widget class="QToolButton" name="channelMute">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Mute/Unmute audio</string>
|
<string>Mute/Unmute audio</string>
|
||||||
</property>
|
</property>
|
||||||
@ -744,17 +753,17 @@
|
|||||||
<header>gui/valuedial.h</header>
|
<header>gui/valuedial.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ButtonSwitch</class>
|
|
||||||
<extends>QToolButton</extends>
|
|
||||||
<header>gui/buttonswitch.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LevelMeterVU</class>
|
<class>LevelMeterVU</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/levelmeter.h</header>
|
<header>gui/levelmeter.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>ButtonSwitch</class>
|
||||||
|
<extends>QToolButton</extends>
|
||||||
|
<header>gui/buttonswitch.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>CWKeyerGUI</class>
|
<class>CWKeyerGUI</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -764,6 +773,28 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user