Michael Stefaniuc : dsound/tests: Version differences in flag handling for 3d buffers.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 2 10:21:19 CST 2015


Module: wine
Branch: master
Commit: 72d67a2d4eebbd88bd4c23fa4c053a7c7d0ec3cd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=72d67a2d4eebbd88bd4c23fa4c053a7c7d0ec3cd

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Tue Dec  1 14:47:42 2015 +0100

dsound/tests: Version differences in flag handling for 3d buffers.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dsound/tests/ds3d.c  |  4 +---
 dlls/dsound/tests/ds3d8.c | 14 +++++++++-----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c
index dffd409..0e0d26f 100644
--- a/dlls/dsound/tests/ds3d.c
+++ b/dlls/dsound/tests/ds3d.c
@@ -805,9 +805,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
         bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2;
         if (has_3dbuffer)
             bufdesc.dwFlags|=DSBCAPS_CTRL3D;
-        else
-            bufdesc.dwFlags|=
-                (DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN);
+        bufdesc.dwFlags|= DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN;
         bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000,
                                     wfx.nBlockAlign);
         bufdesc.lpwfxFormat=&wfx;
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index f0d7d77..b18a91f 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -649,12 +649,16 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play,
             ok(rc==DSERR_INVALIDPARAM,
                "IDirectSound8_CreateSoundBuffer(secondary) should have "
                "returned DSERR_INVALIDPARAM, returned %08x\n", rc);
-            if (secondary)
-            {
-                ref=IDirectSoundBuffer_Release(secondary);
-                ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, should have 0\n",ref);
-            }
             init_format(&wfx,WAVE_FORMAT_PCM,22050,16,1);
+
+            /* Invalid flag combination */
+            bufdesc.dwFlags|=DSBCAPS_CTRLPAN;
+            rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
+            todo_wine
+            ok(rc==DSERR_INVALIDPARAM,
+               "IDirectSound8_CreateSoundBuffer(secondary) should have "
+               "returned DSERR_INVALIDPARAM, returned %08x\n", rc);
+            bufdesc.dwFlags&=~DSBCAPS_CTRLPAN;
         }
 
         if (winetest_interactive) {




More information about the wine-cvs mailing list