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 18 matching lines...) Expand all Loading... |
29 #else | 29 #else |
30 #include "webrtc/modules/audio_processing/debug.pb.h" | 30 #include "webrtc/modules/audio_processing/debug.pb.h" |
31 #endif | 31 #endif |
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 class NonlinearBeamformer; |
40 class Beamformer; | |
41 | 40 |
42 class AudioProcessingImpl : public AudioProcessing { | 41 class AudioProcessingImpl : public AudioProcessing { |
43 public: | 42 public: |
44 // Methods forcing APM to run in a single-threaded manner. | 43 // Methods forcing APM to run in a single-threaded manner. |
45 // Acquires both the render and capture locks. | 44 // Acquires both the render and capture locks. |
46 explicit AudioProcessingImpl(const Config& config); | 45 explicit AudioProcessingImpl(const Config& config); |
47 // AudioProcessingImpl takes ownership of beamformer. | 46 // AudioProcessingImpl takes ownership of beamformer. |
48 AudioProcessingImpl(const Config& config, Beamformer<float>* beamformer); | 47 AudioProcessingImpl(const Config& config, NonlinearBeamformer* beamformer); |
49 virtual ~AudioProcessingImpl(); | 48 virtual ~AudioProcessingImpl(); |
50 int Initialize() override; | 49 int Initialize() override; |
51 int Initialize(int input_sample_rate_hz, | 50 int Initialize(int input_sample_rate_hz, |
52 int output_sample_rate_hz, | 51 int output_sample_rate_hz, |
53 int reverse_sample_rate_hz, | 52 int reverse_sample_rate_hz, |
54 ChannelLayout input_layout, | 53 ChannelLayout input_layout, |
55 ChannelLayout output_layout, | 54 ChannelLayout output_layout, |
56 ChannelLayout reverse_layout) override; | 55 ChannelLayout reverse_layout) override; |
57 int Initialize(const ProcessingConfig& processing_config) override; | 56 int Initialize(const ProcessingConfig& processing_config) override; |
58 void SetExtraOptions(const Config& config) override; | 57 void SetExtraOptions(const Config& config) override; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 340 |
342 struct ApmRenderState { | 341 struct ApmRenderState { |
343 std::unique_ptr<AudioConverter> render_converter; | 342 std::unique_ptr<AudioConverter> render_converter; |
344 std::unique_ptr<AudioBuffer> render_audio; | 343 std::unique_ptr<AudioBuffer> render_audio; |
345 } render_ GUARDED_BY(crit_render_); | 344 } render_ GUARDED_BY(crit_render_); |
346 }; | 345 }; |
347 | 346 |
348 } // namespace webrtc | 347 } // namespace webrtc |
349 | 348 |
350 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 349 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |