[DSOUND] fix block align test

Robert Reif reif at earthlink.net
Thu Feb 17 17:36:01 CST 2005


Fix block align test.
-------------- next part --------------
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.46
diff -u -p -r1.46 dsound.c
--- dlls/dsound/tests/dsound.c	16 Feb 2005 16:09:02 -0000	1.46
+++ dlls/dsound/tests/dsound.c	17 Feb 2005 23:31:13 -0000
@@ -760,11 +760,16 @@ static HRESULT test_block_align(LPGUID l
        DXGetErrorString8(rc));
 
     if (rc==DS_OK && secondary!=NULL) {
+        ZeroMemory(&dsbcaps, sizeof(dsbcaps));
+        dsbcaps.dwSize = sizeof(dsbcaps);
         rc=IDirectSoundBuffer_GetCaps(secondary,&dsbcaps);
         ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() should have returned DS_OK, "
            "returned: %s\n", DXGetErrorString8(rc));
-        ok(dsbcaps.dwBufferBytes==(wfx.nAvgBytesPerSec + 4),
-           "Buffer size not a multiple of nBlockAlign\n");
+        if (rc==DS_OK)
+            ok(dsbcaps.dwBufferBytes==(wfx.nAvgBytesPerSec + wfx.nBlockAlign),
+               "Buffer size not a multiple of nBlockAlign: requested %ld, "
+               "got %ld, should be %d\n", bufdesc.dwBufferBytes,
+               dsbcaps.dwBufferBytes, wfx.nAvgBytesPerSec + wfx.nBlockAlign);
         ref=IDirectSoundBuffer_Release(secondary);
         ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d references, "
            "should have 0\n",ref);


More information about the wine-patches mailing list