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

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

Issue 1933603002: Add aec-refined-adaptive-filter command line switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 | « content/public/common/content_switches.cc ('k') | no next file » | 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 869e41670616676625bcd1c13c154da54d406906..23039de63c527bbc6d704f3489a0adcb08ba90bf 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -111,6 +111,13 @@ bool GetStartupMinVolumeForAgc(int* startup_min_volume) {
base::StringToInt(min_volume_str, startup_min_volume);
}
+// Checks if the AEC's refined adaptive filter tuning was enabled on the command
+// line.
+bool UseAecRefinedAdaptiveFilter() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAecRefinedAdaptiveFilter);
+}
+
} // namespace
// Wraps AudioBus to provide access to the array of channel pointers, since this
@@ -516,6 +523,10 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
config.Set<webrtc::ExperimentalNs>(
new webrtc::ExperimentalNs(goog_experimental_ns));
config.Set<webrtc::DelayAgnostic>(new webrtc::DelayAgnostic(true));
+ if (UseAecRefinedAdaptiveFilter()) {
+ config.Set<webrtc::RefinedAdaptiveFilter>(
+ new webrtc::RefinedAdaptiveFilter(true));
+ }
if (goog_beamforming) {
const auto& geometry =
GetArrayGeometryPreferringConstraints(audio_constraints, input_params);
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698