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

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

Issue 1952123003: Surface the IntelligibilityEnhancer on MediaConstraints (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 {kSampleRate16kHz, 1, false}, 269 {kSampleRate16kHz, 1, false},
270 {kSampleRate16kHz, 1, false}, 270 {kSampleRate16kHz, 1, false},
271 {kSampleRate16kHz, 1, false}}}), 271 {kSampleRate16kHz, 1, false}}}),
272 rev_proc_format(kSampleRate16kHz, 1) {} 272 rev_proc_format(kSampleRate16kHz, 1) {}
273 ProcessingConfig api_format; 273 ProcessingConfig api_format;
274 StreamConfig rev_proc_format; 274 StreamConfig rev_proc_format;
275 } formats_; 275 } formats_;
276 276
277 // APM constants. 277 // APM constants.
278 const struct ApmConstants { 278 const struct ApmConstants {
279 ApmConstants(int agc_startup_min_volume, 279 ApmConstants(int agc_startup_min_volume, bool use_experimental_agc)
280 bool use_experimental_agc,
281 bool intelligibility_enabled)
282 : // Format of processing streams at input/output call sites. 280 : // Format of processing streams at input/output call sites.
283 agc_startup_min_volume(agc_startup_min_volume), 281 agc_startup_min_volume(agc_startup_min_volume),
284 use_experimental_agc(use_experimental_agc), 282 use_experimental_agc(use_experimental_agc) {}
285 intelligibility_enabled(intelligibility_enabled) {}
286 int agc_startup_min_volume; 283 int agc_startup_min_volume;
287 bool use_experimental_agc; 284 bool use_experimental_agc;
288 bool intelligibility_enabled;
289 } constants_; 285 } constants_;
290 286
291 struct ApmCaptureState { 287 struct ApmCaptureState {
292 ApmCaptureState(bool transient_suppressor_enabled, 288 ApmCaptureState(bool transient_suppressor_enabled,
293 const std::vector<Point>& array_geometry, 289 const std::vector<Point>& array_geometry,
294 SphericalPointf target_direction) 290 SphericalPointf target_direction)
295 : aec_system_delay_jumps(-1), 291 : aec_system_delay_jumps(-1),
296 delay_offset_ms(0), 292 delay_offset_ms(0),
297 was_stream_delay_set(false), 293 was_stream_delay_set(false),
298 last_stream_delay_ms(0), 294 last_stream_delay_ms(0),
(...skipping 19 matching lines...) Expand all
318 SphericalPointf target_direction; 314 SphericalPointf target_direction;
319 std::unique_ptr<AudioBuffer> capture_audio; 315 std::unique_ptr<AudioBuffer> capture_audio;
320 // Only the rate and samples fields of fwd_proc_format_ are used because the 316 // Only the rate and samples fields of fwd_proc_format_ are used because the
321 // forward processing number of channels is mutable and is tracked by the 317 // forward processing number of channels is mutable and is tracked by the
322 // capture_audio_. 318 // capture_audio_.
323 StreamConfig fwd_proc_format; 319 StreamConfig fwd_proc_format;
324 int split_rate; 320 int split_rate;
325 } capture_ GUARDED_BY(crit_capture_); 321 } capture_ GUARDED_BY(crit_capture_);
326 322
327 struct ApmCaptureNonLockedState { 323 struct ApmCaptureNonLockedState {
328 ApmCaptureNonLockedState(bool beamformer_enabled) 324 ApmCaptureNonLockedState(bool beamformer_enabled,
325 bool intelligibility_enabled)
329 : fwd_proc_format(kSampleRate16kHz), 326 : fwd_proc_format(kSampleRate16kHz),
330 split_rate(kSampleRate16kHz), 327 split_rate(kSampleRate16kHz),
331 stream_delay_ms(0), 328 stream_delay_ms(0),
332 beamformer_enabled(beamformer_enabled) {} 329 beamformer_enabled(beamformer_enabled),
330 intelligibility_enabled(intelligibility_enabled) {}
333 // Only the rate and samples fields of fwd_proc_format_ are used because the 331 // Only the rate and samples fields of fwd_proc_format_ are used because the
334 // forward processing number of channels is mutable and is tracked by the 332 // forward processing number of channels is mutable and is tracked by the
335 // capture_audio_. 333 // capture_audio_.
336 StreamConfig fwd_proc_format; 334 StreamConfig fwd_proc_format;
337 int split_rate; 335 int split_rate;
338 int stream_delay_ms; 336 int stream_delay_ms;
339 bool beamformer_enabled; 337 bool beamformer_enabled;
338 bool intelligibility_enabled;
340 } capture_nonlocked_; 339 } capture_nonlocked_;
341 340
342 struct ApmRenderState { 341 struct ApmRenderState {
343 std::unique_ptr<AudioConverter> render_converter; 342 std::unique_ptr<AudioConverter> render_converter;
344 std::unique_ptr<AudioBuffer> render_audio; 343 std::unique_ptr<AudioBuffer> render_audio;
345 } render_ GUARDED_BY(crit_render_); 344 } render_ GUARDED_BY(crit_render_);
346 }; 345 };
347 346
348 } // namespace webrtc 347 } // namespace webrtc
349 348
350 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 349 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698