Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 // Needs to be called before the NonlinearBeamformer can be used. | 41 // Needs to be called before the NonlinearBeamformer can be used. |
| 42 void Initialize(int chunk_size_ms, int sample_rate_hz) override; | 42 void Initialize(int chunk_size_ms, int sample_rate_hz) override; |
| 43 | 43 |
| 44 // Process one time-domain chunk of audio. The audio is expected to be split | 44 // Process one time-domain chunk of audio. The audio is expected to be split |
| 45 // into frequency bands inside the ChannelBuffer. The number of frames and | 45 // into frequency bands inside the ChannelBuffer. The number of frames and |
| 46 // channels must correspond to the constructor parameters. The same | 46 // channels must correspond to the constructor parameters. The same |
| 47 // ChannelBuffer can be passed in as |input| and |output|. | 47 // ChannelBuffer can be passed in as |input| and |output|. |
| 48 void ProcessChunk(const ChannelBuffer<float>& input, | 48 void ProcessChunk(const ChannelBuffer<float>& input, |
| 49 ChannelBuffer<float>* output) override; | 49 ChannelBuffer<float>* output) override; |
| 50 | 50 |
| 51 // Indicates whether a given azimuth is inside the beam. | |
|
Andrew MacDonald
2015/06/26 02:04:24
I know we've copied the comments from the base cla
bloch
2015/06/26 03:37:28
Done.
| |
| 52 bool IsInBeam(SphericalPointf spherical_point) override; | |
| 53 | |
| 51 // After processing each block |is_target_present_| is set to true if the | 54 // After processing each block |is_target_present_| is set to true if the |
| 52 // target signal es present and to false otherwise. This methods can be called | 55 // target signal es present and to false otherwise. This methods can be called |
| 53 // to know if the data is target signal or interference and process it | 56 // to know if the data is target signal or interference and process it |
| 54 // accordingly. | 57 // accordingly. |
| 55 bool is_target_present() override { return is_target_present_; } | 58 bool is_target_present() override { return is_target_present_; } |
| 56 | 59 |
| 57 protected: | 60 protected: |
| 58 // Process one frequency-domain block of audio. This is where the fun | 61 // Process one frequency-domain block of audio. This is where the fun |
| 59 // happens. Implements LappedTransform::Callback. | 62 // happens. Implements LappedTransform::Callback. |
| 60 void ProcessAudioBlock(const complex<float>* const* input, | 63 void ProcessAudioBlock(const complex<float>* const* input, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 // Number of blocks after which the data is considered interference if the | 170 // Number of blocks after which the data is considered interference if the |
| 168 // mask does not pass |kMaskSignalThreshold|. | 171 // mask does not pass |kMaskSignalThreshold|. |
| 169 int hold_target_blocks_; | 172 int hold_target_blocks_; |
| 170 // Number of blocks since the last mask that passed |kMaskSignalThreshold|. | 173 // Number of blocks since the last mask that passed |kMaskSignalThreshold|. |
| 171 int interference_blocks_count_; | 174 int interference_blocks_count_; |
| 172 }; | 175 }; |
| 173 | 176 |
| 174 } // namespace webrtc | 177 } // namespace webrtc |
| 175 | 178 |
| 176 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ | 179 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ |
| OLD | NEW |