OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 std::cout << " Forward: " << get_num_process_stream_calls() << std::endl; | 229 std::cout << " Forward: " << get_num_process_stream_calls() << std::endl; |
230 std::cout << " Reverse: " << get_num_reverse_process_stream_calls() | 230 std::cout << " Reverse: " << get_num_reverse_process_stream_calls() |
231 << std::endl; | 231 << std::endl; |
232 } | 232 } |
233 | 233 |
234 if (!settings_.discard_all_settings_in_aecdump) { | 234 if (!settings_.discard_all_settings_in_aecdump) { |
235 if (settings_.use_verbose_logging) { | 235 if (settings_.use_verbose_logging) { |
236 std::cout << "Setting used in config:" << std::endl; | 236 std::cout << "Setting used in config:" << std::endl; |
237 } | 237 } |
238 Config config; | 238 Config config; |
| 239 AudioProcessing::Config apm_config; |
239 | 240 |
240 if (msg.has_aec_enabled() || settings_.use_aec) { | 241 if (msg.has_aec_enabled() || settings_.use_aec) { |
241 bool enable = settings_.use_aec ? *settings_.use_aec : msg.aec_enabled(); | 242 bool enable = settings_.use_aec ? *settings_.use_aec : msg.aec_enabled(); |
242 RTC_CHECK_EQ(AudioProcessing::kNoError, | 243 RTC_CHECK_EQ(AudioProcessing::kNoError, |
243 ap_->echo_cancellation()->Enable(enable)); | 244 ap_->echo_cancellation()->Enable(enable)); |
244 if (settings_.use_verbose_logging) { | 245 if (settings_.use_verbose_logging) { |
245 std::cout << " aec_enabled: " << (enable ? "true" : "false") | 246 std::cout << " aec_enabled: " << (enable ? "true" : "false") |
246 << std::endl; | 247 << std::endl; |
247 } | 248 } |
248 } | 249 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 if (settings_.use_refined_adaptive_filter) { | 436 if (settings_.use_refined_adaptive_filter) { |
436 config.Set<RefinedAdaptiveFilter>( | 437 config.Set<RefinedAdaptiveFilter>( |
437 new RefinedAdaptiveFilter(*settings_.use_refined_adaptive_filter)); | 438 new RefinedAdaptiveFilter(*settings_.use_refined_adaptive_filter)); |
438 } | 439 } |
439 | 440 |
440 if (settings_.use_aec3) { | 441 if (settings_.use_aec3) { |
441 config.Set<EchoCanceller3>(new EchoCanceller3(*settings_.use_aec3)); | 442 config.Set<EchoCanceller3>(new EchoCanceller3(*settings_.use_aec3)); |
442 } | 443 } |
443 | 444 |
444 if (settings_.use_lc) { | 445 if (settings_.use_lc) { |
445 config.Set<LevelControl>(new LevelControl(true)); | 446 apm_config.level_controller.enabled = true; |
446 } | 447 } |
447 | 448 |
| 449 ap_->ApplyConfig(apm_config); |
448 ap_->SetExtraOptions(config); | 450 ap_->SetExtraOptions(config); |
449 } | 451 } |
450 } | 452 } |
451 | 453 |
452 void AecDumpBasedSimulator::HandleMessage(const webrtc::audioproc::Init& msg) { | 454 void AecDumpBasedSimulator::HandleMessage(const webrtc::audioproc::Init& msg) { |
453 RTC_CHECK(msg.has_sample_rate()); | 455 RTC_CHECK(msg.has_sample_rate()); |
454 RTC_CHECK(msg.has_num_input_channels()); | 456 RTC_CHECK(msg.has_num_input_channels()); |
455 RTC_CHECK(msg.has_num_reverse_channels()); | 457 RTC_CHECK(msg.has_num_reverse_channels()); |
456 RTC_CHECK(msg.has_reverse_sample_rate()); | 458 RTC_CHECK(msg.has_reverse_sample_rate()); |
457 | 459 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } | 513 } |
512 | 514 |
513 void AecDumpBasedSimulator::HandleMessage( | 515 void AecDumpBasedSimulator::HandleMessage( |
514 const webrtc::audioproc::ReverseStream& msg) { | 516 const webrtc::audioproc::ReverseStream& msg) { |
515 PrepareReverseProcessStreamCall(msg); | 517 PrepareReverseProcessStreamCall(msg); |
516 ProcessReverseStream(interface_used_ == InterfaceType::kFixedInterface); | 518 ProcessReverseStream(interface_used_ == InterfaceType::kFixedInterface); |
517 } | 519 } |
518 | 520 |
519 } // namespace test | 521 } // namespace test |
520 } // namespace webrtc | 522 } // namespace webrtc |
OLD | NEW |