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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 117 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
118 | 118 |
119 // Methods returning pointers to APM submodules. | 119 // Methods returning pointers to APM submodules. |
120 // No locks are aquired in those, as those locks | 120 // No locks are aquired in those, as those locks |
121 // would offer no protection (the submodules are | 121 // would offer no protection (the submodules are |
122 // created only once in a single-treaded manner | 122 // created only once in a single-treaded manner |
123 // during APM creation). | 123 // during APM creation). |
124 EchoCancellation* echo_cancellation() const override; | 124 EchoCancellation* echo_cancellation() const override; |
125 EchoControlMobile* echo_control_mobile() const override; | 125 EchoControlMobile* echo_control_mobile() const override; |
126 GainControl* gain_control() const override; | 126 GainControl* gain_control() const override; |
127 // TODO(peah): Deprecate this API call. | |
127 HighPassFilter* high_pass_filter() const override; | 128 HighPassFilter* high_pass_filter() const override; |
128 LevelEstimator* level_estimator() const override; | 129 LevelEstimator* level_estimator() const override; |
129 NoiseSuppression* noise_suppression() const override; | 130 NoiseSuppression* noise_suppression() const override; |
130 VoiceDetection* voice_detection() const override; | 131 VoiceDetection* voice_detection() const override; |
131 | 132 |
133 // TODO(peah): Remove when the HighPassFilter interface has been removed. | |
134 void EnableHighPassFilter(bool enable); | |
the sun
2016/10/26 09:06:43
How about you simply expose a "const AudioProcessi
peah-webrtc
2016/10/28 05:50:28
Great suggestion!
Done.
| |
135 bool IsHighPassFilterEnabled(); | |
136 | |
132 protected: | 137 protected: |
133 // Overridden in a mock. | 138 // Overridden in a mock. |
134 virtual int InitializeLocked() | 139 virtual int InitializeLocked() |
135 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 140 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
136 | 141 |
137 private: | 142 private: |
138 // TODO(peah): These friend classes should be removed as soon as the new | 143 // TODO(peah): These friend classes should be removed as soon as the new |
139 // parameter setting scheme allows. | 144 // parameter setting scheme allows. |
140 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, DefaultBehavior); | 145 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, DefaultBehavior); |
141 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, ValidConfigBehavior); | 146 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, ValidConfigBehavior); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
227 // acquired. | 232 // acquired. |
228 void InitializeTransient() | 233 void InitializeTransient() |
229 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 234 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
230 void InitializeBeamformer() | 235 void InitializeBeamformer() |
231 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 236 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
232 void InitializeIntelligibility() | 237 void InitializeIntelligibility() |
233 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 238 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
234 int InitializeLocked(const ProcessingConfig& config) | 239 int InitializeLocked(const ProcessingConfig& config) |
235 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 240 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
236 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 241 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
242 void InitializeHighPassFilter() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | |
237 | 243 |
238 void EmptyQueuedRenderAudio(); | 244 void EmptyQueuedRenderAudio(); |
239 void AllocateRenderQueue() | 245 void AllocateRenderQueue() |
240 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 246 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
241 void QueueRenderAudio(const AudioBuffer* audio) | 247 void QueueRenderAudio(const AudioBuffer* audio) |
242 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); | 248 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
243 | 249 |
244 // Capture-side exclusive methods possibly running APM in a multi-threaded | 250 // Capture-side exclusive methods possibly running APM in a multi-threaded |
245 // manner that are called with the render lock already acquired. | 251 // manner that are called with the render lock already acquired. |
246 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 252 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 std::vector<float> capture_queue_buffer_ GUARDED_BY(crit_capture_); | 383 std::vector<float> capture_queue_buffer_ GUARDED_BY(crit_capture_); |
378 | 384 |
379 // Lock protection not needed. | 385 // Lock protection not needed. |
380 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> | 386 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> |
381 render_signal_queue_; | 387 render_signal_queue_; |
382 }; | 388 }; |
383 | 389 |
384 } // namespace webrtc | 390 } // namespace webrtc |
385 | 391 |
386 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 392 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |