#include "modules/audio_processing/gain_control_impl.h"
#include <cstdint>
#include "absl/types/optional.h"
#include "api/audio/audio_processing.h"
#include "modules/audio_processing/agc/legacy/gain_control.h"
#include "modules/audio_processing/audio_buffer.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
Handle;
namespace {
int16_t MapSetting(GainControl::Mode mode) { … }
void ApplyDigitalGain(const int32_t gains[11],
size_t num_bands,
float* const* out) { … }
}
struct GainControlImpl::MonoAgcState { … };
int GainControlImpl::instance_counter_ = …;
GainControlImpl::GainControlImpl()
: … { … }
GainControlImpl::~GainControlImpl() = default;
void GainControlImpl::ProcessRenderAudio(
rtc::ArrayView<const int16_t> packed_render_audio) { … }
void GainControlImpl::PackRenderAudioBuffer(
const AudioBuffer& audio,
std::vector<int16_t>* packed_buffer) { … }
int GainControlImpl::AnalyzeCaptureAudio(const AudioBuffer& audio) { … }
int GainControlImpl::ProcessCaptureAudio(AudioBuffer* audio,
bool stream_has_echo) { … }
int GainControlImpl::set_stream_analog_level(int level) { … }
int GainControlImpl::stream_analog_level() const { … }
int GainControlImpl::set_mode(Mode mode) { … }
int GainControlImpl::set_analog_level_limits(int minimum, int maximum) { … }
int GainControlImpl::set_target_level_dbfs(int level) { … }
int GainControlImpl::set_compression_gain_db(int gain) { … }
int GainControlImpl::enable_limiter(bool enable) { … }
void GainControlImpl::Initialize(size_t num_proc_channels, int sample_rate_hz) { … }
int GainControlImpl::Configure() { … }
}