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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 470403002: Provide experimental AudioProcessing options at creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 16f43db26f78135840eaf75a65d337140b53361c..76ce92c76d3b9f44122f0bec0c4cce8475c6d014 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -408,16 +408,20 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
return;
}
+ // Experimental options provided at creation.
+ webrtc::Config config;
+ if (goog_experimental_aec)
+ config.Set<webrtc::DelayCorrection>(new webrtc::DelayCorrection(true));
+ if (goog_experimental_ns)
+ config.Set<webrtc::ExperimentalNs>(new webrtc::ExperimentalNs(true));
+
// Create and configure the webrtc::AudioProcessing.
- audio_processing_.reset(webrtc::AudioProcessing::Create());
+ audio_processing_.reset(webrtc::AudioProcessing::Create(config));
// Enable the audio processing components.
if (echo_cancellation) {
EnableEchoCancellation(audio_processing_.get());
- if (goog_experimental_aec)
- EnableExperimentalEchoCancellation(audio_processing_.get());
-
if (playout_data_source_)
playout_data_source_->AddPlayoutSink(this);
}
@@ -425,9 +429,6 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
if (goog_ns)
EnableNoiseSuppression(audio_processing_.get());
- if (goog_experimental_ns)
- EnableExperimentalNoiseSuppression(audio_processing_.get());
-
if (goog_high_pass_filter)
EnableHighPassFilter(audio_processing_.get());
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698