diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c index 6b2852d8432..8960f15c4af 100644 --- a/dlls/dsound/tests/capture.c +++ b/dlls/dsound/tests/capture.c @@ -446,8 +446,8 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, } else if (rc==DSERR_BADFORMAT) { ok(!(dsccaps.dwFormats & formats[f][3]), "IDirectSoundCapture_CreateCaptureBuffer() failed to create a " - "capture buffer: format listed as supported but using it failed\n"); - if (!(dsccaps.dwFormats & formats[f][3])) + "capture buffer: format listed as supported but using it failed\n"); + if (!(dsccaps.dwFormats & formats[f][3])) trace(" Format not supported: %s\n", format_string(&wfx)); } else if (rc==DSERR_ALLOCATED) trace(" Already In Use\n"); diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c index a0eb895de3a..1989a4cdb27 100644 --- a/dlls/dsound/tests/dsound.c +++ b/dlls/dsound/tests/dsound.c @@ -94,10 +94,15 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, DXGetErrorString8(rc)); rc=IDirectSound_Initialize(dso,lpGuid); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound_Initialize() failed: %s\n", - DXGetErrorString8(rc)); - if (rc==DSERR_NODRIVER) + ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "IDirectSound_Initialize() failed: %s\n",DXGetErrorString8(rc)); + if (rc==DSERR_NODRIVER) { + trace(" No Driver\n"); return; + } else if (rc==DSERR_ALLOCATED) { + trace(" Already Allocated\n"); + return; + } } /* DSOUND: Error: Invalid caps buffer */ @@ -210,21 +215,22 @@ static void IDirectSound_tests() /* try with no device specified */ rc=DirectSoundCreate(NULL,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate(NULL) failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "DirectSoundCreate(NULL) failed: %s\n",DXGetErrorString8(rc)); if (rc==S_OK && dso) IDirectSound_test(dso, TRUE, NULL); /* try with default playback device specified */ rc=DirectSoundCreate(&DSDEVID_DefaultPlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate(DSDEVID_DefaultPlayback)" - " failed: %s\n", DXGetErrorString8(rc)); + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s\n", + DXGetErrorString8(rc)); if (rc==DS_OK && dso) IDirectSound_test(dso, TRUE, NULL); /* try with default voice playback device specified */ rc=DirectSoundCreate(&DSDEVID_DefaultVoicePlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER, + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n", DXGetErrorString8(rc)); if (rc==DS_OK && dso) diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 07cb74ac4dd..4ccb8e4151f 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -103,10 +103,15 @@ static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, DXGetErrorString8(rc)); rc=IDirectSound8_Initialize(dso,lpGuid); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"IDirectSound8_Initialize() failed: %s\n", - DXGetErrorString8(rc)); - if (rc==DSERR_NODRIVER) + ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "IDirectSound8_Initialize() failed: %s\n",DXGetErrorString8(rc)); + if (rc==DSERR_NODRIVER) { + trace(" No Driver\n"); return; + } else if (rc==DSERR_ALLOCATED) { + trace(" Already In Use\n"); + return; + } } /* DSOUND: Error: Invalid caps buffer */ @@ -222,22 +227,22 @@ static void IDirectSound8_tests() /* try with no device specified */ rc=pDirectSoundCreate8(NULL,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL); /* try with default playback device specified */ rc=pDirectSoundCreate8(&DSDEVID_DefaultPlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL); /* try with default voice playback device specified */ rc=pDirectSoundCreate8(&DSDEVID_DefaultVoicePlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %s\n", - DXGetErrorString8(rc)); + ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, + "DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc)); if (rc==DS_OK && dso) IDirectSound8_test(dso, TRUE, NULL);