summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorcrogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 22:17:41 +0000
committercrogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 22:17:41 +0000
commitec47eab1019b70afef54bd68a896dd150d738b07 (patch)
tree25010c3a89543cca47528a7b0d8baf90aadb32b8 /media
parent38bba49e85b947de53aa5e8e96334dbfb4906f16 (diff)
downloadchromium_src-ec47eab1019b70afef54bd68a896dd150d738b07.zip
chromium_src-ec47eab1019b70afef54bd68a896dd150d738b07.tar.gz
chromium_src-ec47eab1019b70afef54bd68a896dd150d738b07.tar.bz2
Enable the "Web Audio Input" feature by default.
We now get the proper audio input device identifier passed into WebKit and back into chromium to be able to determine if the correct device will be used that the user gave permission to access in getUserMedia(). See related WebKit work: https://bugs.webkit.org/show_bug.cgi?id=90110 https://bugs.webkit.org/show_bug.cgi?id=93756 https://bugs.webkit.org/show_bug.cgi?id=101815 https://bugs.webkit.org/show_bug.cgi?id=106490 https://bugs.webkit.org/show_bug.cgi?id=106816 https://bugs.webkit.org/show_bug.cgi?id=109494 https://bugs.webkit.org/show_bug.cgi?id=110796 and chromium work: https://codereview.chromium.org/10830268/ https://codereview.chromium.org/10916105/ https://codereview.chromium.org/10909185/ https://codereview.chromium.org/10959068 https://codereview.chromium.org/11418125/ https://codereview.chromium.org/11827040/ https://codereview.chromium.org/11878032/ https://codereview.chromium.org/12218106/ https://codereview.chromium.org/12335072/ BUG=145092 TEST=none manual tests: http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html http://dashersw.github.com/pedalboard.js/demo/ Review URL: https://codereview.chromium.org/12383064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/mac/audio_manager_mac.cc11
-rw-r--r--media/audio/win/audio_manager_win.cc6
-rw-r--r--media/audio/win/audio_unified_win_unittest.cc6
-rw-r--r--media/base/media_switches.cc3
-rw-r--r--media/base/media_switches.h2
5 files changed, 4 insertions, 24 deletions
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 15f570d..2184e12 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -298,11 +298,7 @@ AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream(
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
// TODO(crogers): support more than stereo input.
- // TODO(crogers): remove flag once we handle input device selection.
- // https://code.google.com/p/chromium/issues/detail?id=147327
- if (params.input_channels() == 2 &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableWebAudioInput)) {
+ if (params.input_channels() == 2) {
if (HasUnifiedDefaultIO())
return new AudioHardwareUnifiedStream(this, params);
@@ -344,10 +340,9 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
channel_layout = input_params.channel_layout();
input_channels = input_params.input_channels();
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableWebAudioInput)) {
+ if (input_channels > 0) {
// TODO(crogers): given the limitations of the AudioOutputStream
- // back-ends used with kEnableWebAudioInput, we hard-code to stereo.
+ // back-ends used with synchronized I/O, we hard-code to stereo.
// Specifically, this is a limitation of AudioSynchronizedStream which
// can be removed as part of the work to consolidate these back-ends.
channel_layout = CHANNEL_LAYOUT_STEREO;
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index fe129ad..fff5be5 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -315,11 +315,7 @@ AudioOutputStream* AudioManagerWin::MakeLowLatencyOutputStream(
}
// TODO(crogers): support more than stereo input.
- // TODO(henrika): remove flag once we properly handle input device selection.
- // https://code.google.com/p/chromium/issues/detail?id=147327
- if (params.input_channels() == 2 &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableWebAudioInput)) {
+ if (params.input_channels() == 2) {
if (WASAPIUnifiedStream::HasUnifiedDefaultIO()) {
DVLOG(1) << "WASAPIUnifiedStream is created.";
return new WASAPIUnifiedStream(this, params);
diff --git a/media/audio/win/audio_unified_win_unittest.cc b/media/audio/win/audio_unified_win_unittest.cc
index 89c67bd..26304f1 100644
--- a/media/audio/win/audio_unified_win_unittest.cc
+++ b/media/audio/win/audio_unified_win_unittest.cc
@@ -123,12 +123,6 @@ class UnifiedSourceCallback : public AudioOutputStream::AudioSourceCallback {
// Convenience method which ensures that we fulfill all required conditions
// to run unified audio tests on Windows.
static bool CanRunUnifiedAudioTests(AudioManager* audio_man) {
- const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- if (!cmd_line->HasSwitch(switches::kEnableWebAudioInput)) {
- DVLOG(1) << "--enable-webaudio-input must be defined to run this test.";
- return false;
- }
-
if (!CoreAudioUtil::IsSupported()) {
LOG(WARNING) << "This tests requires Windows Vista or higher.";
return false;
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index 266a9d2..e9c00f6 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -47,9 +47,6 @@ const char kDisableRendererSideMixing[] = "disable-renderer-side-mixing";
// Enable browser-side audio mixer.
const char kEnableAudioMixer[] = "enable-audio-mixer";
-// Enable live audio input with getUserMedia() and the Web Audio API.
-const char kEnableWebAudioInput[] = "enable-webaudio-input";
-
// Set number of threads to use for video decoding.
const char kVideoThreads[] = "video-threads";
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index cd092e9..a2aa987 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -39,8 +39,6 @@ MEDIA_EXPORT extern const char kDisableRendererSideMixing[];
MEDIA_EXPORT extern const char kEnableAudioMixer[];
-MEDIA_EXPORT extern const char kEnableWebAudioInput[];
-
MEDIA_EXPORT extern const char kVideoThreads[];
MEDIA_EXPORT extern const char kDisableEncryptedMedia[];