John Klehm : dsound: Accept DSERR_INVALIDCALL for CreateSoundBuffer failure .
Alexandre Julliard
julliard at winehq.org
Wed Jul 9 06:10:00 CDT 2008
Module: wine
Branch: master
Commit: 7f8dfe98263e9cdaf1dffc50dd3f7a03dd4b98b9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7f8dfe98263e9cdaf1dffc50dd3f7a03dd4b98b9
Author: John Klehm <xixsimplicityxix at gmail.com>
Date: Tue Jul 8 13:48:44 2008 -0500
dsound: Accept DSERR_INVALIDCALL for CreateSoundBuffer failure.
---
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..14a6a77 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)
More information about the wine-cvs
mailing list