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}
This commit is contained in:
parent
c1d5fda22c
commit
488f669724
@ -2058,10 +2058,6 @@ void AudioProcessingImpl::WriteAecDumpConfigMessage(bool forced) {
|
||||
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;";
|
||||
}
|
||||
|
||||
@ -62,7 +62,6 @@ static constexpr int kAgcStartupMinVolume = 85;
|
||||
#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 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
||||
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.
|
||||
|
||||
@ -352,8 +352,6 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
||||
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 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) {
|
||||
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, VerifyAec3ExperimentalString) {
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user