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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 struct ApmPublicSubmodules; | 141 struct ApmPublicSubmodules; |
142 struct ApmPrivateSubmodules; | 142 struct ApmPrivateSubmodules; |
143 | 143 |
144 class ApmSubmoduleStates { | 144 class ApmSubmoduleStates { |
145 public: | 145 public: |
146 ApmSubmoduleStates(); | 146 ApmSubmoduleStates(); |
147 // Updates the submodule state and returns true if it has changed. | 147 // Updates the submodule state and returns true if it has changed. |
148 bool Update(bool high_pass_filter_enabled, | 148 bool Update(bool high_pass_filter_enabled, |
149 bool echo_canceller_enabled, | 149 bool echo_canceller_enabled, |
150 bool mobile_echo_controller_enabled, | 150 bool mobile_echo_controller_enabled, |
| 151 bool residual_echo_detector_enabled, |
151 bool noise_suppressor_enabled, | 152 bool noise_suppressor_enabled, |
152 bool intelligibility_enhancer_enabled, | 153 bool intelligibility_enhancer_enabled, |
153 bool beamformer_enabled, | 154 bool beamformer_enabled, |
154 bool adaptive_gain_controller_enabled, | 155 bool adaptive_gain_controller_enabled, |
155 bool level_controller_enabled, | 156 bool level_controller_enabled, |
156 bool voice_activity_detector_enabled, | 157 bool voice_activity_detector_enabled, |
157 bool level_estimator_enabled, | 158 bool level_estimator_enabled, |
158 bool transient_suppressor_enabled); | 159 bool transient_suppressor_enabled); |
159 bool CaptureMultiBandSubModulesActive() const; | 160 bool CaptureMultiBandSubModulesActive() const; |
160 bool CaptureMultiBandProcessingActive() const; | 161 bool CaptureMultiBandProcessingActive() const; |
161 bool RenderMultiBandSubModulesActive() const; | 162 bool RenderMultiBandSubModulesActive() const; |
162 bool RenderMultiBandProcessingActive() const; | 163 bool RenderMultiBandProcessingActive() const; |
163 | 164 |
164 private: | 165 private: |
165 bool high_pass_filter_enabled_ = false; | 166 bool high_pass_filter_enabled_ = false; |
166 bool echo_canceller_enabled_ = false; | 167 bool echo_canceller_enabled_ = false; |
167 bool mobile_echo_controller_enabled_ = false; | 168 bool mobile_echo_controller_enabled_ = false; |
| 169 bool residual_echo_detector_enabled_ = false; |
168 bool noise_suppressor_enabled_ = false; | 170 bool noise_suppressor_enabled_ = false; |
169 bool intelligibility_enhancer_enabled_ = false; | 171 bool intelligibility_enhancer_enabled_ = false; |
170 bool beamformer_enabled_ = false; | 172 bool beamformer_enabled_ = false; |
171 bool adaptive_gain_controller_enabled_ = false; | 173 bool adaptive_gain_controller_enabled_ = false; |
172 bool level_controller_enabled_ = false; | 174 bool level_controller_enabled_ = false; |
173 bool level_estimator_enabled_ = false; | 175 bool level_estimator_enabled_ = false; |
174 bool voice_activity_detector_enabled_ = false; | 176 bool voice_activity_detector_enabled_ = false; |
175 bool transient_suppressor_enabled_ = false; | 177 bool transient_suppressor_enabled_ = false; |
176 bool first_update_ = true; | 178 bool first_update_ = true; |
177 }; | 179 }; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // acquired. | 227 // acquired. |
226 void InitializeTransient() | 228 void InitializeTransient() |
227 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 229 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
228 void InitializeBeamformer() | 230 void InitializeBeamformer() |
229 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 231 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
230 void InitializeIntelligibility() | 232 void InitializeIntelligibility() |
231 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 233 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
232 int InitializeLocked(const ProcessingConfig& config) | 234 int InitializeLocked(const ProcessingConfig& config) |
233 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 235 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
234 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 236 void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 237 void InitializeResidualEchoDetector() |
| 238 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
235 | 239 |
236 // Capture-side exclusive methods possibly running APM in a multi-threaded | 240 // Capture-side exclusive methods possibly running APM in a multi-threaded |
237 // manner that are called with the render lock already acquired. | 241 // manner that are called with the render lock already acquired. |
238 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 242 int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
239 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 243 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
240 | 244 |
241 // Render-side exclusive methods possibly running APM in a multi-threaded | 245 // Render-side exclusive methods possibly running APM in a multi-threaded |
242 // manner that are called with the render lock already acquired. | 246 // manner that are called with the render lock already acquired. |
243 // TODO(ekm): Remove once all clients updated to new interface. | 247 // TODO(ekm): Remove once all clients updated to new interface. |
244 int AnalyzeReverseStreamLocked(const float* const* src, | 248 int AnalyzeReverseStreamLocked(const float* const* src, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 ApmRenderState(); | 364 ApmRenderState(); |
361 ~ApmRenderState(); | 365 ~ApmRenderState(); |
362 std::unique_ptr<AudioConverter> render_converter; | 366 std::unique_ptr<AudioConverter> render_converter; |
363 std::unique_ptr<AudioBuffer> render_audio; | 367 std::unique_ptr<AudioBuffer> render_audio; |
364 } render_ GUARDED_BY(crit_render_); | 368 } render_ GUARDED_BY(crit_render_); |
365 }; | 369 }; |
366 | 370 |
367 } // namespace webrtc | 371 } // namespace webrtc |
368 | 372 |
369 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 373 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |