Chromium Code Reviews| Index: webrtc/media/engine/webrtcvoiceengine.cc |
| diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc |
| index d0ca9aea617322719caf5cf0184c92128e25cb07..e37f52679b22c5d5c5cb5b511ea8aae71318a256 100644 |
| --- a/webrtc/media/engine/webrtcvoiceengine.cc |
| +++ b/webrtc/media/engine/webrtcvoiceengine.cc |
| @@ -872,8 +872,9 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
| LOG(LS_INFO) << "Level control: " |
| << (!!level_control_ ? *level_control_ : -1); |
| + webrtc::AudioProcessing::Config apm_config; |
| if (level_control_) { |
| - config.Set<webrtc::LevelControl>(new webrtc::LevelControl(*level_control_)); |
| + apm_config.level_controller.enabled = *level_control_; |
| } |
| // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine |
| @@ -881,6 +882,8 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
| webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); |
| if (audioproc) { |
| audioproc->SetExtraOptions(config); |
| + RTC_DCHECK(apm_config.Validate()); |
|
the sun
2016/09/01 13:48:00
ApplyConfig already returns a bool - use that inst
peah-webrtc
2016/09/02 08:21:59
I don't think that this mandates a CHECK, so I do
|
| + audioproc->ApplyConfig(apm_config); |
| } |
| if (options.recording_sample_rate) { |