Commit 530c79fb authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

mmdevapi: Implement IsOffloadCapable.

parent 370a538e
......@@ -140,6 +140,7 @@ static void test_audioclient(void)
WAVEFORMATEX *pwfx, *pwfx2;
REFERENCE_TIME t1, t2;
HANDLE handle;
BOOL offload_capable;
hr = IMMDevice_Activate(dev, &IID_IAudioClient2, CLSCTX_INPROC_SERVER,
NULL, (void**)&ac2);
......@@ -253,6 +254,12 @@ static void test_audioclient(void)
hr = IAudioClient_QueryInterface(ac, &IID_IAudioClient2, (void**)&ac2);
ok(hr == S_OK, "Failed to query IAudioClient2 interface: %08x\n", hr);
hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, NULL);
ok(hr == E_INVALIDARG, "IsOffloadCapable gave wrong error: %08x\n", hr);
hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, &offload_capable);
ok(hr == S_OK, "IsOffloadCapable failed: %08x\n", hr);
IAudioClient2_Release(ac2);
test_uninitialized(ac);
......
......@@ -2661,9 +2661,14 @@ static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient2 *iface,
{
ACImpl *This = impl_from_IAudioClient2(iface);
FIXME("(%p)->(0x%x, %p)\n", This, category, offload_capable);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
return E_NOTIMPL;
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient2 *iface,
......
......@@ -1620,9 +1620,14 @@ static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient2 *iface,
{
ACImpl *This = impl_from_IAudioClient2(iface);
FIXME("(%p)->(0x%x, %p)\n", This, category, offload_capable);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
return E_NOTIMPL;
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient2 *iface,
......
......@@ -2228,9 +2228,14 @@ static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient2 *iface,
{
ACImpl *This = impl_from_IAudioClient2(iface);
FIXME("(%p)->(0x%x, %p)\n", This, category, offload_capable);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
return E_NOTIMPL;
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient2 *iface,
......
......@@ -1785,9 +1785,14 @@ static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient2 *iface,
{
ACImpl *This = impl_from_IAudioClient2(iface);
FIXME("(%p)->(0x%x, %p)\n", This, category, offload_capable);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
return E_NOTIMPL;
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient2 *iface,
......
......@@ -2233,9 +2233,14 @@ static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient2 *iface,
{
ACImpl *This = impl_from_IAudioClient2(iface);
FIXME("(%p)->(0x%x, %p)\n", This, category, offload_capable);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
return E_NOTIMPL;
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient2 *iface,
......
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