Commit ab33114c authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winepulse: Move AudioClient's QueryInterface into mmdevapi.

parent 71500094
......@@ -406,6 +406,31 @@ const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
capture_GetNextPacketSize
};
HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface, REFIID riid, void **ppv)
{
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
if (!ppv)
return E_POINTER;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IAudioClient) ||
IsEqualIID(riid, &IID_IAudioClient2) ||
IsEqualIID(riid, &IID_IAudioClient3))
*ppv = iface;
else if(IsEqualIID(riid, &IID_IMarshal)) {
struct audio_client *This = impl_from_IAudioClient3(iface);
return IUnknown_QueryInterface(This->marshal, riid, ppv);
} else {
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown *)*ppv);
return S_OK;
}
ULONG WINAPI client_AddRef(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
......
......@@ -377,33 +377,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return S_OK;
}
static HRESULT WINAPI AudioClient_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv)
{
ACImpl *This = impl_from_IAudioClient3(iface);
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
if (!ppv)
return E_POINTER;
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IAudioClient) ||
IsEqualIID(riid, &IID_IAudioClient2) ||
IsEqualIID(riid, &IID_IAudioClient3))
*ppv = iface;
if (*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if (IsEqualIID(riid, &IID_IMarshal))
return IUnknown_QueryInterface(This->marshal, riid, ppv);
WARN("Unknown interface %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv);
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
......@@ -547,7 +522,7 @@ extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
static const IAudioClient3Vtbl AudioClient3_Vtbl =
{
AudioClient_QueryInterface,
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment