Index: webrtc/media/engine/webrtcvoiceengine.cc |
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc |
index d0ca9aea617322719caf5cf0184c92128e25cb07..0e835238533580da156950a9eb0005da3725fe73 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 |
@@ -883,6 +884,9 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
audioproc->SetExtraOptions(config); |
} |
+ RTC_DCHECK(apm_config.Validate()); |
+ voe_wrapper_->base()->audio_processing()->ApplyConfig(apm_config); |
the sun
2016/08/30 18:05:35
It looks to me, reading the comment above, that th
peah-webrtc
2016/08/31 08:08:31
Great point!
Done.
|
+ |
if (options.recording_sample_rate) { |
LOG(LS_INFO) << "Recording sample rate is " |
<< *options.recording_sample_rate; |