APM: Add a field trial for input volume controller

Add a field trial WebRTC-Audio-InputVolumeControllerExperiment and
a mechanism to adjust the config accordingly. Pass the additional
input volume controller config to GainController2.

Bug: webrtc:7494
Change-Id: I3dd624df1f4774cb533417747627995e1f60aa68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284101
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38780}
This commit is contained in:
Hanna Silen
2022-11-30 16:59:05 +01:00
committed by WebRTC LUCI CQ
parent c19ec96bd7
commit a6574909e9
7 changed files with 565 additions and 48 deletions

View File

@ -34,10 +34,12 @@ class GainController2 {
public:
// Ctor. If `use_internal_vad` is true, an internal voice activity
// detector is used for digital adaptive gain.
GainController2(const AudioProcessing::Config::GainController2& config,
int sample_rate_hz,
int num_channels,
bool use_internal_vad);
GainController2(
const AudioProcessing::Config::GainController2& config,
const InputVolumeController::Config& input_volume_controller_config,
int sample_rate_hz,
int num_channels,
bool use_internal_vad);
GainController2(const GainController2&) = delete;
GainController2& operator=(const GainController2&) = delete;
~GainController2();