| Index: media/audio/win/core_audio_util_win.cc
|
| diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc
|
| index 71e8d717f62f4ea2fb164167487a5efd35676644..8743f902082ec0abd47a42456dd4748d24cf436c 100644
|
| --- a/media/audio/win/core_audio_util_win.cc
|
| +++ b/media/audio/win/core_audio_util_win.cc
|
| @@ -23,6 +23,12 @@ using base::win::ScopedHandle;
|
|
|
| namespace media {
|
|
|
| +// See header file for documentation.
|
| +// {BE39AF4F-087C-423F-9303-234EC1E5B8EE}
|
| +const GUID kCommunicationsSessionId = {
|
| + 0xbe39af4f, 0x87c, 0x423f, { 0x93, 0x3, 0x23, 0x4e, 0xc1, 0xe5, 0xb8, 0xee }
|
| +};
|
| +
|
| enum { KSAUDIO_SPEAKER_UNSUPPORTED = 0 };
|
|
|
| // Converts Microsoft's channel configuration to ChannelLayout.
|
| @@ -735,6 +741,13 @@ HRESULT CoreAudioUtil::SharedModeInitialize(IAudioClient* client,
|
| const WAVEFORMATPCMEX* format,
|
| HANDLE event_handle,
|
| uint32* endpoint_buffer_size) {
|
| + return SharedModeInitializeWithSession(
|
| + client, format, event_handle, endpoint_buffer_size, NULL);
|
| +}
|
| +
|
| +HRESULT CoreAudioUtil::SharedModeInitializeWithSession(
|
| + IAudioClient* client, const WAVEFORMATPCMEX* format, HANDLE event_handle,
|
| + uint32* endpoint_buffer_size, const GUID* session_guid) {
|
| DCHECK(IsSupported());
|
|
|
| // Use default flags (i.e, dont set AUDCLNT_STREAMFLAGS_NOPERSIST) to
|
| @@ -760,7 +773,7 @@ HRESULT CoreAudioUtil::SharedModeInitialize(IAudioClient* client,
|
| 0,
|
| 0,
|
| reinterpret_cast<const WAVEFORMATEX*>(format),
|
| - NULL);
|
| + session_guid);
|
| if (FAILED(hr)) {
|
| DVLOG(1) << "IAudioClient::Initialize: " << std::hex << hr;
|
| return hr;
|
|
|