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 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Analyzes one time-domain chunk of audio. The audio is expected to be split | 71 // Analyzes one time-domain chunk of audio. The audio is expected to be split |
72 // into frequency bands inside the ChannelBuffer. The number of frames and | 72 // into frequency bands inside the ChannelBuffer. The number of frames and |
73 // channels must correspond to the constructor parameters. | 73 // channels must correspond to the constructor parameters. |
74 virtual void AnalyzeChunk(const ChannelBuffer<float>& data); | 74 virtual void AnalyzeChunk(const ChannelBuffer<float>& data); |
75 | 75 |
76 // Applies the postfilter mask to one chunk of audio. The audio is expected to | 76 // Applies the postfilter mask to one chunk of audio. The audio is expected to |
77 // be split into frequency bands inside the ChannelBuffer. The number of | 77 // be split into frequency bands inside the ChannelBuffer. The number of |
78 // frames and channels must correspond to the constructor parameters. | 78 // frames and channels must correspond to the constructor parameters. |
79 virtual void PostFilter(ChannelBuffer<float>* data); | 79 virtual void PostFilter(ChannelBuffer<float>* data); |
80 | 80 |
81 // TODO(aluebs): Remove once the dependencies have moved to new API. | |
82 virtual void ProcessChunk(const ChannelBuffer<float>& input, | |
83 ChannelBuffer<float>* output); | |
84 | |
85 virtual void AimAt(const SphericalPointf& target_direction); | 81 virtual void AimAt(const SphericalPointf& target_direction); |
86 | 82 |
87 virtual bool IsInBeam(const SphericalPointf& spherical_point); | 83 virtual bool IsInBeam(const SphericalPointf& spherical_point); |
88 | 84 |
89 // After processing each block |is_target_present_| is set to true if the | 85 // After processing each block |is_target_present_| is set to true if the |
90 // target signal es present and to false otherwise. This methods can be called | 86 // target signal es present and to false otherwise. This methods can be called |
91 // to know if the data is target signal or interference and process it | 87 // to know if the data is target signal or interference and process it |
92 // accordingly. | 88 // accordingly. |
93 virtual bool is_target_present() { return is_target_present_; } | 89 virtual bool is_target_present() { return is_target_present_; } |
94 | 90 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // Number of blocks after which the data is considered interference if the | 218 // Number of blocks after which the data is considered interference if the |
223 // mask does not pass |kMaskSignalThreshold|. | 219 // mask does not pass |kMaskSignalThreshold|. |
224 size_t hold_target_blocks_; | 220 size_t hold_target_blocks_; |
225 // Number of blocks since the last mask that passed |kMaskSignalThreshold|. | 221 // Number of blocks since the last mask that passed |kMaskSignalThreshold|. |
226 size_t interference_blocks_count_; | 222 size_t interference_blocks_count_; |
227 }; | 223 }; |
228 | 224 |
229 } // namespace webrtc | 225 } // namespace webrtc |
230 | 226 |
231 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ | 227 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ |
OLD | NEW |