From 2b30370796d5ee7696b362f51f030e142fb92e7b Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Fri, 18 Feb 2005 12:51:43 +0000 Subject: [PATCH] Fix block align test. --- dlls/dsound/tests/dsound.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index 93fb2fe314..05077820a7 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -760,11 +760,16 @@ static HRESULT test_block_align(LPGUID lpGuid) 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 %ld\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); -- 2.32.0.93.g670b81a890