#include "modules/audio_processing/agc2/gain_applier.h"
#include "api/audio/audio_view.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "rtc_base/numerics/safe_minmax.h"
namespace webrtc {
namespace {
bool GainCloseToOne(float gain_factor) { … }
void ClipSignal(DeinterleavedView<float> signal) { … }
void ApplyGainWithRamping(float last_gain_linear,
float gain_at_end_of_frame_linear,
float inverse_samples_per_channel,
DeinterleavedView<float> float_frame) { … }
}
GainApplier::GainApplier(bool hard_clip_samples, float initial_gain_factor)
: … { … }
void GainApplier::ApplyGain(DeinterleavedView<float> signal) { … }
void GainApplier::SetGainFactor(float gain_factor) { … }
void GainApplier::Initialize(int samples_per_channel) { … }
}