Signed-off-by: Andrew Eikum aeikum@codeweavers.com --- dlls/mmdevapi/tests/render.c | 7 +++++++ dlls/winealsa.drv/mmdevdrv.c | 9 +++++++-- dlls/wineandroid.drv/mmdevdrv.c | 9 +++++++-- dlls/winecoreaudio.drv/mmdevdrv.c | 9 +++++++-- dlls/wineoss.drv/mmdevdrv.c | 9 +++++++-- dlls/winepulse.drv/mmdevdrv.c | 9 +++++++-- 6 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 8d52f483333..e58cc449d86 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -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); diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 2c3165385e6..233b0dfda11 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -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, diff --git a/dlls/wineandroid.drv/mmdevdrv.c b/dlls/wineandroid.drv/mmdevdrv.c index 4e9ada3f55b..8ee1bb12d35 100644 --- a/dlls/wineandroid.drv/mmdevdrv.c +++ b/dlls/wineandroid.drv/mmdevdrv.c @@ -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, diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index dd2ad916f8d..f32c1d5e417 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -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, diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 50c7db2c7c1..9b1cdf3fa7c 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -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, diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index b8386cfe553..e384955b019 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -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,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=79727
Your paranoid android.
=== w8adm (32 bit report) ===
mmdevapi: render.c:1269: Test failed: GetBuffer large (20671) at iteration 5
=== w1064v1809 (32 bit report) ===
mmdevapi: render.c:1269: Test failed: GetBuffer large (20671) at iteration 6 render.c:1043: Test failed: Position 6592 too far after playing 100ms
=== w10pro64 (32 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1310: Test failed: Position 506880 at end vs. 64320 submitted frames
=== w10pro64_2scr (32 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1310: Test failed: Position 441600 at end vs. 56160 submitted frames
=== w10pro64_ar (32 bit report) ===
mmdevapi: render.c:1310: Test failed: Position 426240 at end vs. 55200 submitted frames
=== w10pro64_he (32 bit report) ===
mmdevapi: render.c:1310: Test failed: Position 499200 at end vs. 63840 submitted frames
=== w10pro64_ja (32 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 480, should be 0 render.c:1310: Test failed: Position 537600 at end vs. 67680 submitted frames
=== w10pro64_zh_CN (32 bit report) ===
mmdevapi: render.c:1269: Test failed: GetBuffer large (22500) at iteration 3
=== w864 (64 bit report) ===
mmdevapi: render.c:1269: Test failed: GetBuffer large (20671) at iteration 1 render.c:1269: Test failed: GetBuffer large (20671) at iteration 3 render.c:1269: Test failed: GetBuffer large (20671) at iteration 6
=== w1064v1809 (64 bit report) ===
mmdevapi: render.c:1269: Test failed: GetBuffer large (20671) at iteration 1
=== w10pro64 (64 bit report) ===
mmdevapi: render.c:1310: Test failed: Position 552480 at end vs. 75300 submitted frames render.c:1269: Test failed: GetBuffer large (22500) at iteration 6
=== w10pro64_2scr (64 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 480, should be 0 render.c:1310: Test failed: Position 418560 at end vs. 52800 submitted frames
=== w10pro64_ar (64 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1310: Test failed: Position 407040 at end vs. 51840 submitted frames
=== w10pro64_ja (64 bit report) ===
mmdevapi: render.c:1309: Test failed: GetCurrentPadding returned 480, should be 0 render.c:1310: Test failed: Position 576000 at end vs. 72480 submitted frames
=== w10pro64_zh_CN (64 bit report) ===
mmdevapi: render.c:1310: Test failed: Position 372480 at end vs. 50400 submitted frames