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 |
11 #include "webrtc/modules/audio_processing/audio_processing_impl.h" | 11 #include "webrtc/modules/audio_processing/audio_processing_impl.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/base/platform_file.h" | 16 #include "webrtc/base/platform_file.h" |
17 #include "webrtc/base/trace_event.h" | 17 #include "webrtc/base/trace_event.h" |
18 #include "webrtc/common_audio/audio_converter.h" | 18 #include "webrtc/common_audio/audio_converter.h" |
19 #include "webrtc/common_audio/channel_buffer.h" | 19 #include "webrtc/common_audio/channel_buffer.h" |
20 #include "webrtc/common_audio/include/audio_util.h" | 20 #include "webrtc/common_audio/include/audio_util.h" |
21 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" | 21 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" |
22 #include "webrtc/modules/audio_processing/aec/aec_core.h" | 22 #include "webrtc/modules/audio_processing/aec/aec_core.h" |
23 #include "webrtc/modules/audio_processing/agc/agc_manager_direct.h" | 23 #include "webrtc/modules/audio_processing/agc/agc_manager_direct.h" |
24 #include "webrtc/modules/audio_processing/audio_buffer.h" | 24 #include "webrtc/modules/audio_processing/audio_buffer.h" |
25 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" | 25 #include "webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h" |
26 #include "webrtc/modules/audio_processing/biquad_high_pass_filter.h" | |
26 #include "webrtc/modules/audio_processing/common.h" | 27 #include "webrtc/modules/audio_processing/common.h" |
27 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" | 28 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" |
28 #include "webrtc/modules/audio_processing/echo_control_mobile_impl.h" | 29 #include "webrtc/modules/audio_processing/echo_control_mobile_impl.h" |
29 #include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h" | 30 #include "webrtc/modules/audio_processing/gain_control_for_experimental_agc.h" |
30 #include "webrtc/modules/audio_processing/gain_control_impl.h" | 31 #include "webrtc/modules/audio_processing/gain_control_impl.h" |
31 #include "webrtc/modules/audio_processing/high_pass_filter_impl.h" | 32 #include "webrtc/modules/audio_processing/high_pass_filter_impl.h" |
32 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 33 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
33 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc er.h" | 34 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc er.h" |
34 #endif | 35 #endif |
35 #include "webrtc/modules/audio_processing/level_controller/level_controller.h" | 36 #include "webrtc/modules/audio_processing/level_controller/level_controller.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 return false; | 212 return false; |
212 #endif | 213 #endif |
213 } | 214 } |
214 | 215 |
215 struct AudioProcessingImpl::ApmPublicSubmodules { | 216 struct AudioProcessingImpl::ApmPublicSubmodules { |
216 ApmPublicSubmodules() {} | 217 ApmPublicSubmodules() {} |
217 // Accessed externally of APM without any lock acquired. | 218 // Accessed externally of APM without any lock acquired. |
218 std::unique_ptr<EchoCancellationImpl> echo_cancellation; | 219 std::unique_ptr<EchoCancellationImpl> echo_cancellation; |
219 std::unique_ptr<EchoControlMobileImpl> echo_control_mobile; | 220 std::unique_ptr<EchoControlMobileImpl> echo_control_mobile; |
220 std::unique_ptr<GainControlImpl> gain_control; | 221 std::unique_ptr<GainControlImpl> gain_control; |
221 std::unique_ptr<HighPassFilterImpl> high_pass_filter; | 222 std::unique_ptr<HighPassFilterImpl> high_pass_filter_impl; |
the sun
2016/10/26 09:06:43
Since the HPFImpl is now just redirecting calls on
peah-webrtc
2016/10/28 05:50:28
Great suggestion!
I added it to the APM class. I d
| |
222 std::unique_ptr<LevelEstimatorImpl> level_estimator; | 223 std::unique_ptr<LevelEstimatorImpl> level_estimator; |
223 std::unique_ptr<NoiseSuppressionImpl> noise_suppression; | 224 std::unique_ptr<NoiseSuppressionImpl> noise_suppression; |
224 std::unique_ptr<VoiceDetectionImpl> voice_detection; | 225 std::unique_ptr<VoiceDetectionImpl> voice_detection; |
225 std::unique_ptr<GainControlForExperimentalAgc> | 226 std::unique_ptr<GainControlForExperimentalAgc> |
226 gain_control_for_experimental_agc; | 227 gain_control_for_experimental_agc; |
227 | 228 |
228 // Accessed internally from both render and capture. | 229 // Accessed internally from both render and capture. |
229 std::unique_ptr<TransientSuppressor> transient_suppressor; | 230 std::unique_ptr<TransientSuppressor> transient_suppressor; |
230 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 231 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
231 std::unique_ptr<IntelligibilityEnhancer> intelligibility_enhancer; | 232 std::unique_ptr<IntelligibilityEnhancer> intelligibility_enhancer; |
232 #endif | 233 #endif |
233 }; | 234 }; |
234 | 235 |
235 struct AudioProcessingImpl::ApmPrivateSubmodules { | 236 struct AudioProcessingImpl::ApmPrivateSubmodules { |
236 explicit ApmPrivateSubmodules(NonlinearBeamformer* beamformer) | 237 explicit ApmPrivateSubmodules(NonlinearBeamformer* beamformer) |
237 : beamformer(beamformer) {} | 238 : beamformer(beamformer) {} |
238 // Accessed internally from capture or during initialization | 239 // Accessed internally from capture or during initialization |
239 std::unique_ptr<NonlinearBeamformer> beamformer; | 240 std::unique_ptr<NonlinearBeamformer> beamformer; |
240 std::unique_ptr<AgcManagerDirect> agc_manager; | 241 std::unique_ptr<AgcManagerDirect> agc_manager; |
242 std::unique_ptr<BiquadHighPassFilter> high_pass_filter; | |
241 std::unique_ptr<LevelController> level_controller; | 243 std::unique_ptr<LevelController> level_controller; |
242 }; | 244 }; |
243 | 245 |
244 AudioProcessing* AudioProcessing::Create() { | 246 AudioProcessing* AudioProcessing::Create() { |
245 webrtc::Config config; | 247 webrtc::Config config; |
246 return Create(config, nullptr); | 248 return Create(config, nullptr); |
247 } | 249 } |
248 | 250 |
249 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config) { | 251 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config) { |
250 return Create(config, nullptr); | 252 return Create(config, nullptr); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 { | 288 { |
287 rtc::CritScope cs_render(&crit_render_); | 289 rtc::CritScope cs_render(&crit_render_); |
288 rtc::CritScope cs_capture(&crit_capture_); | 290 rtc::CritScope cs_capture(&crit_capture_); |
289 | 291 |
290 public_submodules_->echo_cancellation.reset( | 292 public_submodules_->echo_cancellation.reset( |
291 new EchoCancellationImpl(&crit_render_, &crit_capture_)); | 293 new EchoCancellationImpl(&crit_render_, &crit_capture_)); |
292 public_submodules_->echo_control_mobile.reset( | 294 public_submodules_->echo_control_mobile.reset( |
293 new EchoControlMobileImpl(&crit_render_, &crit_capture_)); | 295 new EchoControlMobileImpl(&crit_render_, &crit_capture_)); |
294 public_submodules_->gain_control.reset( | 296 public_submodules_->gain_control.reset( |
295 new GainControlImpl(&crit_capture_, &crit_capture_)); | 297 new GainControlImpl(&crit_capture_, &crit_capture_)); |
296 public_submodules_->high_pass_filter.reset( | 298 public_submodules_->high_pass_filter_impl.reset( |
297 new HighPassFilterImpl(&crit_capture_)); | 299 new HighPassFilterImpl(this)); |
298 public_submodules_->level_estimator.reset( | 300 public_submodules_->level_estimator.reset( |
299 new LevelEstimatorImpl(&crit_capture_)); | 301 new LevelEstimatorImpl(&crit_capture_)); |
300 public_submodules_->noise_suppression.reset( | 302 public_submodules_->noise_suppression.reset( |
301 new NoiseSuppressionImpl(&crit_capture_)); | 303 new NoiseSuppressionImpl(&crit_capture_)); |
302 public_submodules_->voice_detection.reset( | 304 public_submodules_->voice_detection.reset( |
303 new VoiceDetectionImpl(&crit_capture_)); | 305 new VoiceDetectionImpl(&crit_capture_)); |
304 public_submodules_->gain_control_for_experimental_agc.reset( | 306 public_submodules_->gain_control_for_experimental_agc.reset( |
305 new GainControlForExperimentalAgc( | 307 new GainControlForExperimentalAgc( |
306 public_submodules_->gain_control.get(), &crit_capture_)); | 308 public_submodules_->gain_control.get(), &crit_capture_)); |
307 | 309 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 } | 457 } |
456 private_submodules_->agc_manager->Initialize(); | 458 private_submodules_->agc_manager->Initialize(); |
457 private_submodules_->agc_manager->SetCaptureMuted( | 459 private_submodules_->agc_manager->SetCaptureMuted( |
458 capture_.output_will_be_muted); | 460 capture_.output_will_be_muted); |
459 } | 461 } |
460 InitializeTransient(); | 462 InitializeTransient(); |
461 InitializeBeamformer(); | 463 InitializeBeamformer(); |
462 #if WEBRTC_INTELLIGIBILITY_ENHANCER | 464 #if WEBRTC_INTELLIGIBILITY_ENHANCER |
463 InitializeIntelligibility(); | 465 InitializeIntelligibility(); |
464 #endif | 466 #endif |
465 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), | 467 InitializeHighPassFilter(); |
466 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()); |
469 public_submodules_->voice_detection->Initialize(proc_split_sample_rate_hz()); | 470 public_submodules_->voice_detection->Initialize(proc_split_sample_rate_hz()); |
470 public_submodules_->level_estimator->Initialize(); | 471 public_submodules_->level_estimator->Initialize(); |
471 InitializeLevelController(); | 472 InitializeLevelController(); |
472 | 473 |
473 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 474 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
474 if (debug_dump_.debug_file->is_open()) { | 475 if (debug_dump_.debug_file->is_open()) { |
475 int err = WriteInitMessage(); | 476 int err = WriteInitMessage(); |
476 if (err != kNoError) { | 477 if (err != kNoError) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 capture_nonlocked_.level_controller_enabled = | 579 capture_nonlocked_.level_controller_enabled = |
579 config_.level_controller.enabled; | 580 config_.level_controller.enabled; |
580 // TODO(peah): Remove the conditional initialization to always initialize | 581 // TODO(peah): Remove the conditional initialization to always initialize |
581 // the level controller regardless of whether it is enabled or not. | 582 // the level controller regardless of whether it is enabled or not. |
582 InitializeLevelController(); | 583 InitializeLevelController(); |
583 } | 584 } |
584 LOG(LS_INFO) << "Level controller activated: " | 585 LOG(LS_INFO) << "Level controller activated: " |
585 << capture_nonlocked_.level_controller_enabled; | 586 << capture_nonlocked_.level_controller_enabled; |
586 | 587 |
587 private_submodules_->level_controller->ApplyConfig(config_.level_controller); | 588 private_submodules_->level_controller->ApplyConfig(config_.level_controller); |
589 | |
590 InitializeHighPassFilter(); | |
591 | |
592 LOG(LS_INFO) << "Highpass filter activated: " | |
the sun
2016/10/26 09:06:43
Move log line into InitializeHighPassFilter?
peah-webrtc
2016/10/28 05:50:28
That would make sense, but currently InitializeHig
| |
593 << config_.high_pass_filter.enabled; | |
588 } | 594 } |
589 | 595 |
590 void AudioProcessingImpl::SetExtraOptions(const webrtc::Config& config) { | 596 void AudioProcessingImpl::SetExtraOptions(const webrtc::Config& config) { |
591 // Run in a single-threaded manner when setting the extra options. | 597 // Run in a single-threaded manner when setting the extra options. |
592 rtc::CritScope cs_render(&crit_render_); | 598 rtc::CritScope cs_render(&crit_render_); |
593 rtc::CritScope cs_capture(&crit_capture_); | 599 rtc::CritScope cs_capture(&crit_capture_); |
594 | 600 |
595 public_submodules_->echo_cancellation->SetExtraOptions(config); | 601 public_submodules_->echo_cancellation->SetExtraOptions(config); |
596 | 602 |
597 if (capture_.transient_suppressor_enabled != | 603 if (capture_.transient_suppressor_enabled != |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
942 capture_buffer->SplitIntoFrequencyBands(); | 948 capture_buffer->SplitIntoFrequencyBands(); |
943 } | 949 } |
944 | 950 |
945 if (capture_nonlocked_.beamformer_enabled) { | 951 if (capture_nonlocked_.beamformer_enabled) { |
946 private_submodules_->beamformer->AnalyzeChunk( | 952 private_submodules_->beamformer->AnalyzeChunk( |
947 *capture_buffer->split_data_f()); | 953 *capture_buffer->split_data_f()); |
948 // Discards all channels by the leftmost one. | 954 // Discards all channels by the leftmost one. |
949 capture_buffer->set_num_channels(1); | 955 capture_buffer->set_num_channels(1); |
950 } | 956 } |
951 | 957 |
952 public_submodules_->high_pass_filter->ProcessCaptureAudio(capture_buffer); | 958 if (private_submodules_->high_pass_filter) { |
959 private_submodules_->high_pass_filter->Process(capture_buffer); | |
960 } | |
953 RETURN_ON_ERR( | 961 RETURN_ON_ERR( |
954 public_submodules_->gain_control->AnalyzeCaptureAudio(capture_buffer)); | 962 public_submodules_->gain_control->AnalyzeCaptureAudio(capture_buffer)); |
955 public_submodules_->noise_suppression->AnalyzeCaptureAudio(capture_buffer); | 963 public_submodules_->noise_suppression->AnalyzeCaptureAudio(capture_buffer); |
956 | 964 |
957 // Ensure that the stream delay was set before the call to the | 965 // Ensure that the stream delay was set before the call to the |
958 // AEC ProcessCaptureAudio function. | 966 // AEC ProcessCaptureAudio function. |
959 if (public_submodules_->echo_cancellation->is_enabled() && | 967 if (public_submodules_->echo_cancellation->is_enabled() && |
960 !was_stream_delay_set()) { | 968 !was_stream_delay_set()) { |
961 return AudioProcessing::kStreamParameterNotSetError; | 969 return AudioProcessing::kStreamParameterNotSetError; |
962 } | 970 } |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1348 } | 1356 } |
1349 | 1357 |
1350 GainControl* AudioProcessingImpl::gain_control() const { | 1358 GainControl* AudioProcessingImpl::gain_control() const { |
1351 if (constants_.use_experimental_agc) { | 1359 if (constants_.use_experimental_agc) { |
1352 return public_submodules_->gain_control_for_experimental_agc.get(); | 1360 return public_submodules_->gain_control_for_experimental_agc.get(); |
1353 } | 1361 } |
1354 return public_submodules_->gain_control.get(); | 1362 return public_submodules_->gain_control.get(); |
1355 } | 1363 } |
1356 | 1364 |
1357 HighPassFilter* AudioProcessingImpl::high_pass_filter() const { | 1365 HighPassFilter* AudioProcessingImpl::high_pass_filter() const { |
1358 return public_submodules_->high_pass_filter.get(); | 1366 return public_submodules_->high_pass_filter_impl.get(); |
1359 } | 1367 } |
1360 | 1368 |
1361 LevelEstimator* AudioProcessingImpl::level_estimator() const { | 1369 LevelEstimator* AudioProcessingImpl::level_estimator() const { |
1362 return public_submodules_->level_estimator.get(); | 1370 return public_submodules_->level_estimator.get(); |
1363 } | 1371 } |
1364 | 1372 |
1365 NoiseSuppression* AudioProcessingImpl::noise_suppression() const { | 1373 NoiseSuppression* AudioProcessingImpl::noise_suppression() const { |
1366 return public_submodules_->noise_suppression.get(); | 1374 return public_submodules_->noise_suppression.get(); |
1367 } | 1375 } |
1368 | 1376 |
1369 VoiceDetection* AudioProcessingImpl::voice_detection() const { | 1377 VoiceDetection* AudioProcessingImpl::voice_detection() const { |
1370 return public_submodules_->voice_detection.get(); | 1378 return public_submodules_->voice_detection.get(); |
1371 } | 1379 } |
1372 | 1380 |
1381 void AudioProcessingImpl::EnableHighPassFilter(bool enable) { | |
1382 config_.high_pass_filter.enabled = enable; | |
the sun
2016/10/26 09:06:43
Thread checks?
peah-webrtc
2016/10/28 05:50:28
I see now that there is a lock missing here. I fix
| |
1383 ApplyConfig(config_); | |
1384 } | |
1385 | |
1386 bool AudioProcessingImpl::IsHighPassFilterEnabled() { | |
1387 return config_.high_pass_filter.enabled; | |
1388 } | |
1389 | |
1373 bool AudioProcessingImpl::UpdateActiveSubmoduleStates() { | 1390 bool AudioProcessingImpl::UpdateActiveSubmoduleStates() { |
1374 return submodule_states_.Update( | 1391 return submodule_states_.Update( |
1375 public_submodules_->high_pass_filter->is_enabled(), | 1392 config_.high_pass_filter.enabled, |
1376 public_submodules_->echo_cancellation->is_enabled(), | 1393 public_submodules_->echo_cancellation->is_enabled(), |
1377 public_submodules_->echo_control_mobile->is_enabled(), | 1394 public_submodules_->echo_control_mobile->is_enabled(), |
1378 public_submodules_->noise_suppression->is_enabled(), | 1395 public_submodules_->noise_suppression->is_enabled(), |
1379 capture_nonlocked_.intelligibility_enabled, | 1396 capture_nonlocked_.intelligibility_enabled, |
1380 capture_nonlocked_.beamformer_enabled, | 1397 capture_nonlocked_.beamformer_enabled, |
1381 public_submodules_->gain_control->is_enabled(), | 1398 public_submodules_->gain_control->is_enabled(), |
1382 capture_nonlocked_.level_controller_enabled, | 1399 capture_nonlocked_.level_controller_enabled, |
1383 public_submodules_->voice_detection->is_enabled(), | 1400 public_submodules_->voice_detection->is_enabled(), |
1384 public_submodules_->level_estimator->is_enabled(), | 1401 public_submodules_->level_estimator->is_enabled(), |
1385 capture_.transient_suppressor_enabled); | 1402 capture_.transient_suppressor_enabled); |
(...skipping 27 matching lines...) Expand all Loading... | |
1413 if (capture_nonlocked_.intelligibility_enabled) { | 1430 if (capture_nonlocked_.intelligibility_enabled) { |
1414 public_submodules_->intelligibility_enhancer.reset( | 1431 public_submodules_->intelligibility_enhancer.reset( |
1415 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, | 1432 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, |
1416 render_.render_audio->num_channels(), | 1433 render_.render_audio->num_channels(), |
1417 render_.render_audio->num_bands(), | 1434 render_.render_audio->num_bands(), |
1418 NoiseSuppressionImpl::num_noise_bins())); | 1435 NoiseSuppressionImpl::num_noise_bins())); |
1419 } | 1436 } |
1420 #endif | 1437 #endif |
1421 } | 1438 } |
1422 | 1439 |
1440 void AudioProcessingImpl::InitializeHighPassFilter() { | |
1441 if (config_.high_pass_filter.enabled) { | |
1442 private_submodules_->high_pass_filter.reset( | |
1443 new BiquadHighPassFilter(num_proc_channels(), proc_sample_rate_hz())); | |
1444 } else { | |
1445 private_submodules_->high_pass_filter.reset(); | |
1446 } | |
1447 } | |
1448 | |
1423 void AudioProcessingImpl::InitializeLevelController() { | 1449 void AudioProcessingImpl::InitializeLevelController() { |
1424 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); | 1450 private_submodules_->level_controller->Initialize(proc_sample_rate_hz()); |
1425 } | 1451 } |
1426 | 1452 |
1427 void AudioProcessingImpl::MaybeUpdateHistograms() { | 1453 void AudioProcessingImpl::MaybeUpdateHistograms() { |
1428 static const int kMinDiffDelayMs = 60; | 1454 static const int kMinDiffDelayMs = 60; |
1429 | 1455 |
1430 if (echo_cancellation()->is_enabled()) { | 1456 if (echo_cancellation()->is_enabled()) { |
1431 // Activate delay_jumps_ counters if we know echo_cancellation is runnning. | 1457 // Activate delay_jumps_ counters if we know echo_cancellation is runnning. |
1432 // If a stream has echo we know that the echo_cancellation is in process. | 1458 // If a stream has echo we know that the echo_cancellation is in process. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1592 config.set_aecm_routing_mode(static_cast<int>( | 1618 config.set_aecm_routing_mode(static_cast<int>( |
1593 public_submodules_->echo_control_mobile->routing_mode())); | 1619 public_submodules_->echo_control_mobile->routing_mode())); |
1594 | 1620 |
1595 config.set_agc_enabled(public_submodules_->gain_control->is_enabled()); | 1621 config.set_agc_enabled(public_submodules_->gain_control->is_enabled()); |
1596 config.set_agc_mode( | 1622 config.set_agc_mode( |
1597 static_cast<int>(public_submodules_->gain_control->mode())); | 1623 static_cast<int>(public_submodules_->gain_control->mode())); |
1598 config.set_agc_limiter_enabled( | 1624 config.set_agc_limiter_enabled( |
1599 public_submodules_->gain_control->is_limiter_enabled()); | 1625 public_submodules_->gain_control->is_limiter_enabled()); |
1600 config.set_noise_robust_agc_enabled(constants_.use_experimental_agc); | 1626 config.set_noise_robust_agc_enabled(constants_.use_experimental_agc); |
1601 | 1627 |
1602 config.set_hpf_enabled(public_submodules_->high_pass_filter->is_enabled()); | 1628 config.set_hpf_enabled(config_.high_pass_filter.enabled); |
1603 | 1629 |
1604 config.set_ns_enabled(public_submodules_->noise_suppression->is_enabled()); | 1630 config.set_ns_enabled(public_submodules_->noise_suppression->is_enabled()); |
1605 config.set_ns_level( | 1631 config.set_ns_level( |
1606 static_cast<int>(public_submodules_->noise_suppression->level())); | 1632 static_cast<int>(public_submodules_->noise_suppression->level())); |
1607 | 1633 |
1608 config.set_transient_suppression_enabled( | 1634 config.set_transient_suppression_enabled( |
1609 capture_.transient_suppressor_enabled); | 1635 capture_.transient_suppressor_enabled); |
1610 config.set_intelligibility_enhancer_enabled( | 1636 config.set_intelligibility_enhancer_enabled( |
1611 capture_nonlocked_.intelligibility_enabled); | 1637 capture_nonlocked_.intelligibility_enabled); |
1612 | 1638 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1655 capture_processing_format(kSampleRate16kHz), | 1681 capture_processing_format(kSampleRate16kHz), |
1656 split_rate(kSampleRate16kHz) {} | 1682 split_rate(kSampleRate16kHz) {} |
1657 | 1683 |
1658 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1684 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
1659 | 1685 |
1660 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1686 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
1661 | 1687 |
1662 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1688 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
1663 | 1689 |
1664 } // namespace webrtc | 1690 } // namespace webrtc |
OLD | NEW |