Chromium Code Reviews| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 int output_sample_rate_hz, | 289 int output_sample_rate_hz, |
| 290 int reverse_sample_rate_hz, | 290 int reverse_sample_rate_hz, |
| 291 ChannelLayout input_layout, | 291 ChannelLayout input_layout, |
| 292 ChannelLayout output_layout, | 292 ChannelLayout output_layout, |
| 293 ChannelLayout reverse_layout) = 0; | 293 ChannelLayout reverse_layout) = 0; |
| 294 | 294 |
| 295 // Pass down additional options which don't have explicit setters. This | 295 // Pass down additional options which don't have explicit setters. This |
| 296 // ensures the options are applied immediately. | 296 // ensures the options are applied immediately. |
| 297 virtual void SetExtraOptions(const Config& config) = 0; | 297 virtual void SetExtraOptions(const Config& config) = 0; |
| 298 | 298 |
| 299 // TODO(peah): Remove after voice engine no longer requires it to resample | |
| 300 // the reverse stream to the forward rate. | |
| 301 virtual int input_sample_rate_hz() const = 0; | |
| 302 | |
| 303 // TODO(ajm): Only intended for internal use. Make private and friend the | 299 // TODO(ajm): Only intended for internal use. Make private and friend the |
| 304 // necessary classes? | 300 // necessary classes? |
| 305 virtual int proc_sample_rate_hz() const = 0; | 301 virtual int proc_sample_rate_hz() const = 0; |
| 306 virtual int proc_split_sample_rate_hz() const = 0; | 302 virtual int proc_split_sample_rate_hz() const = 0; |
| 307 virtual size_t num_input_channels() const = 0; | 303 virtual size_t num_input_channels() const = 0; |
| 308 virtual size_t num_proc_channels() const = 0; | 304 virtual size_t num_proc_channels() const = 0; |
| 309 virtual size_t num_output_channels() const = 0; | 305 virtual size_t num_output_channels() const = 0; |
| 310 virtual size_t num_reverse_channels() const = 0; | 306 virtual size_t num_reverse_channels() const = 0; |
| 311 | 307 |
| 312 // Set to true when the output of AudioProcessing will be muted or in some | 308 // Set to true when the output of AudioProcessing will be muted or in some |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 // will not be modified. On the client-side, this is the far-end (or to be | 356 // will not be modified. On the client-side, this is the far-end (or to be |
| 361 // rendered) audio. | 357 // rendered) audio. |
| 362 // | 358 // |
| 363 // It is only necessary to provide this if echo processing is enabled, as the | 359 // It is only necessary to provide this if echo processing is enabled, as the |
| 364 // reverse stream forms the echo reference signal. It is recommended, but not | 360 // reverse stream forms the echo reference signal. It is recommended, but not |
| 365 // necessary, to provide if gain control is enabled. On the server-side this | 361 // necessary, to provide if gain control is enabled. On the server-side this |
| 366 // typically will not be used. If you're not sure what to pass in here, | 362 // typically will not be used. If you're not sure what to pass in here, |
| 367 // chances are you don't need to use it. | 363 // chances are you don't need to use it. |
| 368 // | 364 // |
| 369 // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_| | 365 // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_| |
| 370 // members of |frame| must be valid. |sample_rate_hz_| must correspond to | 366 // members of |frame| must be valid. |
| 371 // |input_sample_rate_hz()| | |
| 372 // | 367 // |
| 373 // TODO(ajm): add const to input; requires an implementation fix. | 368 // TODO(ajm): add const to input; requires an implementation fix. |
| 374 // DEPRECATED: Use |ProcessReverseStream| instead. | 369 // DEPRECATED: Use |ProcessReverseStream| instead. |
|
the sun
2016/03/10 12:49:22
If this is deprecated, can we make it a thin wrapp
aluebs-webrtc
2016/03/10 16:33:17
Actually, now that we are updating the VoE, we can
| |
| 375 // TODO(ekm): Remove once all users have updated to |ProcessReverseStream|. | 370 // TODO(ekm): Remove once all users have updated to |ProcessReverseStream|. |
| 376 virtual int AnalyzeReverseStream(AudioFrame* frame) = 0; | 371 virtual int AnalyzeReverseStream(AudioFrame* frame) = 0; |
| 377 | 372 |
| 378 // Same as |AnalyzeReverseStream|, but may modify |frame| if intelligibility | 373 // Same as |AnalyzeReverseStream|, but may modify |frame| if intelligibility |
| 379 // is enabled. | 374 // is enabled. |
| 380 virtual int ProcessReverseStream(AudioFrame* frame) = 0; | 375 virtual int ProcessReverseStream(AudioFrame* frame) = 0; |
| 381 | 376 |
| 382 // Accepts deinterleaved float audio with the range [-1, 1]. Each element | 377 // Accepts deinterleaved float audio with the range [-1, 1]. Each element |
| 383 // of |data| points to a channel buffer, arranged according to |layout|. | 378 // of |data| points to a channel buffer, arranged according to |layout|. |
| 384 // TODO(mgraczyk): Remove once clients are updated to use the new interface. | 379 // TODO(mgraczyk): Remove once clients are updated to use the new interface. |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 977 // This does not impact the size of frames passed to |ProcessStream()|. | 972 // This does not impact the size of frames passed to |ProcessStream()|. |
| 978 virtual int set_frame_size_ms(int size) = 0; | 973 virtual int set_frame_size_ms(int size) = 0; |
| 979 virtual int frame_size_ms() const = 0; | 974 virtual int frame_size_ms() const = 0; |
| 980 | 975 |
| 981 protected: | 976 protected: |
| 982 virtual ~VoiceDetection() {} | 977 virtual ~VoiceDetection() {} |
| 983 }; | 978 }; |
| 984 } // namespace webrtc | 979 } // namespace webrtc |
| 985 | 980 |
| 986 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 981 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
| OLD | NEW |