Chromium Code Reviews| 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; |