| 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 21 matching lines...) Expand all Loading... |
| 32 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 32 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 33 | 33 |
| 34 namespace webrtc { | 34 namespace webrtc { |
| 35 | 35 |
| 36 class AgcManagerDirect; | 36 class AgcManagerDirect; |
| 37 class AudioConverter; | 37 class AudioConverter; |
| 38 | 38 |
| 39 template<typename T> | 39 template<typename T> |
| 40 class Beamformer; | 40 class Beamformer; |
| 41 | 41 |
| 42 class EchoCancellationImpl; | |
| 43 class EchoControlMobileImpl; | |
| 44 class GainControlImpl; | |
| 45 class GainControlForNewAgc; | |
| 46 class HighPassFilterImpl; | |
| 47 class LevelEstimatorImpl; | |
| 48 class NoiseSuppressionImpl; | |
| 49 class ProcessingComponent; | |
| 50 class TransientSuppressor; | |
| 51 class VoiceDetectionImpl; | |
| 52 class IntelligibilityEnhancer; | |
| 53 | |
| 54 class AudioProcessingImpl : public AudioProcessing { | 42 class AudioProcessingImpl : public AudioProcessing { |
| 55 public: | 43 public: |
| 56 // Methods forcing APM to run in a single-threaded manner. | 44 // Methods forcing APM to run in a single-threaded manner. |
| 57 // Acquires both the render and capture locks. | 45 // Acquires both the render and capture locks. |
| 58 explicit AudioProcessingImpl(const Config& config); | 46 explicit AudioProcessingImpl(const Config& config); |
| 59 // AudioProcessingImpl takes ownership of beamformer. | 47 // AudioProcessingImpl takes ownership of beamformer. |
| 60 AudioProcessingImpl(const Config& config, Beamformer<float>* beamformer); | 48 AudioProcessingImpl(const Config& config, Beamformer<float>* beamformer); |
| 61 virtual ~AudioProcessingImpl(); | 49 virtual ~AudioProcessingImpl(); |
| 62 int Initialize() override; | 50 int Initialize() override; |
| 63 int Initialize(int input_sample_rate_hz, | 51 int Initialize(int input_sample_rate_hz, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void InitializeExperimentalAgc() | 176 void InitializeExperimentalAgc() |
| 189 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 177 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 190 void InitializeTransient() | 178 void InitializeTransient() |
| 191 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 179 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 192 void InitializeBeamformer() | 180 void InitializeBeamformer() |
| 193 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 181 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 194 void InitializeIntelligibility() | 182 void InitializeIntelligibility() |
| 195 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 183 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 196 void InitializeHighPassFilter() | 184 void InitializeHighPassFilter() |
| 197 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 185 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 186 void InitializeNoiseSuppression() |
| 187 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 198 int InitializeLocked(const ProcessingConfig& config) | 188 int InitializeLocked(const ProcessingConfig& config) |
| 199 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 189 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| 200 | 190 |
| 201 // Capture-side exclusive methods possibly running APM in a multi-threaded | 191 // Capture-side exclusive methods possibly running APM in a multi-threaded |
| 202 // manner that are called with the render lock already acquired. | 192 // manner that are called with the render lock already acquired. |
| 203 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 193 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 204 bool output_copy_needed(bool is_data_processed) const | 194 bool output_copy_needed(bool is_data_processed) const |
| 205 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 195 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 206 bool is_data_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 196 bool is_data_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| 207 bool synthesis_needed(bool is_data_processed) const | 197 bool synthesis_needed(bool is_data_processed) const |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 327 |
| 338 struct ApmRenderState { | 328 struct ApmRenderState { |
| 339 rtc::scoped_ptr<AudioConverter> render_converter; | 329 rtc::scoped_ptr<AudioConverter> render_converter; |
| 340 rtc::scoped_ptr<AudioBuffer> render_audio; | 330 rtc::scoped_ptr<AudioBuffer> render_audio; |
| 341 } render_ GUARDED_BY(crit_render_); | 331 } render_ GUARDED_BY(crit_render_); |
| 342 }; | 332 }; |
| 343 | 333 |
| 344 } // namespace webrtc | 334 } // namespace webrtc |
| 345 | 335 |
| 346 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 336 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| OLD | NEW |