OLD | NEW |
---|---|
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 render_.render_audio.reset(nullptr); | 428 render_.render_audio.reset(nullptr); |
429 render_.render_converter.reset(nullptr); | 429 render_.render_converter.reset(nullptr); |
430 } | 430 } |
431 capture_.capture_audio.reset( | 431 capture_.capture_audio.reset( |
432 new AudioBuffer(formats_.api_format.input_stream().num_frames(), | 432 new AudioBuffer(formats_.api_format.input_stream().num_frames(), |
433 formats_.api_format.input_stream().num_channels(), | 433 formats_.api_format.input_stream().num_channels(), |
434 capture_nonlocked_.capture_processing_format.num_frames(), | 434 capture_nonlocked_.capture_processing_format.num_frames(), |
435 capture_audiobuffer_num_channels, | 435 capture_audiobuffer_num_channels, |
436 formats_.api_format.output_stream().num_frames())); | 436 formats_.api_format.output_stream().num_frames())); |
437 | 437 |
438 public_submodules_->gain_control->Initialize(num_proc_channels(), | |
439 proc_sample_rate_hz()); | |
440 | |
441 public_submodules_->echo_cancellation->Initialize( | 438 public_submodules_->echo_cancellation->Initialize( |
442 proc_sample_rate_hz(), num_reverse_channels(), num_output_channels(), | 439 proc_sample_rate_hz(), num_reverse_channels(), num_output_channels(), |
443 num_proc_channels()); | 440 num_proc_channels()); |
444 AllocateRenderQueue(); | 441 AllocateRenderQueue(); |
445 | 442 |
446 public_submodules_->echo_control_mobile->Initialize( | 443 public_submodules_->echo_control_mobile->Initialize( |
447 proc_split_sample_rate_hz(), num_reverse_channels(), | 444 proc_split_sample_rate_hz(), num_reverse_channels(), |
448 num_output_channels()); | 445 num_output_channels()); |
446 | |
peah-webrtc
2016/10/28 08:37:49
I moved the initialization of the gain_control to
| |
447 public_submodules_->gain_control->Initialize(num_proc_channels(), | |
448 proc_sample_rate_hz()); | |
449 if (constants_.use_experimental_agc) { | 449 if (constants_.use_experimental_agc) { |
450 if (!private_submodules_->agc_manager.get()) { | 450 if (!private_submodules_->agc_manager.get()) { |
451 private_submodules_->agc_manager.reset(new AgcManagerDirect( | 451 private_submodules_->agc_manager.reset(new AgcManagerDirect( |
452 public_submodules_->gain_control.get(), | 452 public_submodules_->gain_control.get(), |
453 public_submodules_->gain_control_for_experimental_agc.get(), | 453 public_submodules_->gain_control_for_experimental_agc.get(), |
454 constants_.agc_startup_min_volume)); | 454 constants_.agc_startup_min_volume)); |
455 } | 455 } |
456 private_submodules_->agc_manager->Initialize(); | 456 private_submodules_->agc_manager->Initialize(); |
457 private_submodules_->agc_manager->SetCaptureMuted( | 457 private_submodules_->agc_manager->SetCaptureMuted( |
458 capture_.output_will_be_muted); | 458 capture_.output_will_be_muted); |
459 public_submodules_->gain_control_for_experimental_agc->Initialize(); | |
peah-webrtc
2016/10/28 08:37:50
This is needed to ensure that a new set of data du
| |
459 } | 460 } |
460 InitializeTransient(); | 461 InitializeTransient(); |
461 InitializeBeamformer(); | 462 InitializeBeamformer(); |
462 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 463 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
463 InitializeIntelligibility(); | 464 InitializeIntelligibility(); |
464 #endif | 465 #endif |
465 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), | 466 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), |
466 proc_sample_rate_hz()); | 467 proc_sample_rate_hz()); |
467 public_submodules_->noise_suppression->Initialize(num_proc_channels(), | 468 public_submodules_->noise_suppression->Initialize(num_proc_channels(), |
468 proc_sample_rate_hz()); | 469 proc_sample_rate_hz()); |
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1733 capture_processing_format(kSampleRate16kHz), | 1734 capture_processing_format(kSampleRate16kHz), |
1734 split_rate(kSampleRate16kHz) {} | 1735 split_rate(kSampleRate16kHz) {} |
1735 | 1736 |
1736 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1737 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
1737 | 1738 |
1738 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1739 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
1739 | 1740 |
1740 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1741 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
1741 | 1742 |
1742 } // namespace webrtc | 1743 } // namespace webrtc |
OLD | NEW |