| Index: webrtc/modules/audio_processing/test/debug_dump_test.cc
|
| diff --git a/webrtc/modules/audio_processing/test/debug_dump_test.cc b/webrtc/modules/audio_processing/test/debug_dump_test.cc
|
| index 103f8e109aadf15a0de5b70ef7db99b236fa94bc..3e81841a09e91b07e0e982e7550839f1bf3ded07 100644
|
| --- a/webrtc/modules/audio_processing/test/debug_dump_test.cc
|
| +++ b/webrtc/modules/audio_processing/test/debug_dump_test.cc
|
| @@ -48,7 +48,8 @@ class DebugDumpGenerator {
|
| const std::string& dump_file_name);
|
|
|
| // Constructor that uses default input files.
|
| - explicit DebugDumpGenerator(const Config& config);
|
| + explicit DebugDumpGenerator(const Config& config,
|
| + const AudioProcessing::Config& apm_config);
|
|
|
| ~DebugDumpGenerator();
|
|
|
| @@ -133,11 +134,15 @@ DebugDumpGenerator::DebugDumpGenerator(const std::string& input_file_name,
|
| dump_file_name_(dump_file_name) {
|
| }
|
|
|
| -DebugDumpGenerator::DebugDumpGenerator(const Config& config)
|
| - : DebugDumpGenerator(ResourcePath("near32_stereo", "pcm"), 32000, 2,
|
| - ResourcePath("far32_stereo", "pcm"), 32000, 2,
|
| - config,
|
| - TempFilename(OutputPath(), "debug_aec")) {
|
| +DebugDumpGenerator::DebugDumpGenerator(
|
| + const Config& config,
|
| + const AudioProcessing::Config& apm_config)
|
| + : DebugDumpGenerator(ResourcePath("near32_stereo", "pcm"), 32000, 2,
|
| + ResourcePath("far32_stereo", "pcm"), 32000, 2,
|
| + config,
|
| + TempFilename(OutputPath(), "debug_aec")) {
|
| + RTC_DCHECK(apm_config.Validate());
|
| + RTC_CHECK(apm_->ApplyConfig(apm_config));
|
| }
|
|
|
| DebugDumpGenerator::~DebugDumpGenerator() {
|
| @@ -265,7 +270,8 @@ void DebugDumpTest::VerifyDebugDump(const std::string& in_filename) {
|
|
|
| TEST_F(DebugDumpTest, SimpleCase) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -274,7 +280,9 @@ TEST_F(DebugDumpTest, SimpleCase) {
|
|
|
| TEST_F(DebugDumpTest, ChangeInputFormat) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| +
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.SetInputRate(48000);
|
| @@ -291,7 +299,8 @@ TEST_F(DebugDumpTest, ChangeInputFormat) {
|
|
|
| TEST_F(DebugDumpTest, ChangeReverseFormat) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.SetReverseRate(48000);
|
| @@ -303,7 +312,8 @@ TEST_F(DebugDumpTest, ChangeReverseFormat) {
|
|
|
| TEST_F(DebugDumpTest, ChangeOutputFormat) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.SetOutputRate(48000);
|
| @@ -315,7 +325,8 @@ TEST_F(DebugDumpTest, ChangeOutputFormat) {
|
|
|
| TEST_F(DebugDumpTest, ToggleAec) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
|
|
| @@ -329,8 +340,9 @@ TEST_F(DebugDumpTest, ToggleAec) {
|
|
|
| TEST_F(DebugDumpTest, ToggleDelayAgnosticAec) {
|
| Config config;
|
| + AudioProcessing::Config apm_config;
|
| config.Set<DelayAgnostic>(new DelayAgnostic(true));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
|
|
| @@ -344,8 +356,9 @@ TEST_F(DebugDumpTest, ToggleDelayAgnosticAec) {
|
|
|
| TEST_F(DebugDumpTest, VerifyRefinedAdaptiveFilterExperimentalString) {
|
| Config config;
|
| + AudioProcessing::Config apm_config;
|
| config.Set<RefinedAdaptiveFilter>(new RefinedAdaptiveFilter(true));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -368,9 +381,10 @@ 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));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -395,8 +409,9 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
|
|
| TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) {
|
| Config config;
|
| + AudioProcessing::Config apm_config;
|
| config.Set<RefinedAdaptiveFilter>(new RefinedAdaptiveFilter(true));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -421,8 +436,9 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) {
|
|
|
| TEST_F(DebugDumpTest, VerifyAec3ExperimentalString) {
|
| Config config;
|
| + AudioProcessing::Config apm_config;
|
| config.Set<EchoCanceller3>(new EchoCanceller3(true));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -445,8 +461,9 @@ TEST_F(DebugDumpTest, VerifyAec3ExperimentalString) {
|
|
|
| TEST_F(DebugDumpTest, VerifyLevelControllerExperimentalString) {
|
| Config config;
|
| - config.Set<LevelControl>(new LevelControl(true));
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + apm_config.level_controller.enabled = true;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -469,7 +486,8 @@ TEST_F(DebugDumpTest, VerifyLevelControllerExperimentalString) {
|
|
|
| TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
| @@ -491,7 +509,8 @@ TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) {
|
|
|
| TEST_F(DebugDumpTest, ToggleAecLevel) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| EchoCancellation* aec = generator.apm()->echo_cancellation();
|
| EXPECT_EQ(AudioProcessing::kNoError, aec->Enable(true));
|
| EXPECT_EQ(AudioProcessing::kNoError,
|
| @@ -514,7 +533,8 @@ TEST_F(DebugDumpTest, ToggleAecLevel) {
|
| #endif
|
| TEST_F(DebugDumpTest, MAYBE_ToggleAgc) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
|
|
| @@ -528,7 +548,8 @@ TEST_F(DebugDumpTest, MAYBE_ToggleAgc) {
|
|
|
| TEST_F(DebugDumpTest, ToggleNs) {
|
| Config config;
|
| - DebugDumpGenerator generator(config);
|
| + AudioProcessing::Config apm_config;
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
|
|
| @@ -542,8 +563,9 @@ TEST_F(DebugDumpTest, ToggleNs) {
|
|
|
| TEST_F(DebugDumpTest, TransientSuppressionOn) {
|
| Config config;
|
| + AudioProcessing::Config apm_config;
|
| config.Set<ExperimentalNs>(new ExperimentalNs(true));
|
| - DebugDumpGenerator generator(config);
|
| + DebugDumpGenerator generator(config, apm_config);
|
| generator.StartRecording();
|
| generator.Process(100);
|
| generator.StopRecording();
|
|
|