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

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

Issue 1563493005: Make Beamforming dynamically settable for Android platform builds (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 {kSampleRate16kHz, 1, false}, 260 {kSampleRate16kHz, 1, false},
261 {kSampleRate16kHz, 1, false}}}), 261 {kSampleRate16kHz, 1, false}}}),
262 rev_proc_format(kSampleRate16kHz, 1) {} 262 rev_proc_format(kSampleRate16kHz, 1) {}
263 ProcessingConfig api_format; 263 ProcessingConfig api_format;
264 StreamConfig rev_proc_format; 264 StreamConfig rev_proc_format;
265 } formats_; 265 } formats_;
266 266
267 // APM constants. 267 // APM constants.
268 const struct ApmConstants { 268 const struct ApmConstants {
269 ApmConstants(int agc_startup_min_volume, 269 ApmConstants(int agc_startup_min_volume,
270 const std::vector<Point> array_geometry,
271 SphericalPointf target_direction,
272 bool use_new_agc, 270 bool use_new_agc,
273 bool intelligibility_enabled, 271 bool intelligibility_enabled)
274 bool beamformer_enabled)
275 : // Format of processing streams at input/output call sites. 272 : // Format of processing streams at input/output call sites.
276 agc_startup_min_volume(agc_startup_min_volume), 273 agc_startup_min_volume(agc_startup_min_volume),
277 array_geometry(array_geometry),
278 target_direction(target_direction),
279 use_new_agc(use_new_agc), 274 use_new_agc(use_new_agc),
280 intelligibility_enabled(intelligibility_enabled), 275 intelligibility_enabled(intelligibility_enabled) {}
281 beamformer_enabled(beamformer_enabled) {}
282 int agc_startup_min_volume; 276 int agc_startup_min_volume;
283 std::vector<Point> array_geometry;
284 SphericalPointf target_direction;
285 bool use_new_agc; 277 bool use_new_agc;
286 bool intelligibility_enabled; 278 bool intelligibility_enabled;
287 bool beamformer_enabled;
288 } constants_; 279 } constants_;
289 280
290 struct ApmCaptureState { 281 struct ApmCaptureState {
291 ApmCaptureState(bool transient_suppressor_enabled) 282 ApmCaptureState(bool transient_suppressor_enabled,
283 bool beamformer_enabled,
284 const std::vector<Point> array_geometry,
hlundin-webrtc 2016/01/08 12:38:39 Can't this be a const reference? Otherwise the con
aluebs-webrtc 2016/01/08 17:59:17 Great point! Copying and pasting is a hard task...
285 SphericalPointf target_direction)
292 : aec_system_delay_jumps(-1), 286 : aec_system_delay_jumps(-1),
293 delay_offset_ms(0), 287 delay_offset_ms(0),
294 was_stream_delay_set(false), 288 was_stream_delay_set(false),
295 last_stream_delay_ms(0), 289 last_stream_delay_ms(0),
296 last_aec_system_delay_ms(0), 290 last_aec_system_delay_ms(0),
297 stream_delay_jumps(-1), 291 stream_delay_jumps(-1),
298 output_will_be_muted(false), 292 output_will_be_muted(false),
299 key_pressed(false), 293 key_pressed(false),
300 transient_suppressor_enabled(transient_suppressor_enabled), 294 transient_suppressor_enabled(transient_suppressor_enabled),
295 beamformer_enabled(beamformer_enabled),
296 array_geometry(array_geometry),
297 target_direction(target_direction),
301 fwd_proc_format(kSampleRate16kHz), 298 fwd_proc_format(kSampleRate16kHz),
302 split_rate(kSampleRate16kHz) {} 299 split_rate(kSampleRate16kHz) {}
303 int aec_system_delay_jumps; 300 int aec_system_delay_jumps;
304 int delay_offset_ms; 301 int delay_offset_ms;
305 bool was_stream_delay_set; 302 bool was_stream_delay_set;
306 int last_stream_delay_ms; 303 int last_stream_delay_ms;
307 int last_aec_system_delay_ms; 304 int last_aec_system_delay_ms;
308 int stream_delay_jumps; 305 int stream_delay_jumps;
309 bool output_will_be_muted; 306 bool output_will_be_muted;
310 bool key_pressed; 307 bool key_pressed;
311 bool transient_suppressor_enabled; 308 bool transient_suppressor_enabled;
309 bool beamformer_enabled;
310 std::vector<Point> array_geometry;
311 SphericalPointf target_direction;
312 rtc::scoped_ptr<AudioBuffer> capture_audio; 312 rtc::scoped_ptr<AudioBuffer> capture_audio;
313 // Only the rate and samples fields of fwd_proc_format_ are used because the 313 // 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 314 // forward processing number of channels is mutable and is tracked by the
315 // capture_audio_. 315 // capture_audio_.
316 StreamConfig fwd_proc_format; 316 StreamConfig fwd_proc_format;
317 int split_rate; 317 int split_rate;
318 } capture_ GUARDED_BY(crit_capture_); 318 } capture_ GUARDED_BY(crit_capture_);
319 319
320 struct ApmCaptureNonLockedState { 320 struct ApmCaptureNonLockedState {
321 ApmCaptureNonLockedState() 321 ApmCaptureNonLockedState()
(...skipping 10 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698