dsound: Accept DSERR_INVALIDCALL for CreateSoundBuffer failure.

This commit is contained in:
John Klehm 2008-07-08 13:48:44 -05:00 committed by Alexandre Julliard
parent a85a5ffb1b
commit 7f8dfe9826
2 changed files with 10 additions and 8 deletions

View File

@ -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)

View File

@ -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)