Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ |
| 13 | 13 |
| 14 #include "webrtc/common_audio/channel_buffer.h" | 14 #include "webrtc/common_audio/channel_buffer.h" |
| 15 | 15 |
| 16 namespace webrtc { | 16 namespace webrtc { |
| 17 | 17 |
| 18 template<typename T> | 18 template<typename T> |
| 19 class Beamformer { | 19 class Beamformer { |
| 20 public: | 20 public: |
| 21 virtual ~Beamformer() {} | 21 virtual ~Beamformer() {} |
| 22 | 22 |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
|
aluebs-webrtc
2015/06/25 01:04:36
Remove these blank lines.
| |
| 23 // Process one time-domain chunk of audio. The audio is expected to be split | 27 // Process one time-domain chunk of audio. The audio is expected to be split |
| 24 // into frequency bands inside the ChannelBuffer. The number of frames and | 28 // into frequency bands inside the ChannelBuffer. The number of frames and |
| 25 // channels must correspond to the constructor parameters. The same | 29 // channels must correspond to the constructor parameters. The same |
| 26 // ChannelBuffer can be passed in as |input| and |output|. | 30 // ChannelBuffer can be passed in as |input| and |output|. |
| 27 virtual void ProcessChunk(const ChannelBuffer<T>& input, | 31 virtual void ProcessChunk(const ChannelBuffer<T>& input, |
| 28 ChannelBuffer<T>* output) = 0; | 32 ChannelBuffer<T>* output) = 0; |
| 29 | 33 |
| 30 // Sample rate corresponds to the lower band. | 34 // Sample rate corresponds to the lower band. |
| 31 // Needs to be called before the the Beamformer can be used. | 35 // Needs to be called before the the Beamformer can be used. |
| 32 virtual void Initialize(int chunk_size_ms, int sample_rate_hz) = 0; | 36 virtual void Initialize(int chunk_size_ms, int sample_rate_hz) = 0; |
| 33 | 37 |
| 38 // Indicates whether a given azimuth is inside of the beam. | |
| 39 virtual bool IsInBeam(float azimuth) { return true; } | |
|
aluebs-webrtc
2015/06/25 01:04:36
We decided to change this to Point, right?
| |
| 40 | |
| 34 // Returns true if the current data contains the target signal. | 41 // Returns true if the current data contains the target signal. |
| 35 // Which signals are considered "targets" is implementation dependent. | 42 // Which signals are considered "targets" is implementation dependent. |
| 36 virtual bool is_target_present() = 0; | 43 virtual bool is_target_present() = 0; |
| 37 }; | 44 }; |
| 38 | 45 |
| 39 } // namespace webrtc | 46 } // namespace webrtc |
| 40 | 47 |
| 41 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ | 48 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_BEAMFORMER_H_ |
| OLD | NEW |