| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 231 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 232 void InitializeIntelligibility() | 232 void InitializeIntelligibility() |
| 233 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 233 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 234 int InitializeLocked(const ProcessingConfig& config) | 234 int InitializeLocked(const ProcessingConfig& config) |
| 235 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 235 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 236 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 236 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 237 | 237 |
| 238 void EmptyQueuedRenderAudio(); | 238 void EmptyQueuedRenderAudio(); |
| 239 void AllocateRenderQueue() | 239 void AllocateRenderQueue() |
| 240 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 240 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 241 void QueueRenderAudio(const AudioBuffer* audio) | 241 void QueueRenderAudio(AudioBuffer* audio) |
| 242 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); | 242 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| 243 | 243 |
| 244 // Capture-side exclusive methods possibly running APM in a multi-threaded | 244 // Capture-side exclusive methods possibly running APM in a multi-threaded |
| 245 // manner that are called with the render lock already acquired. | 245 // manner that are called with the render lock already acquired. |
| 246 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 246 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 247 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 247 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 248 | 248 |
| 249 // Render-side exclusive methods possibly running APM in a multi-threaded | 249 // Render-side exclusive methods possibly running APM in a multi-threaded |
| 250 // manner that are called with the render lock already acquired. | 250 // manner that are called with the render lock already acquired. |
| 251 // TODO(ekm): Remove once all clients updated to new interface. | 251 // TODO(ekm): Remove once all clients updated to new interface. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 bool level_controller_enabled = false; | 364 bool level_controller_enabled = false; |
| 365 } capture_nonlocked_; | 365 } capture_nonlocked_; |
| 366 | 366 |
| 367 struct ApmRenderState { | 367 struct ApmRenderState { |
| 368 ApmRenderState(); | 368 ApmRenderState(); |
| 369 ~ApmRenderState(); | 369 ~ApmRenderState(); |
| 370 std::unique_ptr<AudioConverter> render_converter; | 370 std::unique_ptr<AudioConverter> render_converter; |
| 371 std::unique_ptr<AudioBuffer> render_audio; | 371 std::unique_ptr<AudioBuffer> render_audio; |
| 372 } render_ GUARDED_BY(crit_render_); | 372 } render_ GUARDED_BY(crit_render_); |
| 373 | 373 |
| 374 size_t float_render_queue_element_max_size_ GUARDED_BY(crit_render_) | 374 size_t aec_render_queue_element_max_size_ GUARDED_BY(crit_render_) |
| 375 GUARDED_BY(crit_capture_) = 0; | 375 GUARDED_BY(crit_capture_) = 0; |
| 376 std::vector<float> float_render_queue_buffer_ GUARDED_BY(crit_render_); | 376 std::vector<float> aec_render_queue_buffer_ GUARDED_BY(crit_render_); |
| 377 std::vector<float> float_capture_queue_buffer_ GUARDED_BY(crit_capture_); | 377 std::vector<float> aec_capture_queue_buffer_ GUARDED_BY(crit_capture_); |
| 378 | 378 |
| 379 size_t int16_render_queue_element_max_size_ GUARDED_BY(crit_render_) | 379 size_t aecm_render_queue_element_max_size_ GUARDED_BY(crit_render_) |
| 380 GUARDED_BY(crit_capture_) = 0; | 380 GUARDED_BY(crit_capture_) = 0; |
| 381 std::vector<int16_t> int16_render_queue_buffer_ GUARDED_BY(crit_render_); | 381 std::vector<int16_t> aecm_render_queue_buffer_ GUARDED_BY(crit_render_); |
| 382 std::vector<int16_t> int16_capture_queue_buffer_ GUARDED_BY(crit_capture_); | 382 std::vector<int16_t> aecm_capture_queue_buffer_ GUARDED_BY(crit_capture_); |
| 383 |
| 384 size_t agc_render_queue_element_max_size_ GUARDED_BY(crit_render_) |
| 385 GUARDED_BY(crit_capture_) = 0; |
| 386 std::vector<int16_t> agc_render_queue_buffer_ GUARDED_BY(crit_render_); |
| 387 std::vector<int16_t> agc_capture_queue_buffer_ GUARDED_BY(crit_capture_); |
| 383 | 388 |
| 384 // Lock protection not needed. | 389 // Lock protection not needed. |
| 385 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> | 390 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> |
| 386 float_render_signal_queue_; | 391 aec_render_signal_queue_; |
| 387 std::unique_ptr< | 392 std::unique_ptr< |
| 388 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> | 393 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> |
| 389 int16_render_signal_queue_; | 394 aecm_render_signal_queue_; |
| 395 std::unique_ptr< |
| 396 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> |
| 397 agc_render_signal_queue_; |
| 390 }; | 398 }; |
| 391 | 399 |
| 392 } // namespace webrtc | 400 } // namespace webrtc |
| 393 | 401 |
| 394 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 402 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| OLD | NEW |