Calling Initialize() twice causes later Start() operations to report a failure on Windows 10 >= 1607.
Signed-off-by: Francois Gouget fgouget@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);
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=81623
Your paranoid android.
=== w8adm (32 bit report) ===
mmdevapi: render.c:1096: Test failed: Position 6656 too far after playing 100ms
=== w10pro64 (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 6240, should be 0 render.c:1363: Test failed: Position 410880 at end vs. 57600 submitted frames
=== w10pro64_2scr (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1363: Test failed: Position 430080 at end vs. 54720 submitted frames
=== w10pro64_ar (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 4320, should be 0 render.c:1363: Test failed: Position 395520 at end vs. 53760 submitted frames
=== w10pro64_he (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 480, should be 0 render.c:1363: Test failed: Position 572160 at end vs. 72000 submitted frames render.c:1322: Test failed: GetBuffer large (22500) at iteration 6
=== w10pro64_ja (32 bit report) ===
mmdevapi: render.c:1322: Test failed: GetBuffer large (22500) at iteration 8 render.c:1362: Test failed: GetCurrentPadding returned 1380, should be 0 render.c:1363: Test failed: Position 744960 at end vs. 94020 submitted frames
=== w10pro64_zh_CN (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1363: Test failed: Position 583680 at end vs. 73920 submitted frames
=== w864 (64 bit report) ===
mmdevapi: render.c:1322: Test failed: GetBuffer large (20671) at iteration 2 render.c:1322: Test failed: GetBuffer large (20671) at iteration 4 render.c:1322: Test failed: GetBuffer large (20671) at iteration 6 render.c:1322: Test failed: GetBuffer large (20671) at iteration 8
=== w10pro64 (64 bit report) ===
mmdevapi: render.c:1322: Test failed: GetBuffer large (22500) at iteration 2 render.c:1322: Test failed: GetBuffer large (22500) at iteration 3 render.c:1322: Test failed: GetBuffer large (22500) at iteration 4
=== w10pro64_2scr (64 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1363: Test failed: Position 430080 at end vs. 54720 submitted frames
=== w10pro64_ar (64 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 960, should be 0 render.c:1363: Test failed: Position 410880 at end vs. 52320 submitted frames
=== w10pro64_he (64 bit report) ===
mmdevapi: render.c:733: Test failed: Wait(event) after Stop gave 102 render.c:1322: Test failed: GetBuffer large (22500) at iteration 6 render.c:1322: Test failed: GetBuffer large (22500) at iteration 3
=== w10pro64_ja (64 bit report) ===
mmdevapi: render.c:1322: Test failed: GetBuffer large (22500) at iteration 1
=== w10pro64_zh_CN (64 bit report) ===
mmdevapi: render.c:1363: Test failed: Position 464640 at end vs. 60480 submitted frames render.c:1322: Test failed: GetBuffer large (22500) at iteration 4
On Mon, 9 Nov 2020, Marvin wrote: [...]
=== w10pro64 (32 bit report) ===
mmdevapi: render.c:1362: Test failed: GetCurrentPadding returned 6240, should be 0 render.c:1363: Test failed: Position 410880 at end vs. 57600 submitted frames
The patch fixed this failure:
render.c:432: Test failed: Start on a stopped stream returns 88890004
But the random position, padding and buffer size failures will need other patches.
(I will also look at mmdevapi:capture which may to have the same issue)
Signed-off-by: Andrew Eikum aeikum@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@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