From: Giovanni Mascellani gmascellani@codeweavers.com
--- dlls/mmdevapi/tests/capture.c | 8 +++++++- dlls/mmdevapi/tests/render.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mmdevapi/tests/capture.c b/dlls/mmdevapi/tests/capture.c index 24a9c7d4efb..918a6d0c2f6 100644 --- a/dlls/mmdevapi/tests/capture.c +++ b/dlls/mmdevapi/tests/capture.c @@ -473,20 +473,26 @@ static void test_audioclient(void) &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)?"FLOAT":"Other")); }
+ pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, pwfx, &pwfx2); ok(hr == S_OK, "Valid IsFormatSupported(Shared) call returns %08lx\n", hr); ok(pwfx2 == NULL, "pwfx2 is non-null\n"); - CoTaskMemFree(pwfx2);
hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, NULL, NULL); ok(hr == E_POINTER, "IsFormatSupported(NULL) call returns %08lx\n", hr);
+ pwfx2 = (WAVEFORMATEX*)0xDEADF00D; + hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, NULL, &pwfx2); + ok(hr == E_POINTER, "IsFormatSupported(NULL) call returns %08lx\n", hr); + ok(pwfx2 == NULL, "pwfx2 is non-null\n"); + hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, pwfx, NULL); ok(hr == E_POINTER, "IsFormatSupported(Shared,NULL) call returns %08lx\n", hr);
hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_EXCLUSIVE, pwfx, NULL); ok(hr == S_OK || hr == AUDCLNT_E_UNSUPPORTED_FORMAT, "IsFormatSupported(Exclusive) call returns %08lx\n", hr);
+ pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_EXCLUSIVE, pwfx, &pwfx2); ok(hr == S_OK || hr == AUDCLNT_E_UNSUPPORTED_FORMAT, "IsFormatSupported(Exclusive) call returns %08lx\n", hr); ok(pwfx2 == NULL, "pwfx2 non-null on exclusive IsFormatSupported\n"); diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index f0dc29dd1ed..1f8b2655074 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -259,14 +259,19 @@ static void test_audioclient(void) CoTaskMemFree(pwfx2); }
+ pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, pwfx, &pwfx2); ok(hr == S_OK, "Valid IsFormatSupported(Shared) call returns %08lx\n", hr); ok(pwfx2 == NULL, "pwfx2 is non-null\n"); - CoTaskMemFree(pwfx2);
hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, NULL, NULL); ok(hr == E_POINTER, "IsFormatSupported(NULL) call returns %08lx\n", hr);
+ pwfx2 = (WAVEFORMATEX*)0xDEADF00D; + hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, NULL, &pwfx2); + ok(hr == E_POINTER, "IsFormatSupported(NULL) call returns %08lx\n", hr); + ok(pwfx2 == NULL, "pwfx2 is non-null\n"); + hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_SHARED, pwfx, NULL); ok(hr == E_POINTER, "IsFormatSupported(Shared,NULL) call returns %08lx\n", hr);