From 0e7a4fd7c18853316cdbc784ff0e5503ac34934f Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Wed, 12 Apr 2023 09:33:05 +0200 Subject: [PATCH] winecoreaudio: Export function to get AudioSessionWrapper object. --- dlls/winecoreaudio.drv/mmdevdrv.c | 18 ++++++++++++++++++ dlls/winecoreaudio.drv/winecoreaudio.drv.spec | 1 + 2 files changed, 19 insertions(+) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 2fea175df63..06f74e6416a 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -2325,3 +2325,21 @@ HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device, return S_OK; } + +HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device, + AudioSessionWrapper **out) +{ + AudioSession *session; + + HRESULT hr = get_audio_session(guid, device, 0, &session); + if(FAILED(hr)) + return hr; + + *out = AudioSessionWrapper_Create(NULL); + if(!*out) + return E_OUTOFMEMORY; + + (*out)->session = session; + + return S_OK; +} diff --git a/dlls/winecoreaudio.drv/winecoreaudio.drv.spec b/dlls/winecoreaudio.drv/winecoreaudio.drv.spec index 1dfbfb79eb9..9b2200afb34 100644 --- a/dlls/winecoreaudio.drv/winecoreaudio.drv.spec +++ b/dlls/winecoreaudio.drv/winecoreaudio.drv.spec @@ -7,3 +7,4 @@ @ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs @ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint @ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager +@ stdcall -private GetAudioSessionWrapper(ptr ptr ptr) AUDDRV_GetAudioSessionWrapper -- 2.11.4.GIT