Skip to content

Commit

Permalink
Enable WebRTC audio processing on WebAudio inputs.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bemasc@chromium.org committed Jun 19, 2013
1 parent 2ca6ed8 commit 9e7ee98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/renderer/media/media_stream_dependency_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9e7ee98

Please sign in to comment.