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 20 matching lines...) Expand all Loading... |
31 int ProcessRenderAudio(AudioBuffer* audio); | 31 int ProcessRenderAudio(AudioBuffer* audio); |
32 int AnalyzeCaptureAudio(AudioBuffer* audio); | 32 int AnalyzeCaptureAudio(AudioBuffer* audio); |
33 int ProcessCaptureAudio(AudioBuffer* audio); | 33 int ProcessCaptureAudio(AudioBuffer* audio); |
34 | 34 |
35 // ProcessingComponent implementation. | 35 // ProcessingComponent implementation. |
36 int Initialize() override; | 36 int Initialize() override; |
37 | 37 |
38 // GainControl implementation. | 38 // GainControl implementation. |
39 bool is_enabled() const override; | 39 bool is_enabled() const override; |
40 int stream_analog_level() override; | 40 int stream_analog_level() override; |
| 41 bool is_limiter_enabled() const override; |
| 42 Mode mode() const override; |
41 | 43 |
42 private: | 44 private: |
43 // GainControl implementation. | 45 // GainControl implementation. |
44 int Enable(bool enable) override; | 46 int Enable(bool enable) override; |
45 int set_stream_analog_level(int level) override; | 47 int set_stream_analog_level(int level) override; |
46 int set_mode(Mode mode) override; | 48 int set_mode(Mode mode) override; |
47 Mode mode() const override; | |
48 int set_target_level_dbfs(int level) override; | 49 int set_target_level_dbfs(int level) override; |
49 int target_level_dbfs() const override; | 50 int target_level_dbfs() const override; |
50 int set_compression_gain_db(int gain) override; | 51 int set_compression_gain_db(int gain) override; |
51 int compression_gain_db() const override; | 52 int compression_gain_db() const override; |
52 int enable_limiter(bool enable) override; | 53 int enable_limiter(bool enable) override; |
53 bool is_limiter_enabled() const override; | |
54 int set_analog_level_limits(int minimum, int maximum) override; | 54 int set_analog_level_limits(int minimum, int maximum) override; |
55 int analog_level_minimum() const override; | 55 int analog_level_minimum() const override; |
56 int analog_level_maximum() const override; | 56 int analog_level_maximum() const override; |
57 bool stream_is_saturated() const override; | 57 bool stream_is_saturated() const override; |
58 | 58 |
59 // ProcessingComponent implementation. | 59 // ProcessingComponent implementation. |
60 void* CreateHandle() const override; | 60 void* CreateHandle() const override; |
61 int InitializeHandle(void* handle) const override; | 61 int InitializeHandle(void* handle) const override; |
62 int ConfigureHandle(void* handle) const override; | 62 int ConfigureHandle(void* handle) const override; |
63 void DestroyHandle(void* handle) const override; | 63 void DestroyHandle(void* handle) const override; |
64 int num_handles_required() const override; | 64 int num_handles_required() const override; |
65 int GetHandleError(void* handle) const override; | 65 int GetHandleError(void* handle) const override; |
66 | 66 |
67 const AudioProcessing* apm_; | 67 const AudioProcessing* apm_; |
68 CriticalSectionWrapper* crit_; | 68 CriticalSectionWrapper* crit_; |
69 Mode mode_; | 69 Mode mode_; |
70 int minimum_capture_level_; | 70 int minimum_capture_level_; |
71 int maximum_capture_level_; | 71 int maximum_capture_level_; |
72 bool limiter_enabled_; | 72 bool limiter_enabled_; |
73 int target_level_dbfs_; | 73 int target_level_dbfs_; |
74 int compression_gain_db_; | 74 int compression_gain_db_; |
75 std::vector<int> capture_levels_; | 75 std::vector<int> capture_levels_; |
76 int analog_capture_level_; | 76 int analog_capture_level_; |
77 bool was_analog_level_set_; | 77 bool was_analog_level_set_; |
78 bool stream_is_saturated_; | 78 bool stream_is_saturated_; |
79 }; | 79 }; |
80 } // namespace webrtc | 80 } // namespace webrtc |
81 | 81 |
82 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ | 82 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ |
OLD | NEW |