Added handling of 'agc_compression_gain' flag in audioproc_f.
The test program modules/audio_processing/test/audioproc_float.cc defined the flag 'agc_compression_gain' and had checks if the parameter was valid (audioproc_float). The flag was also copied to webrtc::test::SimulationSettings of audio_processing_simulator.h. The setting was however never applied to APM. This change applies the setting on the GainControl submodule in the same way as the agc_target_level is applied. This is needed for e.g. testing the AGC fixed digital limiter with the same configuration as it is (currently) used with in AudioMixerImpl. Also added new flag '-experimental_agc'. This flag allows disabling the experimental AGC, which is how the AGC is used in AudioMixerImpl. ExperimentalAgc is enabled by default, exactly as it was prior to this change. The change has been tested locally by listening tests and diff comparisons. BUG=None NOTRY=True # win_dbg bot not cooperating Review-Url: https://codereview.webrtc.org/2684983004 Cr-Commit-Position: refs/heads/master@{#16603}
This commit is contained in:
parent
ad9010c983
commit
a3b2add27d
@ -285,6 +285,8 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
!settings_.use_extended_filter || *settings_.use_extended_filter));
|
||||
config.Set<DelayAgnostic>(new DelayAgnostic(!settings_.use_delay_agnostic ||
|
||||
*settings_.use_delay_agnostic));
|
||||
config.Set<ExperimentalAgc>(new ExperimentalAgc(
|
||||
!settings_.use_experimental_agc || *settings_.use_experimental_agc));
|
||||
if (settings_.use_ed) {
|
||||
apm_config.residual_echo_detector.enabled = *settings_.use_ed;
|
||||
}
|
||||
@ -327,7 +329,11 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
ap_->gain_control()->set_target_level_dbfs(
|
||||
*settings_.agc_target_level));
|
||||
}
|
||||
|
||||
if (settings_.agc_compression_gain) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->gain_control()->set_compression_gain_db(
|
||||
*settings_.agc_compression_gain));
|
||||
}
|
||||
if (settings_.agc_mode) {
|
||||
RTC_CHECK_EQ(
|
||||
AudioProcessing::kNoError,
|
||||
|
||||
@ -64,6 +64,7 @@ struct SimulationSettings {
|
||||
rtc::Optional<bool> use_drift_compensation;
|
||||
rtc::Optional<bool> use_aec3;
|
||||
rtc::Optional<bool> use_lc;
|
||||
rtc::Optional<bool> use_experimental_agc;
|
||||
rtc::Optional<int> aecm_routing_mode;
|
||||
rtc::Optional<bool> use_aecm_comfort_noise;
|
||||
rtc::Optional<int> agc_mode;
|
||||
|
||||
@ -121,6 +121,9 @@ DEFINE_int32(aec3,
|
||||
DEFINE_int32(lc,
|
||||
kParameterNotSpecifiedValue,
|
||||
"Activate (1) or deactivate(0) the level control");
|
||||
DEFINE_int32(experimental_agc,
|
||||
kParameterNotSpecifiedValue,
|
||||
"Activate (1) or deactivate(0) the experimental AGC");
|
||||
DEFINE_int32(
|
||||
refined_adaptive_filter,
|
||||
kParameterNotSpecifiedValue,
|
||||
@ -245,6 +248,7 @@ SimulationSettings CreateSettings() {
|
||||
|
||||
SetSettingIfFlagSet(FLAGS_aec3, &settings.use_aec3);
|
||||
SetSettingIfFlagSet(FLAGS_lc, &settings.use_lc);
|
||||
SetSettingIfFlagSet(FLAGS_experimental_agc, &settings.use_experimental_agc);
|
||||
SetSettingIfSpecified(FLAGS_aecm_routing_mode, &settings.aecm_routing_mode);
|
||||
SetSettingIfFlagSet(FLAGS_aecm_comfort_noise,
|
||||
&settings.use_aecm_comfort_noise);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user