This CL adds the basic framework for AEC3 in the audio processing module.
It will be followed by a number of other CLs that extends this framework. BUG=webrtc:6018 Review-Url: https://codereview.webrtc.org/2567513003 Cr-Commit-Position: refs/heads/master@{#15593}
This commit is contained in:
@ -491,7 +491,7 @@ void AecDumpBasedSimulator::HandleMessage(
|
||||
}
|
||||
|
||||
if (settings_.use_aec3) {
|
||||
config.Set<EchoCanceller3>(new EchoCanceller3(*settings_.use_aec3));
|
||||
apm_config.echo_canceller3.enabled = *settings_.use_aec3;
|
||||
}
|
||||
|
||||
if (settings_.use_lc) {
|
||||
|
||||
@ -268,7 +268,7 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
config.Set<Intelligibility>(new Intelligibility(*settings_.use_ie));
|
||||
}
|
||||
if (settings_.use_aec3) {
|
||||
config.Set<EchoCanceller3>(new EchoCanceller3(*settings_.use_aec3));
|
||||
apm_config.echo_canceller3.enabled = *settings_.use_aec3;
|
||||
}
|
||||
if (settings_.use_lc) {
|
||||
apm_config.level_controller.enabled = *settings_.use_lc;
|
||||
|
||||
@ -377,11 +377,12 @@ TEST_F(DebugDumpTest, VerifyRefinedAdaptiveFilterExperimentalString) {
|
||||
|
||||
TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
||||
Config config;
|
||||
AudioProcessing::Config apm_config;
|
||||
config.Set<RefinedAdaptiveFilter>(new RefinedAdaptiveFilter(true));
|
||||
config.Set<EchoCanceller3>(new EchoCanceller3(true));
|
||||
// Arbitrarily set clipping gain to 17, which will never be the default.
|
||||
config.Set<ExperimentalAgc>(new ExperimentalAgc(true, 0, 17));
|
||||
DebugDumpGenerator generator(config, AudioProcessing::Config());
|
||||
apm_config.echo_canceller3.enabled = true;
|
||||
DebugDumpGenerator generator(config, apm_config);
|
||||
generator.StartRecording();
|
||||
generator.Process(100);
|
||||
generator.StopRecording();
|
||||
@ -398,7 +399,7 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
||||
ASSERT_TRUE(msg->has_experiments_description());
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "RefinedAdaptiveFilter",
|
||||
msg->experiments_description().c_str());
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3",
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "EchoCanceller3",
|
||||
msg->experiments_description().c_str());
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment",
|
||||
msg->experiments_description().c_str());
|
||||
@ -436,8 +437,9 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) {
|
||||
|
||||
TEST_F(DebugDumpTest, VerifyAec3ExperimentalString) {
|
||||
Config config;
|
||||
config.Set<EchoCanceller3>(new EchoCanceller3(true));
|
||||
DebugDumpGenerator generator(config, AudioProcessing::Config());
|
||||
AudioProcessing::Config apm_config;
|
||||
apm_config.echo_canceller3.enabled = true;
|
||||
DebugDumpGenerator generator(config, apm_config);
|
||||
generator.StartRecording();
|
||||
generator.Process(100);
|
||||
generator.StopRecording();
|
||||
@ -452,7 +454,7 @@ TEST_F(DebugDumpTest, VerifyAec3ExperimentalString) {
|
||||
if (event->type() == audioproc::Event::CONFIG) {
|
||||
const audioproc::Config* msg = &event->config();
|
||||
ASSERT_TRUE(msg->has_experiments_description());
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3",
|
||||
EXPECT_PRED_FORMAT2(testing::IsSubstring, "EchoCanceller3",
|
||||
msg->experiments_description().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user