From 9e7ee9877dfe191ea72b99c6ae794d95f2d66cf5 Mon Sep 17 00:00:00 2001 From: "bemasc@chromium.org" Date: Wed, 19 Jun 2013 13:20:43 +0000 Subject: [PATCH] Enable WebRTC audio processing on WebAudio inputs. When a microphone input is routed through WebAudio, the constraints that were supplied when opening the device are lost. Without these constraints, we cannot determine whether the user requested to disable AEC, AGC, etc. Currently, all these audio processing functions are enabled by default for microphone inputs, but are always disabled for WebAudio inputs. They were disabled in Revision 182669 (https://codereview.chromium.org/12220121), in order to serve the needs of a loopback demo (http://simpl.info/webrtcwebaudio/). However, these settings break any actual WebRTC use (i.e. peer-to-peer). This CL changes the settings to favor the actual use case, by using settings that match the default microphone behavior, at the expense of the loopback (demo) case. BUG=none TEST=Fixes audio quality problem (echo) in p2p tests. Review URL: https://chromiumcodereview.appspot.com/16879009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207224 0039d316-1c4b-4281-b951-d872f2087c98 --- content/renderer/media/media_stream_dependency_factory.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc index eeb813905705..d6d6d0991b53 100644 --- a/content/renderer/media/media_stream_dependency_factory.cc +++ b/content/renderer/media/media_stream_dependency_factory.cc @@ -56,13 +56,13 @@ struct { const char* value; } const kWebAudioConstraints[] = { {webrtc::MediaConstraintsInterface::kEchoCancellation, - webrtc::MediaConstraintsInterface::kValueFalse}, + webrtc::MediaConstraintsInterface::kValueTrue}, {webrtc::MediaConstraintsInterface::kAutoGainControl, - webrtc::MediaConstraintsInterface::kValueFalse}, + webrtc::MediaConstraintsInterface::kValueTrue}, {webrtc::MediaConstraintsInterface::kNoiseSuppression, - webrtc::MediaConstraintsInterface::kValueFalse}, + webrtc::MediaConstraintsInterface::kValueTrue}, {webrtc::MediaConstraintsInterface::kHighpassFilter, - webrtc::MediaConstraintsInterface::kValueFalse}, + webrtc::MediaConstraintsInterface::kValueTrue}, }; class WebAudioConstraints : public RTCMediaConstraints {