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 25 matching lines...) Expand all Loading... |
36 int ProcessCaptureAudio(AudioBuffer* audio, bool stream_has_echo); | 36 int ProcessCaptureAudio(AudioBuffer* audio, bool stream_has_echo); |
37 | 37 |
38 void Initialize(size_t num_proc_channels, int sample_rate_hz); | 38 void Initialize(size_t num_proc_channels, int sample_rate_hz); |
39 | 39 |
40 // GainControl implementation. | 40 // GainControl implementation. |
41 bool is_enabled() const override; | 41 bool is_enabled() const override; |
42 int stream_analog_level() override; | 42 int stream_analog_level() override; |
43 bool is_limiter_enabled() const override; | 43 bool is_limiter_enabled() const override; |
44 Mode mode() const override; | 44 Mode mode() const override; |
45 | 45 |
46 // Checks whether the module is enabled. Must only be | |
47 // called from the render side of APM as otherwise | |
48 // deadlocks may occur. | |
49 bool is_enabled_render_side_query() const; | |
50 | |
51 // Reads render side data that has been queued on the render call. | 46 // Reads render side data that has been queued on the render call. |
52 void ReadQueuedRenderData(); | 47 void ReadQueuedRenderData(); |
53 | 48 |
54 int compression_gain_db() const override; | 49 int compression_gain_db() const override; |
55 | 50 |
56 private: | 51 private: |
57 class GainController; | 52 class GainController; |
58 | 53 |
59 // GainControl implementation. | 54 // GainControl implementation. |
60 int Enable(bool enable) override; | 55 int Enable(bool enable) override; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 std::vector<std::unique_ptr<GainController>> gain_controllers_; | 95 std::vector<std::unique_ptr<GainController>> gain_controllers_; |
101 | 96 |
102 rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_); | 97 rtc::Optional<size_t> num_proc_channels_ GUARDED_BY(crit_capture_); |
103 rtc::Optional<int> sample_rate_hz_ GUARDED_BY(crit_capture_); | 98 rtc::Optional<int> sample_rate_hz_ GUARDED_BY(crit_capture_); |
104 | 99 |
105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl); | 100 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(GainControlImpl); |
106 }; | 101 }; |
107 } // namespace webrtc | 102 } // namespace webrtc |
108 | 103 |
109 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ | 104 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ |
OLD | NEW |