Chromium Code Reviews| Index: webrtc/modules/audio_processing/agc2/gain_controller2.h |
| diff --git a/webrtc/modules/audio_processing/agc2/gain_controller2.h b/webrtc/modules/audio_processing/agc2/gain_controller2.h |
| index 1a8bb7f39c28be3753793a09af83f8154e201121..9a141b827034d1ad6f42353a300be77734e9b420 100644 |
| --- a/webrtc/modules/audio_processing/agc2/gain_controller2.h |
| +++ b/webrtc/modules/audio_processing/agc2/gain_controller2.h |
| @@ -14,7 +14,6 @@ |
| #include <memory> |
| #include <string> |
| -#include "webrtc/modules/audio_processing/agc2/digital_gain_applier.h" |
| #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| #include "webrtc/rtc_base/constructormagic.h" |
| @@ -26,28 +25,29 @@ class AudioBuffer; |
| // Gain Controller 2 aims to automatically adjust levels by acting on the |
| // microphone gain and/or applying digital gain. |
| // |
| -// It temporarily implements a hard-coded gain mode only. |
| +// It temporarily implements a fixed gain mode with hard-clipping. |
|
peah-webrtc
2017/09/15 07:44:25
It temporarily -> Temporarily
AleBzk
2017/09/29 09:39:06
Done.
|
| class GainController2 { |
| public: |
| - explicit GainController2(int sample_rate_hz); |
| + explicit GainController2(); |
| ~GainController2(); |
| int sample_rate_hz() { return sample_rate_hz_; } |
| + float fixed_gain() { return fixed_gain_; } |
| + void Initialize(int sample_rate_hz); |
| void Process(AudioBuffer* audio); |
| + void ApplyConfig(const AudioProcessing::Config::GainController2& config); |
| static bool Validate(const AudioProcessing::Config::GainController2& config); |
| static std::string ToString( |
| const AudioProcessing::Config::GainController2& config); |
| private: |
| - int sample_rate_hz_; |
| std::unique_ptr<ApmDataDumper> data_dumper_; |
| - DigitalGainApplier digital_gain_applier_; |
| + int sample_rate_hz_; |
| + float fixed_gain_; |
| static int instance_count_; |
|
peah-webrtc
2017/09/15 07:44:25
Please move this declaration to before data_dumper
AleBzk
2017/09/29 09:39:06
Done.
|
| - // TODO(alessiob): Remove once a meaningful gain controller mode is |
| - // implemented. |
| - const float gain_; |
| + |
| RTC_DISALLOW_COPY_AND_ASSIGN(GainController2); |
| }; |