mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
AGC2 adaptive digital: remove unnecessary flag.
Bug: webrtc:7494 Change-Id: I03d854ab082cb8fcf3f01a431c06496f93d3063b Reviewed-on: https://webrtc-review.googlesource.com/c/111601 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25729}
This commit is contained in:
parent
8da7b350cf
commit
ecf6315a7f
2 changed files with 2 additions and 4 deletions
|
@ -47,14 +47,14 @@ void GainController2::Process(AudioBuffer* audio) {
|
|||
audio->num_frames());
|
||||
// Apply fixed gain first, then the adaptive one.
|
||||
gain_applier_.ApplyGain(float_frame);
|
||||
if (adaptive_digital_mode_) {
|
||||
if (config_.adaptive_digital.enabled) {
|
||||
adaptive_agc_->Process(float_frame, limiter_.LastAudioLevel());
|
||||
}
|
||||
limiter_.Process(float_frame);
|
||||
}
|
||||
|
||||
void GainController2::NotifyAnalogLevel(int level) {
|
||||
if (analog_level_ != level && adaptive_digital_mode_) {
|
||||
if (analog_level_ != level && config_.adaptive_digital.enabled) {
|
||||
adaptive_agc_->Reset();
|
||||
}
|
||||
analog_level_ = level;
|
||||
|
@ -72,7 +72,6 @@ void GainController2::ApplyConfig(
|
|||
limiter_.Reset();
|
||||
}
|
||||
gain_applier_.SetGainFactor(DbToRatio(config_.fixed_digital.gain_db));
|
||||
adaptive_digital_mode_ = config_.adaptive_digital.enabled;
|
||||
adaptive_agc_.reset(new AdaptiveAgc(data_dumper_.get(), config_));
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ class GainController2 {
|
|||
std::unique_ptr<AdaptiveAgc> adaptive_agc_;
|
||||
Limiter limiter_;
|
||||
int analog_level_ = -1;
|
||||
bool adaptive_digital_mode_ = true;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(GainController2);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue