mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:40:48 +00:00
winealsa: Use mmdevapi's AudioClient's QueryInterface.
This commit is contained in:
parent
ab33114c69
commit
79f960f6df
|
@ -363,30 +363,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI AudioClient_QueryInterface(IAudioClient3 *iface,
|
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
|
||||||
REFIID riid, void **ppv)
|
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;
|
|
||||||
else if(IsEqualIID(riid, &IID_IMarshal))
|
|
||||||
return IUnknown_QueryInterface(This->marshal, riid, ppv);
|
|
||||||
|
|
||||||
if(*ppv){
|
|
||||||
IUnknown_AddRef((IUnknown*)*ppv);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
WARN("Unknown interface %s\n", debugstr_guid(riid));
|
|
||||||
return E_NOINTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
|
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
|
||||||
|
|
||||||
|
@ -530,7 +508,7 @@ extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
|
||||||
|
|
||||||
static const IAudioClient3Vtbl AudioClient3_Vtbl =
|
static const IAudioClient3Vtbl AudioClient3_Vtbl =
|
||||||
{
|
{
|
||||||
AudioClient_QueryInterface,
|
client_QueryInterface,
|
||||||
client_AddRef,
|
client_AddRef,
|
||||||
client_Release,
|
client_Release,
|
||||||
client_Initialize,
|
client_Initialize,
|
||||||
|
|
Loading…
Reference in a new issue