From 812d90ccb6204ad733fd377cb91437902138d376 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 4b84eb9..b8d64d5 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -753,9 +753,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: %s %p\n", - DXGetErrorString8(rc), secondary); + ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) && + !secondary, "IDirectSound_CreateSoundBuffer() " + "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " + "and NULL, returned: %s %p\n", DXGetErrorString8(rc), secondary); else ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " @@ -805,7 +806,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: %s %p\n", DXGetErrorString8(rc), secondary); if (secondary) diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 024dbc1..d8f38ea 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -758,9 +758,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: %s %p\n", - DXGetErrorString8(rc), secondary); + ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) && + !secondary, "IDirectSound_CreateSoundBuffer() " + "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " + "and NULL, returned: %s %p\n", DXGetErrorString8(rc), secondary); else ok(rc==DS_OK && secondary!=NULL, "IDirectSound_CreateSoundBuffer() failed to create a secondary " @@ -796,7 +797,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: %s %p\n", DXGetErrorString8(rc), secondary); if (secondary) -- 1.5.6.1