| Index: webrtc/modules/audio_processing/test/audio_processing_unittest.cc
|
| diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
|
| index d82ea31c24b1713f6f87ac0e76e00f19df33dc3e..911c854d75c6aef99f3ad5ac0f27e4d572649735 100644
|
| --- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
|
| +++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc
|
| @@ -1744,6 +1744,73 @@ void ApmTest::ProcessDebugDump(const std::string& in_filename,
|
| first_init = false;
|
| }
|
|
|
| + } else if (event_msg.type() == audioproc::Event::CONFIG) {
|
| + const audioproc::Config msg = event_msg.config();
|
| + Config config;
|
| + // AEC (5)
|
| + if (msg.has_aec_enabled()) {
|
| + apm_->echo_cancellation()->Enable(msg.aec_enabled());
|
| + }
|
| + if (msg.has_aec_delay_agnostic()) {
|
| + config.Set<DelayAgnostic>(new DelayAgnostic(msg.aec_delay_agnostic()));
|
| + }
|
| + if (msg.has_aec_drift_compensation()) {
|
| + apm_->echo_cancellation()->enable_drift_compensation(
|
| + msg.aec_drift_compensation());
|
| + }
|
| + if (msg.has_aec_extended_filter()) {
|
| + config.Set<ExtendedFilter>(new ExtendedFilter(
|
| + msg.aec_extended_filter()));
|
| + }
|
| + if (msg.has_aec_suppression_level()) {
|
| + apm_->echo_cancellation()->set_suppression_level(
|
| + static_cast<webrtc::EchoCancellation::SuppressionLevel>(
|
| + msg.aec_suppression_level()));
|
| + }
|
| + // AEC-M (3)
|
| + if (msg.has_aecm_enabled()) {
|
| + apm_->echo_control_mobile()->Enable(msg.aecm_enabled());
|
| + }
|
| + if (msg.has_aecm_comfort_noise()) {
|
| + apm_->echo_control_mobile()->enable_comfort_noise(
|
| + msg.aecm_comfort_noise());
|
| + }
|
| + if (msg.has_aecm_routing_mode()) {
|
| + apm_->echo_control_mobile()->set_routing_mode(
|
| + static_cast<webrtc::EchoControlMobile::RoutingMode>(
|
| + msg.aecm_routing_mode()));
|
| + }
|
| + // AGC (4)
|
| + if (msg.has_agc_enabled()) {
|
| + apm_->gain_control()->Enable(msg.agc_enabled());
|
| + }
|
| + if (msg.has_agc_experiment()) {
|
| + // agc_experiment can only be set in the ctor of APM. So there should be
|
| + // nothing to do, unless the |apm_| is wrongly initialized.
|
| + }
|
| + if (msg.has_agc_mode()) {
|
| + apm_->gain_control()->set_mode(
|
| + static_cast<webrtc::GainControl::Mode>(msg.agc_mode()));
|
| + }
|
| + if (msg.has_agc_limiter()) {
|
| + apm_->gain_control()->enable_limiter(msg.agc_limiter());
|
| + }
|
| + // HPF (1)
|
| + if (msg.has_hpf_enabled()) {
|
| + apm_->high_pass_filter()->Enable(msg.hpf_enabled());
|
| + }
|
| + // NS (3)
|
| + if (msg.has_ns_enabled()) {
|
| + apm_->noise_suppression()->Enable(msg.ns_enabled());
|
| + }
|
| + if (msg.has_ns_experiment()) {
|
| + config.Set<ExperimentalNs>(new ExperimentalNs(msg.ns_experiment()));
|
| + }
|
| + if (msg.has_ns_level()) {
|
| + apm_->noise_suppression()->set_level(
|
| + static_cast<webrtc::NoiseSuppression::Level>(msg.ns_level()));
|
| + }
|
| + apm_->SetExtraOptions(config);
|
| } else if (event_msg.type() == audioproc::Event::REVERSE_STREAM) {
|
| const audioproc::ReverseStream msg = event_msg.reverse_stream();
|
|
|
|
|