Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2292863002: Introduced new scheme for controlling the functionality inside the audio processing module (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698