mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-04 23:14:47 -04:00
SSB Mod: added audio compressor preamp gain and threshold controls
This commit is contained in:
@@ -64,8 +64,8 @@ SSBModSource::SSBModSource() :
|
||||
|
||||
m_audioCompressor.initSimple(
|
||||
m_audioSampleRate,
|
||||
-10, // pregain (dB) -3
|
||||
-60, // threshold (dB) -50
|
||||
m_settings.m_cmpPreGainDB, // pregain (dB)
|
||||
m_settings.m_cmpThresholdDB, // threshold (dB)
|
||||
20, // knee (dB)
|
||||
12, // ratio (dB)
|
||||
0.003, // attack (s)
|
||||
@@ -648,6 +648,20 @@ void SSBModSource::applySettings(const SSBModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_cmpThresholdDB != m_settings.m_cmpThresholdDB) ||
|
||||
(settings.m_cmpPreGainDB != m_settings.m_cmpPreGainDB) || force)
|
||||
{
|
||||
m_audioCompressor.initSimple(
|
||||
m_audioSampleRate,
|
||||
settings.m_cmpPreGainDB, // pregain (dB)
|
||||
settings.m_cmpThresholdDB, // threshold (dB)
|
||||
20, // knee (dB)
|
||||
12, // ratio (dB)
|
||||
0.003, // attack (s)
|
||||
0.25 // release (s)
|
||||
);
|
||||
}
|
||||
|
||||
m_settings = settings;
|
||||
m_settings.m_bandwidth = band;
|
||||
m_settings.m_lowCutoff = lowCutoff;
|
||||
|
||||
Reference in New Issue
Block a user