Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: webrtc/modules/audio_processing/test/process_test.cc

Issue 2292863002: Introduced new scheme for controlling the functionality inside the audio processing module (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/process_test.cc
diff --git a/webrtc/modules/audio_processing/test/process_test.cc b/webrtc/modules/audio_processing/test/process_test.cc
index 6d5b97974a0e0cbc0b98a192cf0656b78f897bbe..517558fcde6603afc152d970cf4623bd996157cd 100644
--- a/webrtc/modules/audio_processing/test/process_test.cc
+++ b/webrtc/modules/audio_processing/test/process_test.cc
@@ -177,6 +177,7 @@ void void_main(int argc, char* argv[]) {
int extra_delay_ms = 0;
int override_delay_ms = 0;
Config config;
+ AudioProcessing::Config apm_config;
ASSERT_EQ(apm->kNoError, apm->level_estimator()->Enable(true));
for (int i = 1; i < argc; i++) {
@@ -262,8 +263,7 @@ void void_main(int argc, char* argv[]) {
suppression_level)));
} else if (strcmp(argv[i], "--level_control") == 0) {
- config.Set<LevelControl>(new LevelControl(true));
-
+ apm_config.level_controller.enabled = true;
} else if (strcmp(argv[i], "--extended_filter") == 0) {
config.Set<ExtendedFilter>(new ExtendedFilter(true));
@@ -452,6 +452,8 @@ void void_main(int argc, char* argv[]) {
FAIL() << "Unrecognized argument " << argv[i];
}
}
+ RTC_DCHECK(apm_config.Validate());
the sun 2016/09/01 13:48:01 dd
peah-webrtc 2016/09/02 08:22:03 Done.
+ RTC_CHECK(apm->ApplyConfig(apm_config));
apm->SetExtraOptions(config);
// If we're reading a protobuf file, ensure a simulation hasn't also

Powered by Google App Engine
This is Rietveld 408576698