| 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 AudioBuffer* render_buffer = render_.render_audio.get(); // For brevity. | 1111 AudioBuffer* render_buffer = render_.render_audio.get(); // For brevity. |
| 1112 if (submodule_states_.RenderMultiBandSubModulesActive() && | 1112 if (submodule_states_.RenderMultiBandSubModulesActive() && |
| 1113 SampleRateSupportsMultiBand( | 1113 SampleRateSupportsMultiBand( |
| 1114 formats_.render_processing_format.sample_rate_hz())) { | 1114 formats_.render_processing_format.sample_rate_hz())) { |
| 1115 render_buffer->SplitIntoFrequencyBands(); | 1115 render_buffer->SplitIntoFrequencyBands(); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 1118 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
| 1119 if (capture_nonlocked_.intelligibility_enabled) { | 1119 if (capture_nonlocked_.intelligibility_enabled) { |
| 1120 public_submodules_->intelligibility_enhancer->ProcessRenderAudio( | 1120 public_submodules_->intelligibility_enhancer->ProcessRenderAudio( |
| 1121 render_buffer->split_channels_f(kBand0To8kHz), | 1121 render_buffer); |
| 1122 capture_nonlocked_.split_rate, render_buffer->num_channels()); | |
| 1123 } | 1122 } |
| 1124 #endif | 1123 #endif |
| 1125 | 1124 |
| 1126 RETURN_ON_ERR( | 1125 RETURN_ON_ERR( |
| 1127 public_submodules_->echo_cancellation->ProcessRenderAudio(render_buffer)); | 1126 public_submodules_->echo_cancellation->ProcessRenderAudio(render_buffer)); |
| 1128 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessRenderAudio( | 1127 RETURN_ON_ERR(public_submodules_->echo_control_mobile->ProcessRenderAudio( |
| 1129 render_buffer)); | 1128 render_buffer)); |
| 1130 if (!constants_.use_experimental_agc) { | 1129 if (!constants_.use_experimental_agc) { |
| 1131 RETURN_ON_ERR( | 1130 RETURN_ON_ERR( |
| 1132 public_submodules_->gain_control->ProcessRenderAudio(render_buffer)); | 1131 public_submodules_->gain_control->ProcessRenderAudio(render_buffer)); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 capture_nonlocked_.split_rate); | 1334 capture_nonlocked_.split_rate); |
| 1336 } | 1335 } |
| 1337 } | 1336 } |
| 1338 | 1337 |
| 1339 void AudioProcessingImpl::InitializeIntelligibility() { | 1338 void AudioProcessingImpl::InitializeIntelligibility() { |
| 1340 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 1339 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
| 1341 if (capture_nonlocked_.intelligibility_enabled) { | 1340 if (capture_nonlocked_.intelligibility_enabled) { |
| 1342 public_submodules_->intelligibility_enhancer.reset( | 1341 public_submodules_->intelligibility_enhancer.reset( |
| 1343 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, | 1342 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, |
| 1344 render_.render_audio->num_channels(), | 1343 render_.render_audio->num_channels(), |
| 1344 render_.render_audio->num_bands(), |
| 1345 NoiseSuppressionImpl::num_noise_bins())); | 1345 NoiseSuppressionImpl::num_noise_bins())); |
| 1346 } | 1346 } |
| 1347 #endif | 1347 #endif |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 void AudioProcessingImpl::InitializeLevelController() { | 1350 void AudioProcessingImpl::InitializeLevelController() { |
| 1351 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); | 1351 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 void AudioProcessingImpl::MaybeUpdateHistograms() { | 1354 void AudioProcessingImpl::MaybeUpdateHistograms() { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 capture_processing_format(kSampleRate16kHz), | 1582 capture_processing_format(kSampleRate16kHz), |
| 1583 split_rate(kSampleRate16kHz) {} | 1583 split_rate(kSampleRate16kHz) {} |
| 1584 | 1584 |
| 1585 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1585 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
| 1586 | 1586 |
| 1587 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1587 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
| 1588 | 1588 |
| 1589 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1589 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
| 1590 | 1590 |
| 1591 } // namespace webrtc | 1591 } // namespace webrtc |
| OLD | NEW |