Optionally disable digital adaptive AGC2.

The AGC2 is enabled by flipping
AudioProcessing::Config::GainController2::enabled. The flag enables
both AdaptiveAgc and FixedGainController. Before this CL, there was no
way(*) to only enable the FixedGainController. After this CL, it's
also possible to flip the setting
|AudioProcessing::Config::GainController2::adaptive_digital_mode|. The
default is |true|, which is the previous behavior.

* Except for instantiating and setting it up outside of the APM like
  it's done in the AudioMixer.

Bug: webrtc:7494
Change-Id: I506e93b6687221ac467f083fa8db3d45c98c1b83
Reviewed-on: https://webrtc-review.googlesource.com/95426
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24432}
This commit is contained in:
Alex Loiko
2018-08-24 11:28:36 +02:00
committed by Commit Bot
parent 5c2de6b3ce
commit e583174d1e
3 changed files with 13 additions and 6 deletions

View File

@ -47,6 +47,7 @@ class GainController2 {
AudioProcessing::Config::GainController2 config_;
AdaptiveAgc adaptive_agc_;
int analog_level_ = -1;
bool adaptive_digital_mode_ = true;
RTC_DISALLOW_COPY_AND_ASSIGN(GainController2);
};