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

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

Issue 2543753006: AGC: Route clipping parameter from webrtc::Config to AGC (Closed)
Patch Set: Fix a typo Created 4 years 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
« no previous file with comments | « webrtc/modules/audio_processing/include/audio_processing.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ffaf60984e1f7b24f438175b4a3bf26c77a79497..ebf899f82a9401cb8ac42d1f85ff56c31d877452 100644
--- a/webrtc/modules/audio_processing/test/debug_dump_test.cc
+++ b/webrtc/modules/audio_processing/test/debug_dump_test.cc
@@ -379,6 +379,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
Config 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());
generator.StartRecording();
generator.Process(100);
@@ -398,6 +400,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
msg->experiments_description().c_str());
EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3",
msg->experiments_description().c_str());
+ EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment",
+ msg->experiments_description().c_str());
}
}
}
@@ -424,6 +428,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) {
msg->experiments_description().c_str());
EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "AEC3",
msg->experiments_description().c_str());
+ EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "AgcClippingLevelExperiment",
+ msg->experiments_description().c_str());
}
}
}
@@ -477,6 +483,31 @@ TEST_F(DebugDumpTest, VerifyLevelControllerExperimentalString) {
}
}
+TEST_F(DebugDumpTest, VerifyAgcClippingLevelExperimentalString) {
+ Config config;
+ // 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());
+ generator.StartRecording();
+ generator.Process(100);
+ generator.StopRecording();
+
+ DebugDumpReplayer debug_dump_replayer_;
+
+ ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name()));
+
+ while (const rtc::Optional<audioproc::Event> event =
+ debug_dump_replayer_.GetNextEvent()) {
+ debug_dump_replayer_.RunNextEvent();
+ if (event->type() == audioproc::Event::CONFIG) {
+ const audioproc::Config* msg = &event->config();
+ ASSERT_TRUE(msg->has_experiments_description());
+ EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment",
+ msg->experiments_description().c_str());
+ }
+ }
+}
+
TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) {
Config config;
DebugDumpGenerator generator(config, AudioProcessing::Config());
« no previous file with comments | « webrtc/modules/audio_processing/include/audio_processing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698