Toggle AECs via AudioProcessing::Config
This allows clients to stop using the old pointer-to-submodule interfaces for enabling/disabling AEC2 and AECM. The legacy suppression level flag for AEC2 is not yet activated. NoTry=TRUE Bug: webrtc:9535 Change-Id: Ie2c3378d832a6b393aec656d96597f85e299f500 Reviewed-on: https://webrtc-review.googlesource.com/94771 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24328}
This commit is contained in:
committed by
Commit Bot
parent
3229d65fd0
commit
b3b47ad7e6
@ -403,6 +403,7 @@ TEST_F(DebugDumpTest, VerifyRefinedAdaptiveFilterExperimentalString) {
|
||||
TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
||||
Config config;
|
||||
AudioProcessing::Config apm_config;
|
||||
apm_config.echo_canceller.enabled = true;
|
||||
config.Set<RefinedAdaptiveFilter>(new RefinedAdaptiveFilter(true));
|
||||
// Arbitrarily set clipping gain to 17, which will never be the default.
|
||||
config.Set<ExperimentalAgc>(new ExperimentalAgc(true, 0, 17));
|
||||
@ -463,6 +464,7 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) {
|
||||
TEST_F(DebugDumpTest, VerifyAec3ExperimentalString) {
|
||||
Config config;
|
||||
AudioProcessing::Config apm_config;
|
||||
apm_config.echo_canceller.enabled = true;
|
||||
DebugDumpGenerator generator(config, apm_config, true);
|
||||
generator.StartRecording();
|
||||
generator.Process(100);
|
||||
@ -533,9 +535,11 @@ TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) {
|
||||
|
||||
TEST_F(DebugDumpTest, ToggleAecLevel) {
|
||||
Config config;
|
||||
DebugDumpGenerator generator(config, AudioProcessing::Config());
|
||||
AudioProcessing::Config apm_config;
|
||||
apm_config.echo_canceller.enabled = true;
|
||||
apm_config.echo_canceller.mobile_mode = false;
|
||||
DebugDumpGenerator generator(config, apm_config);
|
||||
EchoCancellation* aec = generator.apm()->echo_cancellation();
|
||||
EXPECT_EQ(AudioProcessing::kNoError, aec->Enable(true));
|
||||
EXPECT_EQ(AudioProcessing::kNoError,
|
||||
aec->set_suppression_level(EchoCancellation::kLowSuppression));
|
||||
generator.StartRecording();
|
||||
|
||||
Reference in New Issue
Block a user