mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-12 11:26:11 -05:00
AM Modulator: implemented channel mute
This commit is contained in:
parent
f1bfe8962a
commit
77549e74ca
@ -93,6 +93,13 @@ void AMMod::configure(MessageQueue* messageQueue,
|
||||
|
||||
void AMMod::pull(Sample& sample)
|
||||
{
|
||||
if (m_running.m_channelMute)
|
||||
{
|
||||
sample.m_real = 0.0f;
|
||||
sample.m_imag = 0.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
Complex ci;
|
||||
|
||||
m_settingsMutex.lock();
|
||||
@ -266,7 +273,7 @@ bool AMMod::handleMessage(const Message& cmd)
|
||||
m_config.m_modFactor = cfg.getModFactor();
|
||||
m_config.m_toneFrequency = cfg.getToneFrequency();
|
||||
m_config.m_volumeFactor = cfg.getVolumeFactor();
|
||||
m_config.m_audioMute = cfg.getAudioMute();
|
||||
m_config.m_channelMute = cfg.getChannelMute();
|
||||
m_config.m_playLoop = cfg.getPlayLoop();
|
||||
|
||||
apply();
|
||||
@ -276,7 +283,7 @@ bool AMMod::handleMessage(const Message& cmd)
|
||||
<< " m_modFactor: " << m_config.m_modFactor
|
||||
<< " m_toneFrequency: " << m_config.m_toneFrequency
|
||||
<< " m_volumeFactor: " << m_config.m_volumeFactor
|
||||
<< " m_audioMute: " << m_config.m_audioMute
|
||||
<< " m_audioMute: " << m_config.m_channelMute
|
||||
<< " m_playLoop: " << m_config.m_playLoop;
|
||||
|
||||
return true;
|
||||
@ -369,7 +376,7 @@ void AMMod::apply()
|
||||
m_running.m_toneFrequency = m_config.m_toneFrequency;
|
||||
m_running.m_volumeFactor = m_config.m_volumeFactor;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
float modFactor,
|
||||
float toneFrequency,
|
||||
float volumeFactor,
|
||||
bool audioMute,
|
||||
bool channelMute,
|
||||
bool playLoop);
|
||||
|
||||
virtual void pull(Sample& sample);
|
||||
@ -213,12 +213,12 @@ private:
|
||||
float getModFactor() const { return m_modFactor; }
|
||||
float getToneFrequency() const { return m_toneFrequency; }
|
||||
float getVolumeFactor() const { return m_volumeFactor; }
|
||||
bool getAudioMute() const { return m_audioMute; }
|
||||
bool getChannelMute() const { return m_channelMute; }
|
||||
bool getPlayLoop() const { return m_playLoop; }
|
||||
|
||||
static MsgConfigureAMMod* create(Real rfBandwidth, float modFactor, float toneFreqeuncy, float volumeFactor, bool audioMute, bool playLoop)
|
||||
static MsgConfigureAMMod* create(Real rfBandwidth, float modFactor, float toneFreqeuncy, float volumeFactor, bool channelMute, bool playLoop)
|
||||
{
|
||||
return new MsgConfigureAMMod(rfBandwidth, modFactor, toneFreqeuncy, volumeFactor, audioMute, playLoop);
|
||||
return new MsgConfigureAMMod(rfBandwidth, modFactor, toneFreqeuncy, volumeFactor, channelMute, playLoop);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -226,16 +226,16 @@ private:
|
||||
float m_modFactor;
|
||||
float m_toneFrequency;
|
||||
float m_volumeFactor;
|
||||
bool m_audioMute;
|
||||
bool m_channelMute;
|
||||
bool m_playLoop;
|
||||
|
||||
MsgConfigureAMMod(Real rfBandwidth, float modFactor, float toneFrequency, float volumeFactor, bool audioMute, bool playLoop) :
|
||||
MsgConfigureAMMod(Real rfBandwidth, float modFactor, float toneFrequency, float volumeFactor, bool channelMute, bool playLoop) :
|
||||
Message(),
|
||||
m_rfBandwidth(rfBandwidth),
|
||||
m_modFactor(modFactor),
|
||||
m_toneFrequency(toneFrequency),
|
||||
m_volumeFactor(volumeFactor),
|
||||
m_audioMute(audioMute),
|
||||
m_channelMute(channelMute),
|
||||
m_playLoop(playLoop)
|
||||
{ }
|
||||
};
|
||||
@ -261,7 +261,7 @@ private:
|
||||
float m_toneFrequency;
|
||||
float m_volumeFactor;
|
||||
quint32 m_audioSampleRate;
|
||||
bool m_audioMute;
|
||||
bool m_channelMute;
|
||||
bool m_playLoop;
|
||||
|
||||
Config() :
|
||||
@ -272,7 +272,7 @@ private:
|
||||
m_toneFrequency(100),
|
||||
m_volumeFactor(1.0f),
|
||||
m_audioSampleRate(0),
|
||||
m_audioMute(false),
|
||||
m_channelMute(false),
|
||||
m_playLoop(false)
|
||||
{ }
|
||||
};
|
||||
|
@ -233,7 +233,7 @@ void AMModGUI::on_toneFrequency_valueChanged(int value)
|
||||
}
|
||||
|
||||
|
||||
void AMModGUI::on_audioMute_toggled(bool checked)
|
||||
void AMModGUI::on_channelMute_toggled(bool checked)
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
@ -423,7 +423,7 @@ void AMModGUI::applySettings()
|
||||
ui->modPercent->value() / 100.0f,
|
||||
ui->toneFrequency->value() * 10.0f,
|
||||
ui->volume->value() / 10.0f ,
|
||||
ui->audioMute->isChecked(),
|
||||
ui->channelMute->isChecked(),
|
||||
ui->playLoop->isChecked());
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ private slots:
|
||||
void on_rfBW_valueChanged(int value);
|
||||
void on_modPercent_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_toneFrequency_valueChanged(int value);
|
||||
void on_mic_toggled(bool checked);
|
||||
|
@ -56,7 +56,16 @@
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</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>
|
||||
</property>
|
||||
<item>
|
||||
@ -158,7 +167,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="audioMute">
|
||||
<widget class="QToolButton" name="channelMute">
|
||||
<property name="toolTip">
|
||||
<string>Mute/Unmute audio</string>
|
||||
</property>
|
||||
@ -655,11 +664,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RollupWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
@ -678,6 +682,11 @@
|
||||
<header>gui/levelmeter.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>CWKeyerGUI</class>
|
||||
<extends>QWidget</extends>
|
||||
@ -687,6 +696,28 @@
|
||||
</customwidgets>
|
||||
<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"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -20,9 +20,9 @@ Use the wheels to adjust the frequency shift in Hz from the center frequency of
|
||||
|
||||
Average total power in dB relative to a +/- 1.0 amplitude signal generated in the pass band.
|
||||
|
||||
<h3>4: Audio mute</h3>
|
||||
<h3>4: Channel mute</h3>
|
||||
|
||||
Use this button to toggle audio mute for this channel.
|
||||
Use this button to toggle mute for this channel.
|
||||
|
||||
<h3>5: RF bandwidth</h3>
|
||||
|
||||
|
@ -20,9 +20,9 @@ Use the wheels to adjust the frequency shift in Hz from the center frequency of
|
||||
|
||||
Average total power in dB relative to a +/- 1.0 amplitude signal generated in the pass band.
|
||||
|
||||
<h3>4: Audio mute</h3>
|
||||
<h3>4: Channel mute</h3>
|
||||
|
||||
Use this button to toggle audio mute for this channel.
|
||||
Use this button to toggle mute for this channel.
|
||||
|
||||
<h3>5: RF bandwidth</h3>
|
||||
|
||||
|
@ -20,9 +20,9 @@ Use the wheels to adjust the frequency shift in Hz from the center frequency of
|
||||
|
||||
Average total power in dB relative to a +/- 1.0 amplitude signal generated in the pass band.
|
||||
|
||||
<h3>4: Audio mute</h3>
|
||||
<h3>4: Channel mute</h3>
|
||||
|
||||
Use this button to toggle audio mute for this channel.
|
||||
Use this button to toggle mute for this channel.
|
||||
|
||||
<h3>5: RF bandwidth</h3>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user