mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:53:45 +00:00
mmdevapi: Implement IAudioSessionControl2 GetGroupingParam SetGroupingParam.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56763
This commit is contained in:
parent
0d4d778b56
commit
75babad433
|
@ -32,6 +32,7 @@ typedef struct audio_session {
|
|||
|
||||
WCHAR *display_name;
|
||||
WCHAR *icon_path;
|
||||
GUID grouping_param;
|
||||
|
||||
struct list entry;
|
||||
} AudioSession;
|
||||
|
|
|
@ -219,16 +219,33 @@ static HRESULT WINAPI control_SetIconPath(IAudioSessionControl2 *iface, const WC
|
|||
static HRESULT WINAPI control_GetGroupingParam(IAudioSessionControl2 *iface, GUID *group)
|
||||
{
|
||||
struct audio_session_wrapper *This = impl_from_IAudioSessionControl2(iface);
|
||||
FIXME("(%p)->(%p) - stub\n", This, group);
|
||||
return E_NOTIMPL;
|
||||
struct audio_session *session = This->session;
|
||||
|
||||
TRACE("(%p)->(%p) - stub\n", This, group);
|
||||
|
||||
if (!group)
|
||||
return HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER);
|
||||
|
||||
*group = session->grouping_param;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI control_SetGroupingParam(IAudioSessionControl2 *iface, const GUID *group,
|
||||
const GUID *session)
|
||||
const GUID *event_context)
|
||||
{
|
||||
struct audio_session_wrapper *This = impl_from_IAudioSessionControl2(iface);
|
||||
FIXME("(%p)->(%s, %s) - stub\n", This, debugstr_guid(group), debugstr_guid(session));
|
||||
return E_NOTIMPL;
|
||||
struct audio_session *session = This->session;
|
||||
|
||||
TRACE("(%p)->(%s, %s) - stub\n", This, debugstr_guid(group), debugstr_guid(event_context));
|
||||
FIXME("Ignoring event_context\n");
|
||||
|
||||
if (!group)
|
||||
return HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER);
|
||||
|
||||
session->grouping_param = *group;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI control_RegisterAudioSessionNotification(IAudioSessionControl2 *iface,
|
||||
|
@ -631,6 +648,8 @@ static struct audio_session *session_create(const GUID *guid, IMMDevice *device,
|
|||
|
||||
ret->master_vol = 1.f;
|
||||
|
||||
CoCreateGuid(&ret->grouping_param);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1630,30 +1630,23 @@ static void test_session(void)
|
|||
/* Test GetGroupingParam / SetGroupingParam */
|
||||
|
||||
hr = IAudioSessionControl2_GetGroupingParam(ses1_ctl2, NULL);
|
||||
todo_wine
|
||||
ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "GetGroupingParam failed: %08lx\n", hr);
|
||||
|
||||
hr = IAudioSessionControl2_GetGroupingParam(ses1_ctl2, &guid1);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "GetGroupingParam failed: %08lx\n", hr);
|
||||
todo_wine
|
||||
ok(!IsEqualGUID(&guid1, &guid2), "Expected non null GUID\n"); /* MSDN is wrong here, it is not GUID_NULL */
|
||||
|
||||
hr = IAudioSessionControl2_SetGroupingParam(ses1_ctl2, NULL, NULL);
|
||||
todo_wine
|
||||
ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "SetGroupingParam failed: %08lx\n", hr);
|
||||
|
||||
hr = CoCreateGuid(&guid2);
|
||||
ok(hr == S_OK, "CoCreateGuid failed: %08lx\n", hr);
|
||||
|
||||
hr = IAudioSessionControl2_SetGroupingParam(ses1_ctl2, &guid2, NULL);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "SetGroupingParam failed: %08lx\n", hr);
|
||||
|
||||
hr = IAudioSessionControl2_GetGroupingParam(ses1_ctl2, &guid1);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "GetGroupingParam failed: %08lx\n", hr);
|
||||
todo_wine
|
||||
ok(IsEqualGUID(&guid1, &guid2), "Got %s\n", wine_dbgstr_guid(&guid1));
|
||||
|
||||
/* Test capture */
|
||||
|
|
Loading…
Reference in a new issue