Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/mmdevapi/tests/mmdevenum.c | 7 ++++ dlls/mmdevapi/tests/render.c | 60 ++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index 11df1f0229b..4708c2fef84 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -218,6 +218,13 @@ static void test_ActivateAudioInterfaceAsync(void)
h_mmdev = LoadLibraryA("mmdevapi.dll");
+ pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, "ActivateAudioInterfaceAsync"); + if (!pActivateAudioInterfaceAsync) + { + win_skip("ActivateAudioInterfaceAsync is not supported on Win <= 7\n"); + return; + } + /* some applications look this up by ordinal */ pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, (char *)17); ok(pActivateAudioInterfaceAsync != NULL, "mmdevapi.ActivateAudioInterfaceAsync missing!\n"); diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 5800ec5fd66..3ad00eaa2e2 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -154,8 +154,11 @@ static void test_audioclient(void)
hr = IMMDevice_Activate(dev, &IID_IAudioClient2, CLSCTX_INPROC_SERVER, NULL, (void**)&ac2); - ok(hr == S_OK, "IAudioClient2 Activation failed with %08x\n", hr); - IAudioClient2_Release(ac2); + ok(hr == S_OK || + broken(hr == E_NOINTERFACE) /* win7 */, + "IAudioClient2 Activation failed with %08x\n", hr); + if(hr == S_OK) + IAudioClient2_Release(ac2);
hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ac); @@ -262,39 +265,42 @@ 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); + if (hr == S_OK) + { + 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); + hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, &offload_capable); + ok(hr == S_OK, "IsOffloadCapable failed: %08x\n", hr);
- hr = IAudioClient2_SetClientProperties(ac2, NULL); - ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, NULL); + ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr);
- client_props.cbSize = 0; - client_props.bIsOffload = FALSE; - client_props.eCategory = AudioCategory_BackgroundCapableMedia; - client_props.Options = 0; + client_props.cbSize = 0; + client_props.bIsOffload = FALSE; + client_props.eCategory = AudioCategory_BackgroundCapableMedia; + client_props.Options = 0;
- hr = IAudioClient2_SetClientProperties(ac2, &client_props); - ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr);
- client_props.cbSize = sizeof(client_props); - client_props.bIsOffload = TRUE; + client_props.cbSize = sizeof(client_props); + client_props.bIsOffload = TRUE;
- hr = IAudioClient2_SetClientProperties(ac2, &client_props); - if(!offload_capable) - ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr); - else - ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + if(!offload_capable) + ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr); + else + ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr);
- client_props.bIsOffload = FALSE; - hr = IAudioClient2_SetClientProperties(ac2, &client_props); - ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr); + client_props.bIsOffload = FALSE; + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr);
- IAudioClient2_Release(ac2); + IAudioClient2_Release(ac2); + } + else + win_skip("IAudioClient2 is not present on Win <= 7\n");
hr = IAudioClient_QueryInterface(ac, &IID_IAudioClient3, (void**)&ac3); ok(hr == S_OK ||
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=80232
Your paranoid android.
=== w8adm (32 bit report) ===
mmdevapi: render.c:1091: Test failed: Position 6656 too far after playing 100ms
=== w1064v1809 (32 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (20671) at iteration 5 render.c:1091: Test failed: Position 6592 too far after playing 100ms
=== w10pro64 (32 bit report) ===
mmdevapi: render.c:1358: Test failed: Position 456960 at end vs. 58560 submitted frames
=== w10pro64_2scr (32 bit report) ===
mmdevapi: render.c:1357: Test failed: GetCurrentPadding returned 1440, should be 0 render.c:1358: Test failed: Position 422400 at end vs. 54240 submitted frames
=== w10pro64_he (32 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (22500) at iteration 5 render.c:1358: Test failed: Position 675840 at end vs. 87360 submitted frames
=== w864 (64 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (20671) at iteration 3
=== w1064v1809 (64 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (20671) at iteration 3 render.c:1317: Test failed: GetBuffer large (20671) at iteration 6
=== w10pro64 (64 bit report) ===
mmdevapi: render.c:1357: Test failed: GetCurrentPadding returned 1440, should be 0 render.c:1358: Test failed: Position 456960 at end vs. 58560 submitted frames
=== w10pro64_2scr (64 bit report) ===
mmdevapi: render.c:1357: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1358: Test failed: Position 422400 at end vs. 53760 submitted frames
=== w10pro64_ar (64 bit report) ===
mmdevapi: render.c:1357: Test failed: GetCurrentPadding returned 480, should be 0 render.c:1358: Test failed: Position 433920 at end vs. 54720 submitted frames
=== w10pro64_he (64 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (22500) at iteration 4 render.c:1357: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1358: Test failed: Position 625920 at end vs. 79200 submitted frames
=== w10pro64_ja (64 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (22500) at iteration 8
=== w10pro64_zh_CN (64 bit report) ===
mmdevapi: render.c:1317: Test failed: GetBuffer large (22500) at iteration 1 render.c:1317: Test failed: GetBuffer large (22500) at iteration 3 render.c:1358: Test failed: Position 825600 at end vs. 106080 submitted frames
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Sun, Oct 11, 2020 at 01:20:22PM +0200, Sven Baars wrote:
Signed-off-by: Sven Baars sbaars@codeweavers.com
dlls/mmdevapi/tests/mmdevenum.c | 7 ++++ dlls/mmdevapi/tests/render.c | 60 ++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index 11df1f0229b..4708c2fef84 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -218,6 +218,13 @@ static void test_ActivateAudioInterfaceAsync(void)
h_mmdev = LoadLibraryA("mmdevapi.dll");
- pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, "ActivateAudioInterfaceAsync");
- if (!pActivateAudioInterfaceAsync)
- {
win_skip("ActivateAudioInterfaceAsync is not supported on Win <= 7\n");
return;
- }
- /* some applications look this up by ordinal */ pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, (char *)17); ok(pActivateAudioInterfaceAsync != NULL, "mmdevapi.ActivateAudioInterfaceAsync missing!\n");
diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 5800ec5fd66..3ad00eaa2e2 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -154,8 +154,11 @@ static void test_audioclient(void)
hr = IMMDevice_Activate(dev, &IID_IAudioClient2, CLSCTX_INPROC_SERVER, NULL, (void**)&ac2);
- ok(hr == S_OK, "IAudioClient2 Activation failed with %08x\n", hr);
- IAudioClient2_Release(ac2);
ok(hr == S_OK ||
broken(hr == E_NOINTERFACE) /* win7 */,
"IAudioClient2 Activation failed with %08x\n", hr);
if(hr == S_OK)
IAudioClient2_Release(ac2);
hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ac);
@@ -262,39 +265,42 @@ 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);
- if (hr == S_OK)
- {
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);
hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, &offload_capable);
ok(hr == S_OK, "IsOffloadCapable failed: %08x\n", hr);
- hr = IAudioClient2_SetClientProperties(ac2, NULL);
- ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr);
hr = IAudioClient2_SetClientProperties(ac2, NULL);
ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr);
- client_props.cbSize = 0;
- client_props.bIsOffload = FALSE;
- client_props.eCategory = AudioCategory_BackgroundCapableMedia;
- client_props.Options = 0;
client_props.cbSize = 0;
client_props.bIsOffload = FALSE;
client_props.eCategory = AudioCategory_BackgroundCapableMedia;
client_props.Options = 0;
- hr = IAudioClient2_SetClientProperties(ac2, &client_props);
- ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr);
hr = IAudioClient2_SetClientProperties(ac2, &client_props);
ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr);
- client_props.cbSize = sizeof(client_props);
- client_props.bIsOffload = TRUE;
client_props.cbSize = sizeof(client_props);
client_props.bIsOffload = TRUE;
- hr = IAudioClient2_SetClientProperties(ac2, &client_props);
- if(!offload_capable)
ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr);
- else
ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr);
hr = IAudioClient2_SetClientProperties(ac2, &client_props);
if(!offload_capable)
ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr);
else
ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr);
- client_props.bIsOffload = FALSE;
- hr = IAudioClient2_SetClientProperties(ac2, &client_props);
- ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr);
client_props.bIsOffload = FALSE;
hr = IAudioClient2_SetClientProperties(ac2, &client_props);
ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr);
- IAudioClient2_Release(ac2);
IAudioClient2_Release(ac2);
}
else
win_skip("IAudioClient2 is not present on Win <= 7\n");
hr = IAudioClient_QueryInterface(ac, &IID_IAudioClient3, (void**)&ac3); ok(hr == S_OK ||
-- 2.25.1