Commit 7f8dfe98 authored by John Klehm's avatar John Klehm Committed by Alexandre Julliard

dsound: Accept DSERR_INVALIDCALL for CreateSoundBuffer failure.

parent a85a5ffb
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment