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

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

Issue 1571013002: Remove additional channel constraints when Beamforming is enabled in AudioProcessing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 4 years, 11 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const StreamConfig& reverse_input_config, 95 const StreamConfig& reverse_input_config,
96 const StreamConfig& reverse_output_config, 96 const StreamConfig& reverse_output_config,
97 float* const* dest) override; 97 float* const* dest) override;
98 98
99 // Methods only accessed from APM submodules or 99 // Methods only accessed from APM submodules or
100 // from AudioProcessing tests in a single-threaded manner. 100 // from AudioProcessing tests in a single-threaded manner.
101 // Hence there is no need for locks in these. 101 // Hence there is no need for locks in these.
102 int proc_sample_rate_hz() const override; 102 int proc_sample_rate_hz() const override;
103 int proc_split_sample_rate_hz() const override; 103 int proc_split_sample_rate_hz() const override;
104 int num_input_channels() const override; 104 int num_input_channels() const override;
105 int num_proc_channels() const override;
105 int num_output_channels() const override; 106 int num_output_channels() const override;
106 int num_reverse_channels() const override; 107 int num_reverse_channels() const override;
107 int stream_delay_ms() const override; 108 int stream_delay_ms() const override;
108 bool was_stream_delay_set() const override 109 bool was_stream_delay_set() const override
109 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 110 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
110 111
111 // Methods returning pointers to APM submodules. 112 // Methods returning pointers to APM submodules.
112 // No locks are aquired in those, as those locks 113 // No locks are aquired in those, as those locks
113 // would offer no protection (the submodules are 114 // would offer no protection (the submodules are
114 // created only once in a single-treaded manner 115 // created only once in a single-treaded manner
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 agc_startup_min_volume(agc_startup_min_volume), 274 agc_startup_min_volume(agc_startup_min_volume),
274 use_new_agc(use_new_agc), 275 use_new_agc(use_new_agc),
275 intelligibility_enabled(intelligibility_enabled) {} 276 intelligibility_enabled(intelligibility_enabled) {}
276 int agc_startup_min_volume; 277 int agc_startup_min_volume;
277 bool use_new_agc; 278 bool use_new_agc;
278 bool intelligibility_enabled; 279 bool intelligibility_enabled;
279 } constants_; 280 } constants_;
280 281
281 struct ApmCaptureState { 282 struct ApmCaptureState {
282 ApmCaptureState(bool transient_suppressor_enabled, 283 ApmCaptureState(bool transient_suppressor_enabled,
283 bool beamformer_enabled,
284 const std::vector<Point>& array_geometry, 284 const std::vector<Point>& array_geometry,
285 SphericalPointf target_direction) 285 SphericalPointf target_direction)
286 : aec_system_delay_jumps(-1), 286 : aec_system_delay_jumps(-1),
287 delay_offset_ms(0), 287 delay_offset_ms(0),
288 was_stream_delay_set(false), 288 was_stream_delay_set(false),
289 last_stream_delay_ms(0), 289 last_stream_delay_ms(0),
290 last_aec_system_delay_ms(0), 290 last_aec_system_delay_ms(0),
291 stream_delay_jumps(-1), 291 stream_delay_jumps(-1),
292 output_will_be_muted(false), 292 output_will_be_muted(false),
293 key_pressed(false), 293 key_pressed(false),
294 transient_suppressor_enabled(transient_suppressor_enabled), 294 transient_suppressor_enabled(transient_suppressor_enabled),
295 beamformer_enabled(beamformer_enabled),
296 array_geometry(array_geometry), 295 array_geometry(array_geometry),
297 target_direction(target_direction), 296 target_direction(target_direction),
298 fwd_proc_format(kSampleRate16kHz), 297 fwd_proc_format(kSampleRate16kHz),
299 split_rate(kSampleRate16kHz) {} 298 split_rate(kSampleRate16kHz) {}
300 int aec_system_delay_jumps; 299 int aec_system_delay_jumps;
301 int delay_offset_ms; 300 int delay_offset_ms;
302 bool was_stream_delay_set; 301 bool was_stream_delay_set;
303 int last_stream_delay_ms; 302 int last_stream_delay_ms;
304 int last_aec_system_delay_ms; 303 int last_aec_system_delay_ms;
305 int stream_delay_jumps; 304 int stream_delay_jumps;
306 bool output_will_be_muted; 305 bool output_will_be_muted;
307 bool key_pressed; 306 bool key_pressed;
308 bool transient_suppressor_enabled; 307 bool transient_suppressor_enabled;
309 bool beamformer_enabled;
310 std::vector<Point> array_geometry; 308 std::vector<Point> array_geometry;
311 SphericalPointf target_direction; 309 SphericalPointf target_direction;
312 rtc::scoped_ptr<AudioBuffer> capture_audio; 310 rtc::scoped_ptr<AudioBuffer> capture_audio;
313 // Only the rate and samples fields of fwd_proc_format_ are used because the 311 // Only the rate and samples fields of fwd_proc_format_ are used because the
314 // forward processing number of channels is mutable and is tracked by the 312 // forward processing number of channels is mutable and is tracked by the
315 // capture_audio_. 313 // capture_audio_.
316 StreamConfig fwd_proc_format; 314 StreamConfig fwd_proc_format;
317 int split_rate; 315 int split_rate;
318 } capture_ GUARDED_BY(crit_capture_); 316 } capture_ GUARDED_BY(crit_capture_);
319 317
320 struct ApmCaptureNonLockedState { 318 struct ApmCaptureNonLockedState {
321 ApmCaptureNonLockedState() 319 ApmCaptureNonLockedState(bool beamformer_enabled)
322 : fwd_proc_format(kSampleRate16kHz), 320 : fwd_proc_format(kSampleRate16kHz),
323 split_rate(kSampleRate16kHz), 321 split_rate(kSampleRate16kHz),
324 stream_delay_ms(0) {} 322 stream_delay_ms(0),
323 beamformer_enabled(beamformer_enabled) {}
325 // Only the rate and samples fields of fwd_proc_format_ are used because the 324 // Only the rate and samples fields of fwd_proc_format_ are used because the
326 // forward processing number of channels is mutable and is tracked by the 325 // forward processing number of channels is mutable and is tracked by the
327 // capture_audio_. 326 // capture_audio_.
328 StreamConfig fwd_proc_format; 327 StreamConfig fwd_proc_format;
329 int split_rate; 328 int split_rate;
330 int stream_delay_ms; 329 int stream_delay_ms;
330 bool beamformer_enabled;
331 } capture_nonlocked_; 331 } capture_nonlocked_;
332 332
333 struct ApmRenderState { 333 struct ApmRenderState {
334 rtc::scoped_ptr<AudioConverter> render_converter; 334 rtc::scoped_ptr<AudioConverter> render_converter;
335 rtc::scoped_ptr<AudioBuffer> render_audio; 335 rtc::scoped_ptr<AudioBuffer> render_audio;
336 } render_ GUARDED_BY(crit_render_); 336 } render_ GUARDED_BY(crit_render_);
337 }; 337 };
338 338
339 } // namespace webrtc 339 } // namespace webrtc
340 340
341 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 341 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_buffer.cc ('k') | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698