Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 1776363002: Use ProcessReverseStream in VoiceEngines OutputMixer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@reverse2
Patch Set: Take the lock in the right place Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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.
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
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/voice_engine/output_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698