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

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

Issue 2335633002: This CL renames variables and method and removes some one-line methods inside the APM (Closed)
Patch Set: Re-adding missing initialization Created 4 years, 3 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // |processing_config.input_stream()|. 297 // |processing_config.input_stream()|.
298 // 298 //
299 // The float interfaces accept arbitrary rates and support differing input and 299 // The float interfaces accept arbitrary rates and support differing input and
300 // output layouts, but the output must have either one channel or the same 300 // output layouts, but the output must have either one channel or the same
301 // number of channels as the input. 301 // number of channels as the input.
302 virtual int Initialize(const ProcessingConfig& processing_config) = 0; 302 virtual int Initialize(const ProcessingConfig& processing_config) = 0;
303 303
304 // Initialize with unpacked parameters. See Initialize() above for details. 304 // Initialize with unpacked parameters. See Initialize() above for details.
305 // 305 //
306 // TODO(mgraczyk): Remove once clients are updated to use the new interface. 306 // TODO(mgraczyk): Remove once clients are updated to use the new interface.
307 virtual int Initialize(int input_sample_rate_hz, 307 virtual int Initialize(int capture_input_sample_rate_hz,
308 int output_sample_rate_hz, 308 int capture_output_sample_rate_hz,
309 int reverse_sample_rate_hz, 309 int render_sample_rate_hz,
310 ChannelLayout input_layout, 310 ChannelLayout capture_input_layout,
311 ChannelLayout output_layout, 311 ChannelLayout capture_output_layout,
312 ChannelLayout reverse_layout) = 0; 312 ChannelLayout render_input_layout) = 0;
313 313
314 // TODO(peah): This method is a temporary solution used to take control 314 // TODO(peah): This method is a temporary solution used to take control
315 // over the parameters in the audio processing module and is likely to change. 315 // over the parameters in the audio processing module and is likely to change.
316 virtual void ApplyConfig(const Config& config) = 0; 316 virtual void ApplyConfig(const Config& config) = 0;
317 317
318 // Pass down additional options which don't have explicit setters. This 318 // Pass down additional options which don't have explicit setters. This
319 // ensures the options are applied immediately. 319 // ensures the options are applied immediately.
320 virtual void SetExtraOptions(const webrtc::Config& config) = 0; 320 virtual void SetExtraOptions(const webrtc::Config& config) = 0;
321 321
322 // TODO(ajm): Only intended for internal use. Make private and friend the 322 // TODO(ajm): Only intended for internal use. Make private and friend the
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // 387 //
388 // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_| 388 // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_|
389 // members of |frame| must be valid. 389 // members of |frame| must be valid.
390 virtual int ProcessReverseStream(AudioFrame* frame) = 0; 390 virtual int ProcessReverseStream(AudioFrame* frame) = 0;
391 391
392 // Accepts deinterleaved float audio with the range [-1, 1]. Each element 392 // Accepts deinterleaved float audio with the range [-1, 1]. Each element
393 // of |data| points to a channel buffer, arranged according to |layout|. 393 // of |data| points to a channel buffer, arranged according to |layout|.
394 // TODO(mgraczyk): Remove once clients are updated to use the new interface. 394 // TODO(mgraczyk): Remove once clients are updated to use the new interface.
395 virtual int AnalyzeReverseStream(const float* const* data, 395 virtual int AnalyzeReverseStream(const float* const* data,
396 size_t samples_per_channel, 396 size_t samples_per_channel,
397 int rev_sample_rate_hz, 397 int sample_rate_hz,
398 ChannelLayout layout) = 0; 398 ChannelLayout layout) = 0;
399 399
400 // Accepts deinterleaved float audio with the range [-1, 1]. Each element of 400 // Accepts deinterleaved float audio with the range [-1, 1]. Each element of
401 // |data| points to a channel buffer, arranged according to |reverse_config|. 401 // |data| points to a channel buffer, arranged according to |reverse_config|.
402 virtual int ProcessReverseStream(const float* const* src, 402 virtual int ProcessReverseStream(const float* const* src,
403 const StreamConfig& reverse_input_config, 403 const StreamConfig& input_config,
404 const StreamConfig& reverse_output_config, 404 const StreamConfig& output_config,
405 float* const* dest) = 0; 405 float* const* dest) = 0;
406 406
407 // This must be called if and only if echo processing is enabled. 407 // This must be called if and only if echo processing is enabled.
408 // 408 //
409 // Sets the |delay| in ms between ProcessReverseStream() receiving a far-end 409 // Sets the |delay| in ms between ProcessReverseStream() receiving a far-end
410 // frame and ProcessStream() receiving a near-end frame containing the 410 // frame and ProcessStream() receiving a near-end frame containing the
411 // corresponding echo. On the client-side this can be expressed as 411 // corresponding echo. On the client-side this can be expressed as
412 // delay = (t_render - t_analyze) + (t_process - t_capture) 412 // delay = (t_render - t_analyze) + (t_process - t_capture)
413 // where, 413 // where,
414 // - t_analyze is the time a frame is passed to ProcessReverseStream() and 414 // - t_analyze is the time a frame is passed to ProcessReverseStream() and
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 // This does not impact the size of frames passed to |ProcessStream()|. 995 // This does not impact the size of frames passed to |ProcessStream()|.
996 virtual int set_frame_size_ms(int size) = 0; 996 virtual int set_frame_size_ms(int size) = 0;
997 virtual int frame_size_ms() const = 0; 997 virtual int frame_size_ms() const = 0;
998 998
999 protected: 999 protected:
1000 virtual ~VoiceDetection() {} 1000 virtual ~VoiceDetection() {}
1001 }; 1001 };
1002 } // namespace webrtc 1002 } // namespace webrtc
1003 1003
1004 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 1004 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698