| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 Mode mode() const override; | 44 Mode mode() const override; |
| 45 | 45 |
| 46 // Checks whether the module is enabled. Must only be | 46 // Checks whether the module is enabled. Must only be |
| 47 // called from the render side of APM as otherwise | 47 // called from the render side of APM as otherwise |
| 48 // deadlocks may occur. | 48 // deadlocks may occur. |
| 49 bool is_enabled_render_side_query() const; | 49 bool is_enabled_render_side_query() const; |
| 50 | 50 |
| 51 // Reads render side data that has been queued on the render call. | 51 // Reads render side data that has been queued on the render call. |
| 52 void ReadQueuedRenderData(); | 52 void ReadQueuedRenderData(); |
| 53 | 53 |
| 54 int compression_gain_db() const override; |
| 55 |
| 54 private: | 56 private: |
| 55 class GainController; | 57 class GainController; |
| 56 | 58 |
| 57 // GainControl implementation. | 59 // GainControl implementation. |
| 58 int Enable(bool enable) override; | 60 int Enable(bool enable) override; |
| 59 int set_stream_analog_level(int level) override; | 61 int set_stream_analog_level(int level) override; |
| 60 int set_mode(Mode mode) override; | 62 int set_mode(Mode mode) override; |
| 61 int set_target_level_dbfs(int level) override; | 63 int set_target_level_dbfs(int level) override; |
| 62 int target_level_dbfs() const override; | 64 int target_level_dbfs() const override; |
| 63 int set_compression_gain_db(int gain) override; | 65 int set_compression_gain_db(int gain) override; |
| 64 int compression_gain_db() const override; | |
| 65 int enable_limiter(bool enable) override; | 66 int enable_limiter(bool enable) override; |
| 66 int set_analog_level_limits(int minimum, int maximum) override; | 67 int set_analog_level_limits(int minimum, int maximum) override; |
| 67 int analog_level_minimum() const override; | 68 int analog_level_minimum() const override; |
| 68 int analog_level_maximum() const override; | 69 int analog_level_maximum() const override; |
| 69 bool stream_is_saturated() const override; | 70 bool stream_is_saturated() const override; |
| 70 | 71 |
| 71 void AllocateRenderQueue(); | 72 void AllocateRenderQueue(); |
| 72 int Configure(); | 73 int Configure(); |
| 73 | 74 |
| 74 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); | 75 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 99 std::vector<std::unique_ptr<GainController>> gain_controllers_; | 100 std::vector<std::unique_ptr<GainController>> gain_controllers_; |
| 100 | 101 |
| 101 rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_); | 102 rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_); |
| 102 rtc::Optional<int> sample_rate_hz_ GUARDED_BY(crit_capture_); | 103 rtc::Optional<int> sample_rate_hz_ GUARDED_BY(crit_capture_); |
| 103 | 104 |
| 104 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl); | 105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl); |
| 105 }; | 106 }; |
| 106 } // namespace webrtc | 107 } // namespace webrtc |
| 107 | 108 |
| 108 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ | 109 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ |
| OLD | NEW |