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