From 397f5738154835dccdffe41d746bd67b08dc99a6 Mon Sep 17 00:00:00 2001 From: John Klehm Date: Tue, 8 Jul 2008 13:48:44 -0500 Subject: dsound: Accept DSERR_INVALIDCALL for CreateSoundBuffer failure. nvapu.sys,btint.sys, and more show this behavior --- dlls/dsound/tests/dsound.c | 9 +++++---- dlls/dsound/tests/dsound8.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index 394b798..180b45c 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -716,9 +716,10 @@ static HRESULT test_secondary(LPGUID lpGuid) if (gotdx8 || wfx.wBitsPerSample <= 16) { if (wfx.wBitsPerSample > 16) - ok(rc == DSERR_CONTROLUNAVAIL && !secondary, "IDirectSound_CreateSoundBuffer() " - "should have returned DSERR_CONTROLUNAVAIL and NULL, returned: %08x %p\n", - rc, secondary); + ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) && + !secondary, "IDirectSound_CreateSoundBuffer() " + "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " + "and NULL, returned: %08x %p\n", rc, secondary); else ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); @@ -767,7 +768,7 @@ static HRESULT test_secondary(LPGUID lpGuid) wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.SubFormat = GUID_NULL; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DSERR_INVALIDPARAM && !secondary, + ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", rc, secondary); if (secondary) diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 51a4ca6..e45f289 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -723,9 +723,10 @@ static HRESULT test_secondary8(LPGUID lpGuid) bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); if (wfx.wBitsPerSample != 8 && wfx.wBitsPerSample != 16) - ok(rc == DSERR_CONTROLUNAVAIL && !secondary, "IDirectSound_CreateSoundBuffer() " - "should have returned DSERR_CONTROLUNAVAIL and NULL, returned: %08x %p\n", - rc, secondary); + ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) && + !secondary, "IDirectSound_CreateSoundBuffer() " + "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " + "and NULL, returned: %08x %p\n", rc, secondary); else ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " @@ -761,7 +762,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.SubFormat = GUID_NULL; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DSERR_INVALIDPARAM && !secondary, + ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", rc, secondary); if (secondary) -- 1.5.6.1