APM: remove `kClippedLevelMin` from audio_processing.h
Bug: webrtc:7494
Change-Id: I91ed3b82592d9801b113ca72a2b2221b5abf20a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278788
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38389}
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index 9405e14..1d588fe 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -2058,10 +2058,6 @@
std::string experiments_description = "";
// TODO(peah): Add semicolon-separated concatenations of experiment
// descriptions for other submodules.
- if (config_.gain_controller1.analog_gain_controller.clipped_level_min !=
- kClippedLevelMin) {
- experiments_description += "AgcClippingLevelExperiment;";
- }
if (!!submodules_.capture_post_processor) {
experiments_description += "CapturePostProcessor;";
}
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 36c4a7a3..20a086a 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -62,7 +62,6 @@
#else
static constexpr int kAgcStartupMinVolume = 0;
#endif // defined(WEBRTC_CHROMIUM_BUILD)
-static constexpr int kClippedLevelMin = 70;
// The Audio Processing Module (APM) provides a collection of voice processing
// components designed for real-time communications software.
@@ -291,7 +290,7 @@
int startup_min_volume = kAgcStartupMinVolume;
// Lowest analog microphone level that will be applied in response to
// clipping.
- int clipped_level_min = kClippedLevelMin;
+ int clipped_level_min = 70;
// If true, an adaptive digital gain is applied.
bool enable_digital_adaptive = true;
// Amount the microphone level is lowered with every clipping event.
diff --git a/modules/audio_processing/test/debug_dump_test.cc b/modules/audio_processing/test/debug_dump_test.cc
index d69d3a4..cded5de 100644
--- a/modules/audio_processing/test/debug_dump_test.cc
+++ b/modules/audio_processing/test/debug_dump_test.cc
@@ -352,8 +352,6 @@
apm_config.echo_canceller.enabled = true;
apm_config.gain_controller1.analog_gain_controller.enabled = true;
apm_config.gain_controller1.analog_gain_controller.startup_min_volume = 0;
- // Arbitrarily set clipping gain to 17, which will never be the default.
- apm_config.gain_controller1.analog_gain_controller.clipped_level_min = 17;
DebugDumpGenerator generator(apm_config);
generator.StartRecording();
generator.Process(100);
@@ -371,8 +369,6 @@
ASSERT_TRUE(msg->has_experiments_description());
EXPECT_PRED_FORMAT2(::testing::IsSubstring, "EchoController",
msg->experiments_description().c_str());
- EXPECT_PRED_FORMAT2(::testing::IsSubstring, "AgcClippingLevelExperiment",
- msg->experiments_description().c_str());
}
}
}
@@ -426,33 +422,6 @@
}
}
-TEST_F(DebugDumpTest, VerifyAgcClippingLevelExperimentalString) {
- AudioProcessing::Config apm_config;
- apm_config.gain_controller1.analog_gain_controller.enabled = true;
- apm_config.gain_controller1.analog_gain_controller.startup_min_volume = 0;
- // Arbitrarily set clipping gain to 17, which will never be the default.
- apm_config.gain_controller1.analog_gain_controller.clipped_level_min = 17;
- DebugDumpGenerator generator(apm_config);
- generator.StartRecording();
- generator.Process(100);
- generator.StopRecording();
-
- DebugDumpReplayer debug_dump_replayer_;
-
- ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name()));
-
- while (const absl::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) {
DebugDumpGenerator generator(/*apm_config=*/{});
generator.StartRecording();