1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

Audio modulators audio feedback: AM, NFM, SSB: right click feedback enable to choose audio output

This commit is contained in:
f4exb 2019-07-31 02:51:19 +02:00
parent 6d3ab1a730
commit 04ba1b2c84
8 changed files with 54 additions and 3 deletions

View File

@ -347,6 +347,9 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl
CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic);
connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable);
connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect()));
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
@ -483,6 +486,19 @@ void AMModGUI::audioSelect()
}
}
void AMModGUI::audioFeedbackSelect()
{
qDebug("AMModGUI::audioFeedbackSelect");
AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output
audioSelect.exec();
if (audioSelect.m_selected)
{
m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName;
applySettings();
}
}
void AMModGUI::tick()
{
double powDb = CalcDb::dbPower(m_amMod->getMagSq());

View File

@ -115,6 +115,7 @@ private slots:
void configureFileName();
void audioSelect();
void audioFeedbackSelect();
void tick();
};

View File

@ -520,7 +520,7 @@ void NFMMod::applyAudioSampleRate(int sampleRate)
void NFMMod::applyFeedbackAudioSampleRate(unsigned int sampleRate)
{
qDebug("AMMod::applyFeedbackAudioSampleRate: %u", sampleRate);
qDebug("NFMMod::applyFeedbackAudioSampleRate: %u", sampleRate);
m_settingsMutex.lock();
@ -993,7 +993,7 @@ void NFMMod::webapiReverseSendCWSettings(const CWKeyerSettings& cwKeyerSettings)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
swgChannelSettings->setDirection(1); // single source (Tx)
swgChannelSettings->setChannelType(new QString("AMMod"));
swgChannelSettings->setChannelType(new QString("NFMMod"));
swgChannelSettings->setNfmModSettings(new SWGSDRangel::SWGNFMModSettings());
SWGSDRangel::SWGNFMModSettings *swgNFModSettings = swgChannelSettings->getNfmModSettings();

View File

@ -375,6 +375,9 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic);
connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable);
connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect()));
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
@ -518,6 +521,19 @@ void NFMModGUI::audioSelect()
}
}
void NFMModGUI::audioFeedbackSelect()
{
qDebug("NFMModGUI::audioFeedbackSelect");
AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output
audioSelect.exec();
if (audioSelect.m_selected)
{
m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName;
applySettings();
}
}
void NFMModGUI::tick()
{
double powDb = CalcDb::dbPower(m_nfmMod->getMagSq());

View File

@ -118,6 +118,7 @@ private slots:
void configureFileName();
void audioSelect();
void audioFeedbackSelect();
void tick();
};

View File

@ -793,7 +793,7 @@ void SSBMod::applyAudioSampleRate(int sampleRate)
void SSBMod::applyFeedbackAudioSampleRate(unsigned int sampleRate)
{
qDebug("AMMod::applyFeedbackAudioSampleRate: %u", sampleRate);
qDebug("SSBMod::applyFeedbackAudioSampleRate: %u", sampleRate);
m_settingsMutex.lock();

View File

@ -422,6 +422,9 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic);
connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
CRightClickEnabler *feedbackRightClickEnabler = new CRightClickEnabler(ui->feedbackEnable);
connect(feedbackRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioFeedbackSelect()));
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
@ -722,6 +725,19 @@ void SSBModGUI::audioSelect()
}
}
void SSBModGUI::audioFeedbackSelect()
{
qDebug("SSBModGUI::audioFeedbackSelect");
AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, false); // false for output
audioSelect.exec();
if (audioSelect.m_selected)
{
m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName;
applySettings();
}
}
void SSBModGUI::tick()
{
double powDb = CalcDb::dbPower(m_ssbMod->getMagSq());

View File

@ -128,6 +128,7 @@ private slots:
void configureFileName();
void audioSelect();
void audioFeedbackSelect();
void tick();
};