[PATCH] mmdevapi/tests: Work around Initialize() render breakage on Win 10.
Andrew Eikum
aeikum at codeweavers.com
Thu Nov 12 10:08:31 CST 2020
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Mon, Nov 09, 2020 at 05:40:25PM +0100, Francois Gouget wrote:
> Calling Initialize() twice causes later Start() operations to report a
> failure on Windows 10 >= 1607.
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> dlls/mmdevapi/tests/render.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c
> index 8c82a1a81fd..a0aa1b18936 100644
> --- a/dlls/mmdevapi/tests/render.c
> +++ b/dlls/mmdevapi/tests/render.c
> @@ -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);
>
> --
> 2.20.1
>
>
More information about the wine-devel
mailing list