From: Giovanni Mascellani <gmascellani@codeweavers.com> In particular, dump whether Initialize() passed, rather than IsFormatSupported(), which is much more unreliable. --- dlls/mmdevapi/tests/capture.c | 7 ++++--- dlls/mmdevapi/tests/render.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/mmdevapi/tests/capture.c b/dlls/mmdevapi/tests/capture.c index 38de957dfb8..22ccab208d8 100644 --- a/dlls/mmdevapi/tests/capture.c +++ b/dlls/mmdevapi/tests/capture.c @@ -589,8 +589,6 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, mode, (WAVEFORMATEX*)fmt, &pwfx2); hrs = hr; - if (hr == S_OK) - trace("IsSupported() is true\n"); /* In shared mode you can only change bit width, not sampling rate or channel count. */ if (mode == AUDCLNT_SHAREMODE_SHARED) { @@ -628,7 +626,7 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) hr = IAudioClient_Initialize(ac, mode, 0, 5000000, 0, (WAVEFORMATEX*)fmt, NULL); if ((hrs == S_OK) ^ (hr == S_OK)) - trace("Initialize() returns %08lx unlike IsFormatSupported\n", hr); + trace("Initialize() returns %08lx while IsFormatSupported() returns %08lx\n", hr, hrs); if (mode == AUDCLNT_SHAREMODE_SHARED) { compatible = fmt->Format.nSamplesPerSec == pwfx->nSamplesPerSec && fmt->Format.nChannels == pwfx->nChannels; expected = validate_fmt(fmt, compatible); @@ -645,6 +643,9 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) : hr == AUDCLNT_E_ENDPOINT_CREATE_FAILED || hr == AUDCLNT_E_UNSUPPORTED_FORMAT || hr == E_INVALIDARG, "Initialize() returns %08lx\n", hr); + if (hr == S_OK) + trace("Initialize() succeeded\n"); + IAudioClient_Release(ac); hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index b3ebe97cfc3..e5cfccebadb 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -867,8 +867,6 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, mode, (WAVEFORMATEX*)fmt, &pwfx2); hrs = hr; - if (hr == S_OK) - trace("IsFormatSupported() is true\n"); /* In shared mode you can only change bit width, not sampling rate or channel count. */ if (mode == AUDCLNT_SHAREMODE_SHARED) { @@ -907,7 +905,7 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) hr = IAudioClient_Initialize(ac, mode, 0, 5000000, 0, (WAVEFORMATEX*)fmt, NULL); if ((hrs == S_OK) ^ (hr == S_OK)) - trace("Initialize() returns %08lx unlike IsFormatSupported\n", hr); + trace("Initialize() returns %08lx while IsFormatSupported() returns %08lx\n", hr, hrs); if (mode == AUDCLNT_SHAREMODE_SHARED) { compatible = fmt->Format.nSamplesPerSec == pwfx->nSamplesPerSec && fmt->Format.nChannels == pwfx->nChannels; expected = validate_fmt(fmt, compatible); @@ -925,6 +923,9 @@ static void test_format(AUDCLNT_SHAREMODE mode, WAVEFORMATEXTENSIBLE *fmt) || hr == E_INVALIDARG || broken(hr == S_OK), "Initialize() returns %08lx\n", hr); + if (hr == S_OK) + trace("Initialize() succeeded\n"); + IAudioClient_Release(ac); hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10109