mmdevapi/tests: Work around Initialize() render breakage on Win 10.

Calling Initialize() twice causes later Start() operations to report a
failure on Windows 10 >= 1607.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2020-11-09 17:40:25 +01:00 committed by Alexandre Julliard
parent 8f956d4f3a
commit 7bc0cbc078

View file

@ -337,6 +337,14 @@ static void test_audioclient(void)
trace("Initialize(duration=0) GetBufferSize is %u\n", num);
}
hr = IAudioClient_Initialize(ac, AUDCLNT_SHAREMODE_SHARED, 0, 5000000, 0, pwfx, NULL);
ok(hr == AUDCLNT_E_ALREADY_INITIALIZED, "Calling Initialize twice returns %08x\n", hr);
hr = IAudioClient_Start(ac);
ok(hr == S_OK ||
broken(hr == AUDCLNT_E_DEVICE_INVALIDATED), /* Win10 >= 1607 */
"Start on a doubly initialized stream returns %08x\n", hr);
IAudioClient_Release(ac);
hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER,
@ -406,9 +414,6 @@ static void test_audioclient(void)
if(t2 == 0)
win10 = TRUE;
hr = IAudioClient_Initialize(ac, AUDCLNT_SHAREMODE_SHARED, 0, 5000000, 0, pwfx, NULL);
ok(hr == AUDCLNT_E_ALREADY_INITIALIZED, "Calling Initialize twice returns %08x\n", hr);
hr = IAudioClient_SetEventHandle(ac, NULL);
ok(hr == E_INVALIDARG, "SetEventHandle(NULL) returns %08x\n", hr);