| 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..2f4ea80162204a270550737de449c9918a2c8465 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,16 @@ 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)) {
|
| + // Experiemental mode; use with care.
|
| + stream = new WASAPIAudioOutputStream(
|
| + this, params, eConsole, AUDCLNT_SHAREMODE_EXCLUSIVE);
|
| + } else {
|
| + // Shared mode streaming is the default mode.
|
| + stream = new WASAPIAudioOutputStream(
|
| + this, params, eConsole, AUDCLNT_SHAREMODE_SHARED);
|
| + }
|
| }
|
|
|
| return stream;
|
|
|