dsound/tests: Version differences in flag handling for 3d buffers.
authorMichael Stefaniuc <mstefani@redhat.de>
Tue, 1 Dec 2015 13:47:42 +0000 (14:47 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 2 Dec 2015 14:45:10 +0000 (23:45 +0900)
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/dsound/tests/ds3d.c
dlls/dsound/tests/ds3d8.c

index dffd40969c559b6dfa9924df5051e469bf60b739..0e0d26f0f07a6608debb8b192d54ae3e70200dc2 100644 (file)
@@ -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;
index f0d7d7736418cfa138c579aec5d152464161937f..b18a91f47171a76c520818293d86768a8e15653f 100644 (file)
@@ -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) {