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

Unified Diff: media/audio/mac/audio_manager_mac.cc

Issue 10909185: Add Mac OS X synchronized audio I/O back-end (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « no previous file | media/audio/mac/audio_synchronized_mac.h » ('j') | media/audio/mac/audio_synchronized_mac.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
===================================================================
--- media/audio/mac/audio_manager_mac.cc (revision 156920)
+++ media/audio/mac/audio_manager_mac.cc (working copy)
@@ -6,6 +6,7 @@
#include <string>
+#include "base/command_line.h"
#include "base/mac/mac_logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
@@ -14,7 +15,9 @@
#include "media/audio/mac/audio_low_latency_output_mac.h"
#include "media/audio/mac/audio_manager_mac.h"
#include "media/audio/mac/audio_output_mac.h"
+#include "media/audio/mac/audio_synchronized_mac.h"
#include "media/base/limits.h"
+#include "media/base/media_switches.h"
namespace media {
@@ -250,7 +253,18 @@
AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream(
const AudioParameters& params) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
- return new AUAudioOutputStream(this, params);
+
+ // TODO(crogers): remove once we properly handle input device selection.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWebAudioInput)) {
+ // kAudioDeviceUnknown translates to "use default" here.
+ return new AudioSynchronizedStream(this,
+ params,
+ kAudioDeviceUnknown,
+ kAudioDeviceUnknown);
+ } else {
scherkus (not reviewing) 2012/09/17 14:51:17 nit: else not needed
Chris Rogers 2012/09/17 20:44:23 Fixed: Also, please note new logic with HasUnified
+ return new AUAudioOutputStream(this, params);
+ }
}
AudioInputStream* AudioManagerMac::MakeLinearInputStream(
« no previous file with comments | « no previous file | media/audio/mac/audio_synchronized_mac.h » ('j') | media/audio/mac/audio_synchronized_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698