diff --git a/modules/audio_processing/agc2/input_volume_controller.cc b/modules/audio_processing/agc2/input_volume_controller.cc index 8617d6c974..76d81d8c59 100644 --- a/modules/audio_processing/agc2/input_volume_controller.cc +++ b/modules/audio_processing/agc2/input_volume_controller.cc @@ -440,7 +440,7 @@ void InputVolumeController::AnalyzePreProcess(const AudioBuffer& audio_buffer) { for (int channel = 0; channel < num_capture_channels_; ++channel) { const auto step = clipping_predictor_->EstimateClippedLevelStep( channel, recommended_input_volume_, clipped_level_step_, - channel_controllers_[channel]->min_mic_level(), kMaxMicLevel); + channel_controllers_[channel]->clipped_level_min(), kMaxMicLevel); if (step.has_value()) { predicted_step = std::max(predicted_step, step.value()); clipping_predicted = true; diff --git a/modules/audio_processing/agc2/input_volume_controller.h b/modules/audio_processing/agc2/input_volume_controller.h index b832176fd4..941dd59b70 100644 --- a/modules/audio_processing/agc2/input_volume_controller.h +++ b/modules/audio_processing/agc2/input_volume_controller.h @@ -208,6 +208,8 @@ class MonoInputVolumeController { void ActivateLogging() { log_to_histograms_ = true; } + int clipped_level_min() const { return clipped_level_min_; } + // Only used for testing. int min_mic_level() const { return min_mic_level_; }