#include "modules/audio_processing/agc2/speech_level_estimator.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_minmax.h"
namespace webrtc {
namespace {
float ClampLevelEstimateDbfs(float level_estimate_dbfs) { … }
float GetInitialSpeechLevelEstimateDbfs(
const AudioProcessing::Config::GainController2::AdaptiveDigital& config) { … }
}
bool SpeechLevelEstimator::LevelEstimatorState::operator==(
const SpeechLevelEstimator::LevelEstimatorState& b) const { … }
float SpeechLevelEstimator::LevelEstimatorState::Ratio::GetRatio() const { … }
SpeechLevelEstimator::SpeechLevelEstimator(
ApmDataDumper* apm_data_dumper,
const AudioProcessing::Config::GainController2::AdaptiveDigital& config,
int adjacent_speech_frames_threshold)
: … { … }
void SpeechLevelEstimator::Update(float rms_dbfs,
float peak_dbfs,
float speech_probability) { … }
void SpeechLevelEstimator::UpdateIsConfident() { … }
void SpeechLevelEstimator::Reset() { … }
void SpeechLevelEstimator::ResetLevelEstimatorState(
LevelEstimatorState& state) const { … }
void SpeechLevelEstimator::DumpDebugData() const { … }
}