Index: webrtc/media/engine/webrtcvoiceengine.cc |
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc |
index d0ca9aea617322719caf5cf0184c92128e25cb07..43b006b0f69278fda89cb369f3cbd3cbaeb99a7b 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()); |
+ RTC_DCHECK(audioproc->ApplyConfig(apm_config)); |
hlundin-webrtc
2016/09/06 08:56:03
Using a DCHECK here means that ApplyConfig is only
peah-webrtc
2016/09/07 05:42:59
Ah, thanks!
Done.
|
} |
if (options.recording_sample_rate) { |