InputVolumeController: Make speech_probability non-optional

Make the argument speech_probability non-optional in
InputVolumeController::Process() and
MonoInputVolumeController::Process().

Additional clean-up: Remove the flag enabled in the
config. Add unit tests for MonoInputVolumeController.

Bug: webrtc:7494
Change-Id: Ie28af77dc628bf71d09ce1ff033d39031f77a21e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283700
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38710}
This commit is contained in:
Hanna Silen
2022-11-22 15:00:58 +01:00
committed by WebRTC LUCI CQ
parent 310e0624aa
commit 27fed4513f
5 changed files with 568 additions and 267 deletions

View File

@ -159,6 +159,7 @@ TEST(GainController2,
Agc2Config config;
config.input_volume_controller.enabled = false;
auto gain_controller =
std::make_unique<GainController2>(config, kSampleRateHz, kNumChannels,
/*use_internal_vad=*/true);
@ -189,6 +190,8 @@ TEST(GainController2,
Agc2Config config;
config.input_volume_controller.enabled = true;
config.adaptive_digital.enabled = true;
auto gain_controller =
std::make_unique<GainController2>(config, kSampleRateHz, kNumChannels,
/*use_internal_vad=*/true);