Make the extra seturation margin configurable.

The extra saturation margin is a setting for the SaturationProtector
in GainController2. The higher it is, the less gain GC2 will apply. In
this CL we pipe the setting up to audio_processing.h. Now the setting
can be set at a high level.

Also in this CL add a few (missing, they should have been there
already) tests for the GC2 and GC2 with saturation margin.

Bug: webrtc:7494
Change-Id: I1b61f1662e6c6a8817fd5b0e845339694bf8d50d
Reviewed-on: https://webrtc-review.googlesource.com/c/109001
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25470}
This commit is contained in:
Alex Loiko
2018-11-01 14:51:56 +01:00
committed by Commit Bot
parent b1e031a156
commit 5e784616e0
10 changed files with 100 additions and 7 deletions

View File

@ -273,6 +273,7 @@ class AudioProcessing : public rtc::RefCountInterface {
struct GainController2 {
bool enabled = false;
bool adaptive_digital_mode = true;
float extra_saturation_margin_db = 2.f;
float fixed_gain_db = 0.f;
} gain_controller2;