[DSOUND] primary buffer size change tests

Robert Reif reif at earthlink.net
Mon Jan 16 19:45:20 CST 2006


It looks like Windows doesn't change the primary buffer length when 
changing formats so make the tests fail now.

This means the current ALSA implementation is broken when hardware 
acceleration is set to full and the primary buffer format is changed.
-------------- next part --------------
Index: dlls/dsound/tests/ds3d.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/ds3d.c,v
retrieving revision 1.32
diff -p -u -r1.32 ds3d.c
--- dlls/dsound/tests/ds3d.c	11 Jan 2006 11:37:46 -0000	1.32
+++ dlls/dsound/tests/ds3d.c	17 Jan 2006 01:37:58 -0000
@@ -410,20 +410,18 @@ void test_buffer(LPDIRECTSOUND dso, LPDI
             trace("    new Caps: flags=0x%08lx size=%ld\n",new_dsbcaps.dwFlags,
                   new_dsbcaps.dwBufferBytes);
         }
-                                                                                
+
         /* Check for primary buffer size change */
-        if (new_dsbcaps.dwBufferBytes != dsbcaps.dwBufferBytes) {
-            trace("    buffer size changed after SetFormat() - "
-                  "previous size was %lu, current size is %lu\n",
-                  dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes);
-        }
+        ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes,
+           "    buffer size changed after SetFormat() - "
+           "previous size was %lu, current size is %lu\n",
+           dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes);
 
         /* Check for primary buffer flags change */
-        if (new_dsbcaps.dwFlags != dsbcaps.dwFlags) {
-            trace("    flags changed after SetFormat() - "
-                  "previous flags were %08lx, current flags are %08lx\n",
-                  dsbcaps.dwFlags, new_dsbcaps.dwFlags);
-        }
+        ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags,
+           "    flags changed after SetFormat() - "
+           "previous flags were %08lx, current flags are %08lx\n",
+           dsbcaps.dwFlags, new_dsbcaps.dwFlags);
 
         /* Set the CooperativeLevel back to normal */
         /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */
Index: dlls/dsound/tests/ds3d8.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/ds3d8.c,v
retrieving revision 1.24
diff -p -u -r1.24 ds3d8.c
--- dlls/dsound/tests/ds3d8.c	11 Jan 2006 11:37:46 -0000	1.24
+++ dlls/dsound/tests/ds3d8.c	17 Jan 2006 01:37:59 -0000
@@ -304,18 +304,16 @@ void test_buffer8(LPDIRECTSOUND8 dso, LP
         }
 
         /* Check for primary buffer size change */
-        if (new_dsbcaps.dwBufferBytes != dsbcaps.dwBufferBytes) {
-            trace("    buffer size changed after SetFormat() - "
-                  "previous size was %lu, current size is %lu\n",
-                  dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes);
-        }
+        ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes,
+           "    buffer size changed after SetFormat() - "
+           "previous size was %lu, current size is %lu\n",
+           dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes);
 
         /* Check for primary buffer flags change */
-        if (new_dsbcaps.dwFlags != dsbcaps.dwFlags) {
-            trace("    flags changed after SetFormat() - "
-                  "previous flags were %08lx, current flags are %08lx\n",
-                  dsbcaps.dwFlags, new_dsbcaps.dwFlags);
-        }
+        ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags,
+           "    flags changed after SetFormat() - "
+           "previous flags were %08lx, current flags are %08lx\n",
+           dsbcaps.dwFlags, new_dsbcaps.dwFlags);
 
         /* Set the CooperativeLevel back to normal */
         /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */


More information about the wine-patches mailing list