Nikolay Sivov : mf/sar: Use MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID to initialize audio client.
Alexandre Julliard
julliard at winehq.org
Thu May 14 16:17:44 CDT 2020
Module: wine
Branch: master
Commit: 5f5549f1545b9e4908543fd0dcbdfdd444c33255
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5f5549f1545b9e4908543fd0dcbdfdd444c33255
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu May 14 01:52:07 2020 +0300
mf/sar: Use MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID to initialize audio client.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mf/sar.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c
index aa0e4eb853..89a517b135 100644
--- a/dlls/mf/sar.c
+++ b/dlls/mf/sar.c
@@ -98,6 +98,7 @@ struct audio_renderer
struct
{
unsigned int flags;
+ GUID session_id;
} stream_config;
HANDLE buffer_ready_event;
MFWORKITEM_KEY buffer_ready_key;
@@ -1176,7 +1177,10 @@ static HRESULT sar_create_mmdevice(IMFAttributes *attributes, struct audio_rende
/* Configuration attributes to be used later for audio client initialization. */
if (attributes)
+ {
IMFAttributes_GetUINT32(attributes, &MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS, &renderer->stream_config.flags);
+ IMFAttributes_GetGUID(attributes, &MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID, &renderer->stream_config.session_id);
+ }
if (FAILED(hr))
hr = MF_E_NO_AUDIO_PLAYBACK_DEVICE;
@@ -1539,7 +1543,8 @@ static HRESULT audio_renderer_create_audio_client(struct audio_renderer *rendere
flags |= AUDCLNT_STREAMFLAGS_CROSSPROCESS;
if (renderer->stream_config.flags & MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_NOPERSIST)
flags |= AUDCLNT_STREAMFLAGS_NOPERSIST;
- hr = IAudioClient_Initialize(renderer->audio_client, AUDCLNT_SHAREMODE_SHARED, flags, 1000000, 0, wfx, NULL);
+ hr = IAudioClient_Initialize(renderer->audio_client, AUDCLNT_SHAREMODE_SHARED, flags, 1000000, 0, wfx,
+ &renderer->stream_config.session_id);
CoTaskMemFree(wfx);
if (FAILED(hr))
{
More information about the wine-cvs
mailing list