1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 15:33:34 -04:00

SSB Mod: added audio compressor preamp gain and threshold controls

This commit is contained in:
f4exb
2020-11-25 14:19:21 +01:00
parent d1e0f8d865
commit 6de27fc3d0
18 changed files with 284 additions and 14 deletions
+20
View File
@@ -262,6 +262,12 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force)
if ((settings.m_agc != m_settings.m_agc) || force) {
reverseAPIKeys.append("agc");
}
if ((settings.m_cmpPreGainDB != m_settings.m_cmpPreGainDB) || force) {
reverseAPIKeys.append("cmpPreGainDB");
}
if ((settings.m_cmpThresholdDB != m_settings.m_cmpThresholdDB) || force) {
reverseAPIKeys.append("cmpThresholdDB");
}
if ((settings.m_rgbColor != m_settings.m_rgbColor) || force) {
reverseAPIKeys.append("rgbColor");
}
@@ -449,6 +455,12 @@ void SSBMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("agc")) {
settings.m_agc = response.getSsbModSettings()->getAgc() != 0;
}
if (channelSettingsKeys.contains("cmpPreGainDB")) {
settings.m_cmpPreGainDB = response.getSsbModSettings()->getCmpPreGainDb();
}
if (channelSettingsKeys.contains("cmpThresholdDB")) {
settings.m_cmpThresholdDB = response.getSsbModSettings()->getCmpThresholdDb();
}
if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getSsbModSettings()->getRgbColor();
}
@@ -507,6 +519,8 @@ void SSBMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getSsbModSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
response.getSsbModSettings()->setPlayLoop(settings.m_playLoop ? 1 : 0);
response.getSsbModSettings()->setAgc(settings.m_agc ? 1 : 0);
response.getSsbModSettings()->setCmpPreGainDb(settings.m_cmpPreGainDB);
response.getSsbModSettings()->setCmpThresholdDb(settings.m_cmpThresholdDB);
response.getSsbModSettings()->setRgbColor(settings.m_rgbColor);
if (response.getSsbModSettings()->getTitle()) {
@@ -687,6 +701,12 @@ void SSBMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("agc") || force) {
swgSSBModSettings->setAgc(settings.m_agc ? 1 : 0);
}
if (channelSettingsKeys.contains("cmpPreGainDB") || force) {
swgSSBModSettings->setCmpPreGainDb(settings.m_cmpPreGainDB);
}
if (channelSettingsKeys.contains("cmpThresholdDB") || force) {
swgSSBModSettings->setCmpThresholdDb(settings.m_cmpThresholdDB);
}
if (channelSettingsKeys.contains("rgbColor") || force) {
swgSSBModSettings->setRgbColor(settings.m_rgbColor);
}