OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
11 #ifndef WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ | 11 #ifndef WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ |
12 #define WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ | 12 #define WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ |
13 | 13 |
14 #include <complex> | 14 #include <complex> |
| 15 #include <memory> |
15 | 16 |
16 #include "webrtc/base/scoped_ptr.h" | |
17 #include "webrtc/common_audio/blocker.h" | 17 #include "webrtc/common_audio/blocker.h" |
18 #include "webrtc/common_audio/real_fourier.h" | 18 #include "webrtc/common_audio/real_fourier.h" |
19 #include "webrtc/system_wrappers/include/aligned_array.h" | 19 #include "webrtc/system_wrappers/include/aligned_array.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 // Helper class for audio processing modules which operate on frequency domain | 23 // Helper class for audio processing modules which operate on frequency domain |
24 // input derived from the windowed time domain audio stream. | 24 // input derived from the windowed time domain audio stream. |
25 // | 25 // |
26 // The input audio chunk is sliced into possibly overlapping blocks, multiplied | 26 // The input audio chunk is sliced into possibly overlapping blocks, multiplied |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 const size_t num_in_channels_; | 106 const size_t num_in_channels_; |
107 const size_t num_out_channels_; | 107 const size_t num_out_channels_; |
108 | 108 |
109 const size_t block_length_; | 109 const size_t block_length_; |
110 const size_t chunk_length_; | 110 const size_t chunk_length_; |
111 | 111 |
112 Callback* const block_processor_; | 112 Callback* const block_processor_; |
113 Blocker blocker_; | 113 Blocker blocker_; |
114 | 114 |
115 rtc::scoped_ptr<RealFourier> fft_; | 115 std::unique_ptr<RealFourier> fft_; |
116 const size_t cplx_length_; | 116 const size_t cplx_length_; |
117 AlignedArray<float> real_buf_; | 117 AlignedArray<float> real_buf_; |
118 AlignedArray<std::complex<float> > cplx_pre_; | 118 AlignedArray<std::complex<float> > cplx_pre_; |
119 AlignedArray<std::complex<float> > cplx_post_; | 119 AlignedArray<std::complex<float> > cplx_post_; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace webrtc | 122 } // namespace webrtc |
123 | 123 |
124 #endif // WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ | 124 #endif // WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ |
125 | 125 |
OLD | NEW |