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) ...@@ -716,9 +716,10 @@ static HRESULT test_secondary(LPGUID lpGuid)
if (gotdx8 || wfx.wBitsPerSample <= 16) if (gotdx8 || wfx.wBitsPerSample <= 16)
{ {
if (wfx.wBitsPerSample > 16) if (wfx.wBitsPerSample > 16)
ok(rc == DSERR_CONTROLUNAVAIL && !secondary, "IDirectSound_CreateSoundBuffer() " ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) &&
"should have returned DSERR_CONTROLUNAVAIL and NULL, returned: %08x %p\n", !secondary, "IDirectSound_CreateSoundBuffer() "
rc, secondary); "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) "
"and NULL, returned: %08x %p\n", rc, secondary);
else else
ok(rc==DS_OK && secondary!=NULL, ok(rc==DS_OK && secondary!=NULL,
"IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc);
...@@ -767,7 +768,7 @@ static HRESULT test_secondary(LPGUID lpGuid) ...@@ -767,7 +768,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx);
wfxe.SubFormat = GUID_NULL; wfxe.SubFormat = GUID_NULL;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,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", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
if (secondary) if (secondary)
......
...@@ -723,9 +723,10 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -723,9 +723,10 @@ static HRESULT test_secondary8(LPGUID lpGuid)
bufdesc.lpwfxFormat=&wfx; bufdesc.lpwfxFormat=&wfx;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
if (wfx.wBitsPerSample != 8 && wfx.wBitsPerSample != 16) if (wfx.wBitsPerSample != 8 && wfx.wBitsPerSample != 16)
ok(rc == DSERR_CONTROLUNAVAIL && !secondary, "IDirectSound_CreateSoundBuffer() " ok((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL) &&
"should have returned DSERR_CONTROLUNAVAIL and NULL, returned: %08x %p\n", !secondary, "IDirectSound_CreateSoundBuffer() "
rc, secondary); "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) "
"and NULL, returned: %08x %p\n", rc, secondary);
else else
ok(rc==DS_OK && secondary!=NULL, ok(rc==DS_OK && secondary!=NULL,
"IDirectSound_CreateSoundBuffer() failed to create a secondary " "IDirectSound_CreateSoundBuffer() failed to create a secondary "
...@@ -761,7 +762,7 @@ static HRESULT test_secondary8(LPGUID lpGuid) ...@@ -761,7 +762,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx);
wfxe.SubFormat = GUID_NULL; wfxe.SubFormat = GUID_NULL;
rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,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", "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
rc, secondary); rc, secondary);
if (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