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

Unified Diff: media/audio/win/audio_manager_win.cc

Issue 10575017: Adding experimental exclusive-mode streaming to WASAPIAudioOutputStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on review comments by Chris Created 8 years, 6 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
Index: media/audio/win/audio_manager_win.cc
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index 38c461536c5bb2b787f99078d3664b74adc51cf6..8b5f72edef4bef81e81c4fb46f3744d2e8bd6355 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -26,6 +26,7 @@
#include "media/audio/win/wavein_input_win.h"
#include "media/audio/win/waveout_output_win.h"
#include "media/base/limits.h"
+#include "media/base/media_switches.h"
// Libraries required for the SetupAPI and Wbem APIs used here.
#pragma comment(lib, "setupapi.lib")
@@ -269,7 +270,14 @@ AudioOutputStream* AudioManagerWin::MakeLowLatencyOutputStream(
} else {
// TODO(henrika): improve possibility to specify audio endpoint.
// Use the default device (same as for Wave) for now to be compatible.
- stream = new WASAPIAudioOutputStream(this, params, eConsole);
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kEnableExclusiveMode)) {
+ stream = new WASAPIAudioOutputStream(
+ this, params, eConsole, AUDCLNT_SHAREMODE_EXCLUSIVE);
+ } else {
+ stream = new WASAPIAudioOutputStream(
+ this, params, eConsole, AUDCLNT_SHAREMODE_SHARED);
scherkus (not reviewing) 2012/06/27 04:20:30 fix indent
henrika (OOO until Aug 14) 2012/06/27 11:26:07 Done.
+ }
}
return stream;

Powered by Google App Engine
This is Rietveld 408576698