From 9d5b0873a0283bd5c63d8eda8a7b090d5cd4bea7 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Fri, 13 Aug 2004 19:44:29 +0000 Subject: [PATCH] More dsound tests error message cleanups. Only display verbose information when in interactive mode. --- dlls/dsound/tests/ds3d.c | 8 +-- dlls/dsound/tests/ds3d8.c | 51 +++++++++------ dlls/dsound/tests/dsound.c | 132 ++++++++++++++++++++------------------ dlls/dsound/tests/dsound8.c | 151 +++++++++++++++++++++++--------------------- dlls/dsound/tests/propset.c | 19 +++--- 5 files changed, 194 insertions(+), 167 deletions(-) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 6c531ecbf0e..6f8ce70a531 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -956,7 +956,7 @@ static HRESULT test_primary_3d(LPGUID lpGuid) /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel failed: %s\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", DXGetErrorString8(rc)); EXIT: @@ -987,14 +987,14 @@ static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel failed: %s\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; @@ -1106,7 +1106,7 @@ static void ds3d_tests() { HRESULT rc; rc=DirectSoundEnumerateA(&dsenum_callback,NULL); - ok(rc==DS_OK,"DirectSoundEnumerate() failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %s\n",DXGetErrorString8(rc)); } START_TEST(ds3d) diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 5c96c40e34e..6bd93000ede 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -61,7 +61,8 @@ static int buffer_refill8(play_state_t* state, DWORD size) rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"Lock: 0x%lx\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %s\n", + DXGetErrorString8(rc)); if (rc!=DS_OK) return -1; @@ -73,7 +74,8 @@ static int buffer_refill8(play_state_t* state, DWORD size) } state->offset=state->written % state->buffer_size; rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"Unlock: 0x%lx\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %s\n", + DXGetErrorString8(rc)); if (rc!=DS_OK) return -1; return size; @@ -88,7 +90,8 @@ static int buffer_silence8(play_state_t* state, DWORD size) rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"Lock: 0x%lx\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %s\n", + DXGetErrorString8(rc)); if (rc!=DS_OK) return -1; @@ -99,7 +102,8 @@ static int buffer_silence8(play_state_t* state, DWORD size) } state->offset=(state->offset+size) % state->buffer_size; rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"Unlock: 0x%lx\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %s\n", + DXGetErrorString8(rc)); if (rc!=DS_OK) return -1; return size; @@ -111,7 +115,8 @@ static int buffer_service8(play_state_t* state) HRESULT rc; rc=IDirectSoundBuffer_GetCurrentPosition(state->dsbo,&play_pos,NULL); - ok(rc==DS_OK,"GetCurrentPosition: %lx\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %s\n", + DXGetErrorString8(rc)); if (rc!=DS_OK) { goto STOP; } @@ -125,7 +130,8 @@ static int buffer_service8(play_state_t* state) if (winetest_debug > 1) trace("buf size=%ld last_play_pos=%ld play_pos=%ld played=%ld / %ld\n", - state->buffer_size,last_play_pos,play_pos,state->played,state->wave_len); + state->buffer_size,last_play_pos,play_pos,state->played, + state->wave_len); if (state->played>state->wave_len) { @@ -169,7 +175,8 @@ STOP: if (winetest_debug > 1) trace("stopping playback\n"); rc=IDirectSoundBuffer_Stop(state->dsbo); - ok(rc==DS_OK,"Stop failed: rc=%ld\n",rc); + ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %s\n", + DXGetErrorString8(rc)); return 0; } @@ -198,7 +205,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER dsbo, dsbcaps.dwSize=sizeof(dsbcaps); rc=IDirectSoundBuffer_GetCaps(dsbo,&dsbcaps); ok(rc==DS_OK,"GetCaps failed: 0x%lx\n",rc); - if (rc==DS_OK) { + if (rc==DS_OK && winetest_interactive) { trace(" Caps: flags=0x%08lx size=%ld\n",dsbcaps.dwFlags, dsbcaps.dwBufferBytes); } @@ -212,7 +219,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER dsbo, rc=IDirectSoundBuffer_GetFormat(dsbo,&wfx,sizeof(wfx),NULL); ok(rc==DS_OK,"GetFormat failed: 0x%lx\n",rc); - if (rc==DS_OK && is_primary) { + if (rc==DS_OK && is_primary && winetest_interactive) { trace("Primary buffer default format: tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n", wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); @@ -289,8 +296,10 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER dsbo, DS3DBUFFER buffer_param; DWORD start_time,now; - trace(" Playing %g second 440Hz tone at %ldx%dx%d\n", duration, - wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels); + if (winetest_interactive) { + trace(" Playing %g second 440Hz tone at %ldx%dx%d\n", duration, + wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels); + } if (is_primary) { /* We must call SetCooperativeLevel to be allowed to call Lock */ @@ -524,14 +533,16 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play, bufdesc.dwFlags|=(DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec*BUFFER_LEN/1000; bufdesc.lpwfxFormat=&wfx; - trace(" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d\n", - has_3dbuffer?"3D ":"", - has_duplicate?"duplicated ":"", - listener!=NULL||move_sound?"with ":"", - move_listener?"moving ":"", - listener!=NULL?"listener ":"", - listener&&move_sound?"and moving sound ":move_sound?"moving sound ":"", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels); + if (winetest_interactive) { + trace(" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d\n", + has_3dbuffer?"3D ":"", + has_duplicate?"duplicated ":"", + listener!=NULL||move_sound?"with ":"", + move_listener?"moving ":"", + listener!=NULL?"listener ":"", + listener&&move_sound?"and moving sound ":move_sound?"moving sound ":"", + wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels); + } rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL,"CreateSoundBuffer failed to create a 3D secondary buffer 0x%lx\n",rc); if (rc==DS_OK && secondary!=NULL) { @@ -889,7 +900,7 @@ static void ds3d8_tests() { HRESULT rc; rc=DirectSoundEnumerateA(&dsenum_callback,NULL); - ok(rc==DS_OK,"DirectSoundEnumerate failed: %ld\n",rc); + ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %s\n",DXGetErrorString8(rc)); } START_TEST(ds3d8) diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index a7f0a3289dd..86c4609dc99 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -101,14 +101,16 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, /* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound_GetCaps(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps(NULL) " - "should have failed: %s\n",DXGetErrorString8(rc)); + "should have returned DSERR_INVALIDPARAM, returned: %s\n", + DXGetErrorString8(rc)); ZeroMemory(&dscaps, sizeof(dscaps)); /* DSOUND: Error: Invalid caps buffer */ rc=IDirectSound_GetCaps(dso,&dscaps); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps() " - "should have failed: %s\n",DXGetErrorString8(rc)); + "should have returned DSERR_INVALIDPARAM, returned: %s\n", + DXGetErrorString8(rc)); dscaps.dwSize=sizeof(dscaps); @@ -129,7 +131,8 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, rc=IDirectSound_GetSpeakerConfig(dso,0); ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetSpeakerConfig(NULL) " - "should have failed: %s\n",DXGetErrorString8(rc)); + "should have returned DSERR_INVALIDPARAM, returned: %s\n", + DXGetErrorString8(rc)); rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config); ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %s\n", @@ -238,12 +241,12 @@ static HRESULT test_dsound(LPGUID lpGuid) /* DSOUND: Error: Invalid interface buffer */ rc=DirectSoundCreate(lpGuid,0,NULL); - ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate should have failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate() should have returned " + "DSERR_INVALIDPARAM, returned: %s\n",DXGetErrorString8(rc)); /* Create the DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) return rc; @@ -260,25 +263,25 @@ static HRESULT test_dsound(LPGUID lpGuid) /* Create a DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK) { LPDIRECTSOUND dso1=NULL; /* Create a second DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso1,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK) { /* Release the second DirectSound object */ ref=IDirectSound_Release(dso1); - ok(ref==0,"IDirectSound_Release has %d references, should have 0\n", - ref); + ok(ref==0,"IDirectSound_Release() has %d references, should have " + "0\n",ref); ok(dso!=dso1,"DirectSound objects should be unique: " "dso=0x%08lx,dso1=0x%08lx\n",(DWORD)dso,(DWORD)dso1); } /* Release the first DirectSound object */ ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release has %d references, should have 0\n", + ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n", ref); if (ref!=0) return DSERR_GENERIC; @@ -287,7 +290,7 @@ static HRESULT test_dsound(LPGUID lpGuid) /* Create a DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK) { LPDIRECTSOUNDBUFFER secondary; DSBUFFERDESC bufdesc; @@ -301,26 +304,26 @@ static HRESULT test_dsound(LPGUID lpGuid) bufdesc.lpwfxFormat=&wfx; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); ok(rc==DS_OK && secondary!=NULL, - "IDirectSound_CreateSoundBuffer failed to create a secondary buffer " - "%s\n",DXGetErrorString8(rc)); + "IDirectSound_CreateSoundBuffer() failed to create a secondary " + "buffer %s\n",DXGetErrorString8(rc)); if (rc==DS_OK && secondary!=NULL) { LPDIRECTSOUND3DBUFFER buffer3d; rc=IDirectSound_QueryInterface(secondary, &IID_IDirectSound3DBuffer, (void **)&buffer3d); - ok(rc==DS_OK && buffer3d!=NULL,"QueryInterface failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==DS_OK && buffer3d!=NULL,"IDirectSound_QueryInterface() " + "failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK && buffer3d!=NULL) { ref=IDirectSound3DBuffer_AddRef(buffer3d); - ok(ref==2,"IDirectSound3DBuffer_AddRef has %d references, " + ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " "should have 2\n",ref); } ref=IDirectSoundBuffer_AddRef(secondary); - ok(ref==2,"IDirectSoundBuffer_AddRef has %d references, " + ok(ref==2,"IDirectSoundBuffer_AddRef() has %d references, " "should have 2\n",ref); } /* release with buffer */ ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release has %d references, should have 0\n", + ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n", ref); if (ref!=0) return DSERR_GENERIC; @@ -341,7 +344,7 @@ static HRESULT test_primary(LPGUID lpGuid) /* Create the DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) return rc; @@ -349,27 +352,27 @@ static HRESULT test_primary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; /* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound_CreateSoundBuffer(dso,0,0,NULL); ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_CreateSoundBuffer should have failed: %s\n", + "IDirectSound_CreateSoundBuffer() should have failed: %s\n", DXGetErrorString8(rc)); /* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound_CreateSoundBuffer(dso,0,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer should have failed: rc=%s,dsbo=0x%lx\n", - DXGetErrorString8(rc),(DWORD)primary); + "IDirectSound_CreateSoundBuffer() should have failed: rc=%s," + "dsbo=0x%lx\n",DXGetErrorString8(rc),(DWORD)primary); /* DSOUND: Error: Invalid buffer description pointer */ rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,0,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer should have failed: rc=%s,dsbo=0x%lx\n", - DXGetErrorString8(rc),(DWORD)primary); + "IDirectSound_CreateSoundBuffer() should have failed: rc=%s," + "dsbo=0x%lx\n",DXGetErrorString8(rc),(DWORD)primary); ZeroMemory(&bufdesc, sizeof(bufdesc)); @@ -377,13 +380,13 @@ static HRESULT test_primary(LPGUID lpGuid) /* DSOUND: Error: Invalid buffer description */ rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer should have failed: rc=%s," + "IDirectSound_CreateSoundBuffer() should have failed: rc=%s," "primary=0x%lx\n",DXGetErrorString8(rc),(DWORD)primary); /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel failed: %s\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; @@ -395,8 +398,8 @@ static HRESULT test_primary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer failed to create a primary buffer: %s\n", - DXGetErrorString8(rc)); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: " + "%s\n",DXGetErrorString8(rc)); if (rc==DS_OK && primary!=NULL) { LONG vol; @@ -405,21 +408,21 @@ static HRESULT test_primary(LPGUID lpGuid) * Any changes made to the buffer description will be ignored. */ rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&second,NULL); ok(rc==DS_OK && second==primary, - "IDirectSound_CreateSoundBuffer should have returned original " + "IDirectSound_CreateSoundBuffer() should have returned original " "primary buffer: %s\n",DXGetErrorString8(rc)); ref=IDirectSoundBuffer_Release(second); - ok(ref==1,"IDirectSoundBuffer_Release primary has %d references, " + ok(ref==1,"IDirectSoundBuffer_Release() primary has %d references, " "should have 1\n",ref); /* Try to duplicate a primary buffer */ /* DSOUND: Error: Can't duplicate primary buffers */ rc=IDirectSound_DuplicateSoundBuffer(dso,primary,&third); /* rc=0x88780032 */ - ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer primary buffer should " - "have failed %s\n",DXGetErrorString8(rc)); + ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer() primary buffer " + "should have failed %s\n",DXGetErrorString8(rc)); rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume failed: %s\n", + ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %s\n", DXGetErrorString8(rc)); if (winetest_interactive) { @@ -434,19 +437,19 @@ static HRESULT test_primary(LPGUID lpGuid) !(dscaps.dwFlags & DSCAPS_EMULDRIVER),5.0,0,0,0,0); ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release primary has %d references, " + ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " "should have 0\n",ref); } /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel failed: %s\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", DXGetErrorString8(rc)); EXIT: ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release has %d references, should have 0\n",ref); + ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); if (ref!=0) return DSERR_GENERIC; @@ -469,7 +472,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) /* Create the DirectSound object */ rc=DirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"DirectSoundCreate() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) return rc; @@ -477,14 +480,14 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) ZeroMemory(&dscaps, sizeof(dscaps)); dscaps.dwSize=sizeof(dscaps); rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps failed: %s\n",DXGetErrorString8(rc)); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %s\n",DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; /* We must call SetCooperativeLevel before creating primary buffer */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel failed: %s\n", + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %s\n", DXGetErrorString8(rc)); if (rc!=DS_OK) goto EXIT; @@ -494,15 +497,16 @@ static HRESULT test_primary_secondary(LPGUID lpGuid) bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer failed to create a primary buffer %s\n", - DXGetErrorString8(rc)); + "IDirectSound_CreateSoundBuffer() failed to create a primary buffer " + "%s\n",DXGetErrorString8(rc)); if (rc==DS_OK && primary!=NULL) { for (f=0;f