Matches Windows 10 behavior.
Signed-off-by: Andrew Eikum aeikum@codeweavers.com --- dlls/mmdevapi/tests/capture.c | 3 ++- dlls/mmdevapi/tests/render.c | 3 ++- dlls/winealsa.drv/mmdevdrv.c | 2 +- dlls/wineandroid.drv/mmdevdrv.c | 2 +- dlls/winecoreaudio.drv/mmdevdrv.c | 2 +- dlls/wineoss.drv/mmdevdrv.c | 2 +- dlls/winepulse.drv/mmdevdrv.c | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/mmdevapi/tests/capture.c b/dlls/mmdevapi/tests/capture.c index 5cf61ea8245..6c65128f2d2 100644 --- a/dlls/mmdevapi/tests/capture.c +++ b/dlls/mmdevapi/tests/capture.c @@ -491,7 +491,8 @@ static void test_audioclient(void) test_uninitialized(ac);
hr = IAudioClient_Initialize(ac, 3, 0, 5000000, 0, pwfx, NULL); - ok(hr == AUDCLNT_E_NOT_INITIALIZED, "Initialize with invalid sharemode returns %08x\n", hr); + ok(broken(hr == AUDCLNT_E_NOT_INITIALIZED) || /* <= win8 */ + hr == E_INVALIDARG, "Initialize with invalid sharemode returns %08x\n", hr);
hr = IAudioClient_Initialize(ac, AUDCLNT_SHAREMODE_SHARED, 0xffffffff, 5000000, 0, pwfx, NULL); ok(hr == E_INVALIDARG || hr == AUDCLNT_E_INVALID_STREAM_FLAG, "Initialize with invalid flags returns %08x\n", hr); diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 7de6d9adc92..50a43229a05 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -247,7 +247,8 @@ static void test_audioclient(void) test_uninitialized(ac);
hr = IAudioClient_Initialize(ac, 3, 0, 5000000, 0, pwfx, NULL); - ok(hr == AUDCLNT_E_NOT_INITIALIZED, "Initialize with invalid sharemode returns %08x\n", hr); + ok(broken(hr == AUDCLNT_E_NOT_INITIALIZED) || /* <= win8 */ + hr == E_INVALIDARG, "Initialize with invalid sharemode returns %08x\n", hr);
hr = IAudioClient_Initialize(ac, AUDCLNT_SHAREMODE_SHARED, 0xffffffff, 5000000, 0, pwfx, NULL); ok(hr == E_INVALIDARG || diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 5bc71da77ae..c2fe59ea795 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -1255,7 +1255,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, return E_POINTER;
if(mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE) - return AUDCLNT_E_NOT_INITIALIZED; + return E_INVALIDARG;
if(flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS | AUDCLNT_STREAMFLAGS_LOOPBACK | diff --git a/dlls/wineandroid.drv/mmdevdrv.c b/dlls/wineandroid.drv/mmdevdrv.c index e10b3debf1c..608e16a7a79 100644 --- a/dlls/wineandroid.drv/mmdevdrv.c +++ b/dlls/wineandroid.drv/mmdevdrv.c @@ -806,7 +806,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, dump_fmt(fmt);
if(mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE) - return AUDCLNT_E_NOT_INITIALIZED; + return E_INVALIDARG;
if(flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS | AUDCLNT_STREAMFLAGS_LOOPBACK | diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index d595f43007b..acfa01c3d62 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -1314,7 +1314,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, dump_fmt(fmt);
if(mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE) - return AUDCLNT_E_NOT_INITIALIZED; + return E_INVALIDARG;
if(flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS | AUDCLNT_STREAMFLAGS_LOOPBACK | diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index c6b6e8effe5..a08e7f561b5 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -1046,7 +1046,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, dump_fmt(fmt);
if(mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE) - return AUDCLNT_E_NOT_INITIALIZED; + return E_INVALIDARG;
if(flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS | AUDCLNT_STREAMFLAGS_LOOPBACK | diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index 61f0e03c9f1..463d3d5a71a 100644 --- a/dlls/winepulse.drv/mmdevdrv.c +++ b/dlls/winepulse.drv/mmdevdrv.c @@ -1579,7 +1579,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, return E_POINTER;
if (mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE) - return AUDCLNT_E_NOT_INITIALIZED; + return E_INVALIDARG; if (mode == AUDCLNT_SHAREMODE_EXCLUSIVE) return AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
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=58380
Your paranoid android.
=== w1064v1507 (64 bit report) ===
mmdevapi: capture.c:197: Test failed: Position 759 expected 448 capture.c:227: Test failed: Position 759 expected 448 capture.c:285: Test failed: Position 1207 last 896 frames 448 capture.c:305: Test failed: Position 1655 expected 1344 capture.c:330: Test failed: Position 2103 expected 1792
=== w7u (32 bit report) ===
mmdevapi: render.c:1251: Test failed: GetBuffer large (20671) at iteration 4
=== w8adm (32 bit report) ===
mmdevapi: render.c:1251: Test failed: GetBuffer large (20671) at iteration 3 render.c:1251: Test failed: GetBuffer large (20671) at iteration 6 render.c:1251: Test failed: GetBuffer large (20671) at iteration 8 render.c:1251: Test failed: GetBuffer large (20671) at iteration 5
=== w864 (32 bit report) ===
mmdevapi: render.c:1025: Test failed: Position 6656 too far after playing 100ms
=== w1064v1507 (32 bit report) ===
mmdevapi: render.c:1251: Test failed: GetBuffer large (20671) at iteration 1
=== w1064v1809_ar (32 bit report) ===
mmdevapi: render.c:1025: Test failed: Position 6592 too far after playing 100ms
=== w1064v1809_he (32 bit report) ===
mmdevapi: render.c:1025: Test failed: Position 7488 too far after playing 100ms
=== w1064v1809_ja (32 bit report) ===
mmdevapi: render.c:1025: Test failed: Position 7936 too far after playing 100ms
=== w1064v1809 (64 bit report) ===
mmdevapi: render.c:1251: Test failed: GetBuffer large (20671) at iteration 1 render.c:1251: Test failed: GetBuffer large (20671) at iteration 3 render.c:1251: Test failed: GetBuffer large (20671) at iteration 4
=== debian10 (32 bit French report) ===
mmdevapi: render.c:662: Test failed: Wait(event) after Stop gave 102