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..07525843c16b902a7922011514078cf7fe275a9f 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,14 +25,15 @@ 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. |
| class GainController2 { |
| public: |
| - explicit GainController2(int sample_rate_hz); |
| + explicit GainController2(const float fixed_gain_db); |
| ~GainController2(); |
| int sample_rate_hz() { return sample_rate_hz_; } |
| + void Initialize(int sample_rate_hz); |
| void Process(AudioBuffer* audio); |
| static bool Validate(const AudioProcessing::Config::GainController2& config); |
|
aleloi
2017/08/15 14:34:03
Since we already have a Config::GainController2, c
AleBzk
2017/09/14 09:21:55
Done, but using ApplyConfig() and having no args i
|
| @@ -43,11 +43,9 @@ class GainController2 { |
| private: |
| int sample_rate_hz_; |
| std::unique_ptr<ApmDataDumper> data_dumper_; |
| - DigitalGainApplier digital_gain_applier_; |
| static int instance_count_; |
|
aleloi
2017/08/15 14:34:03
Should this be atomic similarly to other instance
AleBzk
2017/09/14 09:21:55
I initially did what you suggest here, but then si
|
| - // TODO(alessiob): Remove once a meaningful gain controller mode is |
| - // implemented. |
| - const float gain_; |
| + const float fixed_gain_; |
| + |
| RTC_DISALLOW_COPY_AND_ASSIGN(GainController2); |
| }; |