Commit 73bd3be8 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Downgrade tests to DX8 level so it can build on all windows

platforms.
parent 68ade3b7
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = dsound.dll
IMPORTS = dsound ole32 user32 kernel32
EXTRALIBS = -ldxguid -luuid -ldxerr9
EXTRALIBS = -ldxguid -luuid -ldxerr8
CTESTS = \
capture.c \
......
......@@ -32,7 +32,7 @@
#include "wingdi.h"
#include "dsound.h"
#include "mmreg.h"
#include "dxerr9.h"
#include "dxerr8.h"
#include "dsound_test.h"
......@@ -78,17 +78,17 @@ static int capture_buffer_service(capture_state_t* state)
DWORD capture_pos,read_pos;
rc=IDirectSoundCaptureBuffer_GetCurrentPosition(state->dscbo,&capture_pos,&read_pos);
ok(rc==DS_OK,"GetCurrentPosition failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCurrentPosition failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return 0;
rc=IDirectSoundCaptureBuffer_Lock(state->dscbo,state->offset,state->size,&ptr1,&len1,&ptr2,&len2,0);
ok(rc==DS_OK,"Lock failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"Lock failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return 0;
rc=IDirectSoundCaptureBuffer_Unlock(state->dscbo,ptr1,len1,ptr2,len2);
ok(rc==DS_OK,"Unlock failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"Unlock failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return 0;
......@@ -109,16 +109,16 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
/* Private dsound.dll: Error: Invalid caps pointer */
rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
/* Private dsound.dll: Error: Invalid caps pointer */
dscbcaps.dwSize=0;
rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
dscbcaps.dwSize=sizeof(dscbcaps);
rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps);
ok(rc==DS_OK,"GetCaps failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" Caps: size = %ld flags=0x%08lx buffer size=%ld\n",
dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes);
......@@ -128,16 +128,16 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
/* Private dsound.dll: Error: Either pwfxFormat or pdwSizeWritten must be non-NULL */
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,NULL);
ok(rc==DSERR_INVALIDPARAM,
"GetFormat should have returned an error: rc=0x%lx(%s)\n",rc,DXGetErrorString9(rc));
"GetFormat should have returned an error: rc=0x%lx(%s)\n",rc,DXGetErrorString8(rc));
size=0;
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,&size);
ok(rc==DS_OK && size!=0,
"GetFormat should have returned the needed size: rc=0x%lx(%s) size=%ld\n",
rc,DXGetErrorString9(rc),size);
rc,DXGetErrorString8(rc),size);
rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL);
ok(rc==DS_OK,"GetFormat failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetFormat failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" tag=0x%04x %ldx%dx%d avg.B/s=%ld align=%d\n",
wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample,
......@@ -146,10 +146,10 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
/* Private dsound.dll: Error: Invalid status pointer */
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,0);
ok(rc==DSERR_INVALIDPARAM,"GetStatus should have failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetStatus should have failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status);
ok(rc==DS_OK,"GetStatus failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetStatus failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" status=0x%04lx\n",status);
}
......@@ -163,7 +163,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
state.size = dscbcaps.dwBufferBytes / NOTIFICATIONS;
rc=IDirectSoundCaptureBuffer_QueryInterface(dscbo,&IID_IDirectSoundNotify,(void **)&(state.notify));
ok((rc==DS_OK)&&(state.notify!=NULL),"QueryInterface failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok((rc==DS_OK)&&(state.notify!=NULL),"QueryInterface failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return;
......@@ -173,23 +173,23 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
}
rc=IDirectSoundNotify_SetNotificationPositions(state.notify,NOTIFICATIONS,state.posnotify);
ok(rc==DS_OK,"SetNotificationPositions failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"SetNotificationPositions failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return;
rc=IDirectSoundNotify_Release(state.notify);
ok(rc==0,"Release: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==0,"Release: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=0)
return;
if (record) {
rc=IDirectSoundCaptureBuffer_Start(dscbo,DSCBSTART_LOOPING);
ok(rc==DS_OK,"Start: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"Start: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return;
rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status);
ok(rc==DS_OK,"GetStatus failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetStatus failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
ok(status==(DSCBSTATUS_CAPTURING|DSCBSTATUS_LOOPING),
"GetStatus: bad status: %lx\n",status);
if (rc!=DS_OK)
......@@ -208,7 +208,7 @@ static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco,
}
rc=IDirectSoundCaptureBuffer_Stop(dscbo);
ok(rc==DS_OK,"Stop: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"Stop: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
return;
}
......@@ -228,29 +228,29 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
/* Private dsound.dll: Error: Invalid interface buffer */
trace("Testing %s - %s\n",lpcstrDescription,lpcstrModule);
rc=DirectSoundCaptureCreate(lpGuid,NULL,NULL);
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate didn't fail: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate didn't fail: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
ref=IDirectSoundCapture_Release(dsco);
ok(ref==0,"IDirectSoundCapture_Release has %d references, should have 0\n",ref);
}
rc=DirectSoundCaptureCreate(lpGuid,&dsco,NULL);
ok((rc==DS_OK)||(rc==DSERR_NODRIVER),"DirectSoundCaptureCreate failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok((rc==DS_OK)||(rc==DSERR_NODRIVER),"DirectSoundCaptureCreate failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc!=DS_OK)
goto EXIT;
/* Private dsound.dll: Error: Invalid caps buffer */
rc=IDirectSoundCapture_GetCaps(dsco,NULL);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
/* Private dsound.dll: Error: Invalid caps buffer */
dsccaps.dwSize=0;
rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
dsccaps.dwSize=sizeof(dsccaps);
rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps);
ok(rc==DS_OK,"GetCaps failed: 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSoundCapture Caps: size=%ld flags=0x%08lx formats=%05lx channels=%ld\n",
dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats,dsccaps.dwChannels);
......@@ -265,7 +265,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=NULL;
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
ref=IDirectSoundCaptureBuffer_Release(dscbo);
ok(ref==0,"IDirectSoundCaptureBuffer_Release has %d references, should have 0\n",ref);
......@@ -280,7 +280,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=NULL;
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
ref=IDirectSoundCaptureBuffer_Release(dscbo);
ok(ref==0,"IDirectSoundCaptureBuffer_Release has %d references, should have 0\n",ref);
......@@ -296,7 +296,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=&wfx;
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
ref=IDirectSoundCaptureBuffer_Release(dscbo);
ok(ref==0,"IDirectSoundCaptureBuffer_Release has %d references, should have 0\n",ref);
......@@ -312,7 +312,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.dwReserved=0;
bufdesc.lpwfxFormat=&wfx;
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"CreateCaptureBuffer should have failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
ref=IDirectSoundCaptureBuffer_Release(dscbo);
ok(ref==0,"IDirectSoundCaptureBuffer_Release has %d references, should have 0\n",ref);
......@@ -329,7 +329,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.lpwfxFormat=&wfx;
trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok((rc==DS_OK)&&(dscbo!=NULL),"CreateCaptureBuffer failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok((rc==DS_OK)&&(dscbo!=NULL),"CreateCaptureBuffer failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if (rc==DS_OK) {
test_capture_buffer(dsco, dscbo, winetest_interactive);
ref=IDirectSoundCaptureBuffer_Release(dscbo);
......@@ -348,7 +348,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.lpwfxFormat=&wfx;
trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok((rc==DS_OK)&&(dscbo!=NULL),"CreateCaptureBuffer failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok((rc==DS_OK)&&(dscbo!=NULL),"CreateCaptureBuffer failed to create a capture buffer 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
if ((rc==DS_OK)&&(dscbo!=NULL)) {
test_capture_buffer(dsco, dscbo, winetest_interactive);
ref=IDirectSoundCaptureBuffer_Release(dscbo);
......@@ -367,7 +367,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
bufdesc.lpwfxFormat=&wfx;
trace(" Testing the capture buffer at %s\n", format_string(&wfx));
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
ok(rc!=DS_OK,"CreateCaptureBuffer should have failed at 2 MHz 0x%lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc!=DS_OK,"CreateCaptureBuffer should have failed at 2 MHz 0x%lx(%s)\n",rc,DXGetErrorString8(rc));
#endif
EXIT:
......@@ -383,7 +383,7 @@ static void capture_tests()
{
HRESULT rc;
rc=DirectSoundCaptureEnumerateA(&dscenum_callback,NULL);
ok(rc==DS_OK,"DirectSoundCaptureEnumerate failed: 0x%08lx(%s)\n",rc,DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCaptureEnumerate failed: 0x%08lx(%s)\n",rc,DXGetErrorString8(rc));
}
START_TEST(capture)
......
......@@ -36,7 +36,7 @@
#include "windef.h"
#include "wingdi.h"
#include "dsound.h"
#include "dxerr9.h"
#include "dxerr8.h"
#include "dsound_test.h"
......@@ -52,46 +52,46 @@ static void dsound_dsound_tests()
/* try the COM class factory method of creation */
rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void**)&dso);
ok(rc==S_OK,"CoCreateInstance failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"CoCreateInstance failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* try unitialized object */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_UNINITIALIZED,"GetCaps should have returned DSERR_UNINITIALIZED, returned: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_UNINITIALIZED,"GetCaps should have returned DSERR_UNINITIALIZED, returned: %s\n",DXGetErrorString8(rc));
rc=IDirectSound_Initialize(dso,NULL);
ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString8(rc));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -104,39 +104,39 @@ static void dsound_dsound_tests()
/* try with no device specified */
rc=DirectSoundCreate(NULL,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate(NULL) failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate(NULL) failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -149,39 +149,39 @@ static void dsound_dsound_tests()
/* try with default playback device specified */
rc=DirectSoundCreate(&DSDEVID_DefaultPlayback,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -194,39 +194,39 @@ static void dsound_dsound_tests()
/* try with default voice playback device specified */
rc=DirectSoundCreate(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -250,46 +250,46 @@ static void dsound_dsound8_tests()
/* try the COM class factory method of creation */
rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void**)&dso);
ok(rc==S_OK,"CoCreateInstance failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"CoCreateInstance failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* try unitialized object */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_UNINITIALIZED,"GetCaps should have returned DSERR_UNINITIALIZED, returned: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_UNINITIALIZED,"GetCaps should have returned DSERR_UNINITIALIZED, returned: %s\n",DXGetErrorString8(rc));
rc=IDirectSound8_Initialize(dso,NULL);
ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString8(rc));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -302,39 +302,39 @@ static void dsound_dsound8_tests()
/* try with no device specified */
rc=DirectSoundCreate8(NULL,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -347,39 +347,39 @@ static void dsound_dsound8_tests()
/* try with default playback device specified */
rc=DirectSoundCreate8(&DSDEVID_DefaultPlayback,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -392,39 +392,39 @@ static void dsound_dsound8_tests()
/* try with default voice playback device specified */
rc=DirectSoundCreate8(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==S_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (dso) {
/* Try to Query for objects */
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -448,45 +448,45 @@ 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",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate should have failed: %s\n",DXGetErrorString8(rc));
/* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc));
if (rc!=DS_OK)
return rc;
/* Try to Query for objects */
rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(unknown);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) should have failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -501,13 +501,13 @@ static HRESULT test_dsound(LPGUID lpGuid)
/* Create a DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString9(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",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
/* Release the second DirectSound object */
ref=IDirectSound_Release(dso1);
......@@ -525,7 +525,7 @@ static HRESULT test_dsound(LPGUID lpGuid)
/* Create a DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
LPDIRECTSOUNDBUFFER secondary;
DSBUFFERDESC bufdesc;
......@@ -542,7 +542,7 @@ static HRESULT test_dsound(LPGUID lpGuid)
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",DXGetErrorString9(rc));
ok(rc==DS_OK && buffer3d!=NULL,"QueryInterface failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && buffer3d!=NULL) {
ref=IDirectSound3DBuffer_AddRef(buffer3d);
ok(ref==2,"IDirectSound3DBuffer_AddRef has %d references, should have 2\n",ref);
......@@ -573,45 +573,45 @@ static HRESULT test_dsound8(LPGUID lpGuid)
/* DSOUND: Error: Invalid interface buffer */
rc=DirectSoundCreate8(lpGuid,0,NULL);
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate8 should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate8 should have failed: %s\n",DXGetErrorString8(rc));
/* Create the DirectSound8 object */
rc=DirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (rc!=DS_OK)
return rc;
/* Try to Query for objects */
rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(unknown);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound_Release(ds);
rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8);
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK)
IDirectSound8_Release(ds8);
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
ZeroMemory(&dscaps, sizeof(dscaps));
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString8(rc));
dscaps.dwSize=sizeof(dscaps);
/* DSOUND: Running on a certified driver */
rc=IDirectSound8_GetCaps(dso,&dscaps);
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"GetCaps failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
trace(" DirectSound Caps: flags=0x%08lx secondary min=%ld max=%ld\n",
dscaps.dwFlags,dscaps.dwMinSecondarySampleRate,
......@@ -626,13 +626,13 @@ static HRESULT test_dsound8(LPGUID lpGuid)
/* Create a DirectSound8 object */
rc=DirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
LPDIRECTSOUND8 dso1=NULL;
/* Create a second DirectSound8 object */
rc=DirectSoundCreate8(lpGuid,&dso1,NULL);
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
/* Release the second DirectSound8 object */
ref=IDirectSound8_Release(dso1);
......@@ -650,7 +650,7 @@ static HRESULT test_dsound8(LPGUID lpGuid)
/* Create a DirectSound8 object */
rc=DirectSoundCreate8(lpGuid,&dso,NULL);
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK,"DirectSoundCreate8 failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK) {
LPDIRECTSOUNDBUFFER secondary;
DSBUFFERDESC bufdesc;
......@@ -668,7 +668,7 @@ static HRESULT test_dsound8(LPGUID lpGuid)
LPDIRECTSOUND3DBUFFER buffer3d;
LPDIRECTSOUNDBUFFER8 buffer8;
rc=IDirectSound_QueryInterface(secondary, &IID_IDirectSound3DBuffer, (void **)&buffer3d);
ok(rc==DS_OK && buffer3d!=NULL,"QueryInterface failed: %s\n",DXGetErrorString9(rc));
ok(rc==DS_OK && buffer3d!=NULL,"QueryInterface failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && buffer3d!=NULL) {
ref=IDirectSound3DBuffer_AddRef(buffer3d);
ok(ref==2,"IDirectSound3DBuffer_AddRef has %d references, should have 2\n",ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment