summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-09 00:35:41 +0000
committercrogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-09 00:35:41 +0000
commiteba66b0c2f522302638803d3c04827b901c95ba5 (patch)
tree9894f937371bdc4584f6e867eb1344e047aa540a
parent94c470c54863b5e20105e992ce7b2a1ea94b7f10 (diff)
downloadchromium_src-eba66b0c2f522302638803d3c04827b901c95ba5.zip
chromium_src-eba66b0c2f522302638803d3c04827b901c95ba5.tar.gz
chromium_src-eba66b0c2f522302638803d3c04827b901c95ba5.tar.bz2
Revert 187073
This re-lands 187048 BUG=none TEST=none TBR=ccameron@chromium.org > Revert 187048 > based on > http://build.chromium.org/p/chromium.win/builders/Win%20Aura%20Tests%20%282%29/builds/1968 > > > 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 > > TBR=crogers@google.com > Review URL: https://codereview.chromium.org/12649007 TBR=ccameron@chromium.org Review URL: https://codereview.chromium.org/12743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187095 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc7
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/renderer/media/webrtc_local_audio_renderer.cc13
-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
9 files changed, 10 insertions, 45 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index a3792be..21126eb 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6625,12 +6625,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ASH_ENABLE_FULL_BROWSER_LIST_IN_LAUNCHER_DESCRIPTION" desc="Description for the option to enable/disable the full browser list experiment in the launcher.">
Enable full browser / tab list for the browser item in the launcher.
</message>
- <message name="IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_NAME" desc="Title for the flag to enable the webaudio input feature.">
- Web Audio Input
- </message>
- <message name="IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_DESCRIPTION" desc="Title for the flag to enable the webaudio input feature.">
- Enables live audio input using getUserMedia() and the Web Audio API.
- </message>
<message name="IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME" desc="Title for the flag to disable gesture requiment for media playback">
Disable gesture requirement for media playback.
</message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 883a654..60a542c 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1052,13 +1052,6 @@ const Experiment kExperiments[] = {
},
#endif
{
- "enable-webaudio-input",
- IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_NAME,
- IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_DESCRIPTION,
- kOsDesktop,
- SINGLE_VALUE_TYPE(switches::kEnableWebAudioInput),
- },
- {
"enable-contacts",
IDS_FLAGS_ENABLE_CONTACTS_NAME,
IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index b7c5ffc..b598f4e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -760,7 +760,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
#else
switches::kDisableWebAudio,
#endif
- switches::kEnableWebAudioInput,
switches::kDisableWebSockets,
switches::kDomAutomationController,
switches::kEnableAccessibilityLogging,
diff --git a/content/renderer/media/webrtc_local_audio_renderer.cc b/content/renderer/media/webrtc_local_audio_renderer.cc
index f24045a..ce30579 100644
--- a/content/renderer/media/webrtc_local_audio_renderer.cc
+++ b/content/renderer/media/webrtc_local_audio_renderer.cc
@@ -170,13 +170,12 @@ void WebRtcLocalAudioRenderer::Start() {
source_params.bits_per_sample(),
2 * source_params.frames_per_buffer());
sink_ = AudioDeviceFactory::NewOutputDevice();
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableWebAudioInput)) {
- // TODO(henrika): we could utilize the unified audio here instead and do
- // sink_->InitializeIO(sink_params, 2, callback_.get());
- // It would then be possible to avoid using the WebRtcAudioCapturer.
- DVLOG(1) << "enable-webaudio-input command-line flag is enabled";
- }
+
+ // TODO(henrika): we could utilize the unified audio here instead and do
+ // sink_->InitializeIO(sink_params, 2, callback_.get());
+ // It would then be possible to avoid using the WebRtcAudioCapturer.
+ DVLOG(1) << "The live audio input feature is enabled";
+
sink_->Initialize(sink_params, callback_.get());
sink_->SetSourceRenderView(source_render_view_id_);
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[];