26#ifndef DSBCAPS_CTRLDEFAULT
27#define DSBCAPS_CTRLDEFAULT \
28 DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLPAN|DSBCAPS_CTRLVOLUME
34 0x62A69BAE,0xDF9D,0x11D1,0x99,0xA6,0x00,0xC0,0x4F,0xC9,0x9D,0x46);
36 0x306a6a8,0xb224,0x11d2,0x99,0xe5,0x0,0x0,0xe8,0xd8,0xc7,0x22);
38 0x306a6a7,0xb224,0x11d2,0x99,0xe5,0x0,0x0,0xe8,0xd8,0xc7,0x22);
40 0xDA0F0520,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11);
42 0xDA0F0521,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11);
44 0xCD5368E0,0x3450,0x11D3,0x8B,0x6E,0x00,0x10,0x5A,0x9B,0x7B,0xBC);
63 trace(
" found device:\n");
68 trace(
" DataFlow: %s\n",
71 "Capture" :
"Unknown");
72 trace(
" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
73 data->DeviceId.Data1,
data->DeviceId.Data2,
data->DeviceId.Data3,
74 data->DeviceId.Data4[0],
data->DeviceId.Data4[1],
75 data->DeviceId.Data4[2],
data->DeviceId.Data4[3],
76 data->DeviceId.Data4[4],
data->DeviceId.Data4[5],
77 data->DeviceId.Data4[6],
data->DeviceId.Data4[7]);
78 trace(
" Description: %s\n",
data->Description);
80 trace(
" Interface: %s\n",
data->Interface);
81 trace(
" WaveDeviceId: %d\n",
data->WaveDeviceId);
89 char descriptionA[0x100];
92 trace(
" found device:\n");
97 trace(
" DataFlow: %s\n",
100 "Capture" :
"Unknown");
101 trace(
" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
102 data->DeviceId.Data1,
data->DeviceId.Data2,
data->DeviceId.Data3,
103 data->DeviceId.Data4[0],
data->DeviceId.Data4[1],
104 data->DeviceId.Data4[2],
data->DeviceId.Data4[3],
105 data->DeviceId.Data4[4],
data->DeviceId.Data4[5],
106 data->DeviceId.Data4[6],
data->DeviceId.Data4[7]);
107 trace(
" DescriptionA: %s\n",
data->DescriptionA);
109 trace(
" DescriptionW: %s\n", descriptionA);
112 trace(
" ModuleW: %s\n", moduleA);
113 trace(
" WaveDeviceId: %d\n",
data->WaveDeviceId);
121 trace(
" found device:\n");
126 trace(
" DataFlow: %s\n",
129 "Capture" :
"Unknown");
130 trace(
" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
131 data->DeviceId.Data1,
data->DeviceId.Data2,
data->DeviceId.Data3,
132 data->DeviceId.Data4[0],
data->DeviceId.Data4[1],
133 data->DeviceId.Data4[2],
data->DeviceId.Data4[3],
134 data->DeviceId.Data4[4],
data->DeviceId.Data4[5],
135 data->DeviceId.Data4[6],
data->DeviceId.Data4[7]);
136 trace(
" Description: %s\n",
data->Description);
138 trace(
" Interface: %s\n",
data->Interface);
139 trace(
" WaveDeviceId: %d\n",
data->WaveDeviceId);
147 char descriptionA[0x100];
151 trace(
"found device:\n");
152 trace(
"\tType: %s\n",
156 trace(
"\tDataFlow: %s\n",
159 "Capture" :
"Unknown");
160 trace(
"\tDeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
161 data->DeviceId.Data1,
data->DeviceId.Data2,
data->DeviceId.Data3,
162 data->DeviceId.Data4[0],
data->DeviceId.Data4[1],
163 data->DeviceId.Data4[2],
data->DeviceId.Data4[3],
164 data->DeviceId.Data4[4],
data->DeviceId.Data4[5],
165 data->DeviceId.Data4[6],
data->DeviceId.Data4[7]);
169 trace(
"\tDescription: %s\n", descriptionA);
170 trace(
"\tModule: %s\n", moduleA);
171 trace(
"\tInterface: %s\n", interfaceA);
172 trace(
"\tWaveDeviceId: %d\n",
data->WaveDeviceId);
188 "IID_IClassFactory) should have returned DSERR_INVALIDPARAM, "
189 "returned: %08x\n",rc);
191 rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IDirectSound, (
void **)(&pcf));
193 "IID_IDirectSound) should have returned E_NOINTERFACE, "
194 "returned: %08x\n",rc);
196 rc = (pDllGetClassObject)(&CLSID_DirectSound, &
IID_IUnknown, (
void **)(&pcf));
197 ok(rc==
DS_OK,
"DllGetClassObject(CLSID_DirectSound, "
198 "IID_IUnknown) failed: %08x\n",rc);
200 rc = (pDllGetClassObject)(&CLSID_DirectSound, &
IID_IClassFactory, (
void **)(&pcf));
201 ok(pcf!=0,
"DllGetClassObject(CLSID_DirectSound, IID_IClassFactory) "
202 "failed: %08x\n",rc);
211 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
215 ok(rc==
E_NOINTERFACE,
"CreateInstance(IID_IKsPropertySet) should have "
216 "returned E_NOINTERFACE, returned: %08x\n",rc);
219 if (pDirectSoundCreate8) {
220 rc = (pDllGetClassObject)(&CLSID_DirectSound8, &
IID_IClassFactory, (
void **)(&pcf));
221 ok(pcf!=0,
"DllGetClassObject(CLSID_DirectSound8, IID_IClassFactory) "
222 "failed: %08x\n",rc);
229 ok(rc==
E_NOINTERFACE,
"CreateInstance(IID_IKsPropertySet) should have "
230 "returned E_NOINTERFACE, returned: %08x\n",rc);
234 if (pDirectSoundCaptureCreate) {
237 ok(pcf!=0,
"DllGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) "
238 "failed: %08x\n",rc);
245 ok(rc==
E_NOINTERFACE,
"CreateInstance(IID_IKsPropertySet) should have "
246 "returned E_NOINTERFACE,returned: %08x\n",rc);
250 if (pDirectSoundCaptureCreate8) {
253 ok(pcf!=0,
"DllGetClassObject(CLSID_DirectSoundCapture8, "
254 "IID_IClassFactory) failed: %08x\n",rc);
261 ok(rc==
E_NOINTERFACE,
"CreateInstance(IID_IKsPropertySet) should have "
262 "returned E_NOINTERFACE, returned: %08x\n",rc);
266 if (pDirectSoundFullDuplexCreate) {
269 ok(pcf!=0,
"DllGetClassObject(CLSID_DirectSoundFullDuplex, "
270 "IID_IClassFactory) failed: %08x\n",rc);
277 ok(rc==
E_NOINTERFACE,
"CreateInstance(IID_IKsPropertySet) should have "
278 "returned NOINTERFACE, returned: %08x\n",rc);
292 ok(rc==
DS_OK,
"CreateInstance(IID_IKsPropertySet) failed: %08x\n",
302 "QuerySupport(DSPROPSETID_DirectSoundDevice, "
303 "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION) failed: %08x\n",
307 trace(
" Not Supported\n");
312 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: "
313 "support = 0x%x\n",support);
315 "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: "
316 "support = 0x%x\n",support);
323 "QuerySupport(DSPROPSETID_DirectSoundDevice, "
324 "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1) failed: %08x\n",
328 trace(
" Not Supported\n");
333 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: "
334 "support = 0x%x\n",support);
336 "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: "
337 "support = 0x%x\n",support);
344 "QuerySupport(DSPROPSETID_DirectSoundDevice, "
345 "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A) failed: %08x\n",
349 trace(
" Not Supported\n");
354 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: "
355 "support = 0x%x\n",support);
357 "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: "
358 "support = 0x%x\n",support);
365 "QuerySupport(DSPROPSETID_DirectSoundDevice, "
366 "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W) failed: %08x\n",
370 trace(
" Not Supported\n");
375 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: "
376 "support = 0x%x\n",support);
378 "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: "
379 "support = 0x%x\n",support);
384 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
385 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING) failed: %08x\n",
391 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: "
392 "support = 0x%x\n",support);
394 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: support = "
400 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
401 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A) failed: %08x\n",
407 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: "
408 "support = 0x%x\n",support);
410 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: support = "
416 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
417 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W) failed: %08x\n",
423 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: "
424 "support = 0x%x\n",support);
426 "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: support = "
430 trace(
"*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE ***\n");
434 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
435 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE) failed: %08x\n",
441 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: "
442 "support = 0x%x\n",support);
444 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: support = 0x%x\n",support);
456 ok(rc==
DS_OK,
"Couldn't enumerate: 0x%x\n",rc);
460 trace(
"*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 ***\n");
464 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
465 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1) failed: %08x\n",
471 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: "
472 "support = 0x%x\n",support);
474 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: support = 0x%x\n",support);
486 ok(rc==
DS_OK,
"Couldn't enumerate: 0x%x\n",rc);
490 trace(
"*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A ***\n");
494 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
495 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A) failed: %08x\n",
501 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: "
502 "support = 0x%x\n",support);
504 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: support = 0x%x\n",support);
516 ok(rc==
DS_OK,
"Couldn't enumerate: 0x%x\n",rc);
520 trace(
"*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W ***\n");
524 ok(rc==
DS_OK,
"QuerySupport(DSPROPSETID_DirectSoundDevice, "
525 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W) failed: %08x\n",
531 "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: "
532 "support = 0x%x\n",support);
534 "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: support = 0x%x\n",support);
546 ok(rc==
DS_OK,
"Couldn't enumerate: 0x%x\n",rc);
563 trace(
"*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
568 "DirectSoundCreate() failed: %08x\n",rc);
571 trace(
" No Driver\n");
573 trace(
" Already In Use\n");
575 trace(
" No Device\n");
582 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n",
590 bufdesc.
dwSize=
sizeof(bufdesc);
595 "IDirectSound_CreateSoundBuffer() failed to "
596 "create a hardware 3D primary buffer: %08x\n",rc);
598 skip(
"broken driver\n");
610 bufdesc.
dwSize=
sizeof(bufdesc);
614 trace(
" Testing a secondary buffer at %dx%dx%d\n",
618 "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer: %08x\n",rc);
623 (
void **)&pPropertySet);
627 trace(
" Supports property sets\n");
630 &DSPROPSETID_VoiceManager,
634 trace(
" DSPROPSETID_VoiceManager supported\n");
636 trace(
" DSPROPSETID_VoiceManager not supported\n");
638 &DSPROPSETID_EAX20_ListenerProperties,0,&ulTypeSupport);
641 trace(
" DSPROPSETID_EAX20_ListenerProperties "
644 trace(
" DSPROPSETID_EAX20_ListenerProperties not "
647 &DSPROPSETID_EAX20_BufferProperties,0,&ulTypeSupport);
650 trace(
" DSPROPSETID_EAX20_BufferProperties supported\n");
652 trace(
" DSPROPSETID_EAX20_BufferProperties not "
655 &DSPROPSETID_I3DL2_ListenerProperties,0,&ulTypeSupport);
658 trace(
" DSPROPSETID_I3DL2_ListenerProperties "
661 trace(
" DSPROPSETID_I3DL2_ListenerProperties not "
664 &DSPROPSETID_I3DL2_BufferProperties,0,&ulTypeSupport);
667 trace(
" DSPROPSETID_I3DL2_BufferProperties supported\n");
669 trace(
" DSPROPSETID_I3DL2_BufferProperties not "
672 &DSPROPSETID_ZOOMFX_BufferProperties,0,&ulTypeSupport);
675 trace(
" DSPROPSETID_ZOOMFX_BufferProperties "
678 trace(
" DSPROPSETID_ZOOMFX_BufferProperties not "
682 ok(
ref==0,
"IKsPropertySet_Release() secondary has %d "
683 "references, should have 0\n",
ref);
685 trace(
" Doesn't support property sets\n");
688 ok(
ref==0,
"IDirectSoundBuffer_Release() secondary has %d "
689 "references, should have 0\n",
ref);
693 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, "
694 "should have 0\n",
ref);
700 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
710 ok(rc==
DS_OK,
"DirectSoundEnumerateA() failed: %08x\n",rc);
725 "DirectSoundEnumerateA");
727 "DllGetClassObject");
729 "DirectSoundCreate");
731 "DirectSoundCreate8");
733 "DirectSoundCaptureCreate");
735 "DirectSoundCaptureCreate8");
737 "DirectSoundFullDuplexCreate");
745 skip(
"dsound.dll not found - skipping all tests\n");
static unsigned char bytes[4]
const GUID IID_IClassFactory
const GUID IID_IKsPropertySet
#define GetProcAddress(x, y)
#define WideCharToMultiByte
static LPDIRECTSOUNDCREATE pDirectSoundCreate
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
#define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION
#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA
#define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
@ DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
@ DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
@ DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
@ DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
#define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA
#define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING
@ DIRECTSOUNDDEVICE_TYPE_EMULATED
@ DIRECTSOUNDDEVICE_TYPE_WDM
@ DIRECTSOUNDDEVICE_TYPE_VXD
@ DIRECTSOUNDDEVICE_DATAFLOW_RENDER
@ DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
#define IKsPropertySet_QuerySupport(p, a, b, c)
struct IDirectSoundCapture * LPDIRECTSOUNDCAPTURE
struct IDirectSoundBuffer * LPDIRECTSOUNDBUFFER
struct IDirectSoundCaptureBuffer8 * LPDIRECTSOUNDCAPTUREBUFFER8
#define DSERR_CONTROLUNAVAIL
struct IDirectSoundFullDuplex * LPDIRECTSOUNDFULLDUPLEX
#define IKsPropertySet_Release(p)
#define DSBCAPS_GETCURRENTPOSITION2
#define KSPROPERTY_SUPPORT_SET
#define KSPROPERTY_SUPPORT_GET
struct IDirectSound * LPDIRECTSOUND
#define DSERR_INVALIDPARAM
struct IDirectSound8 * LPDIRECTSOUND8
#define IKsPropertySet_Get(p, a, b, c, d, e, f, g)
BOOL(CALLBACK * LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID)
struct IDirectSoundBuffer8 * LPDIRECTSOUNDBUFFER8
#define IDirectSound_Release(p)
#define IDirectSound_SetCooperativeLevel(p, a, b)
#define IDirectSound_CreateSoundBuffer(p, a, b, c)
#define IDirectSoundBuffer_QueryInterface(p, a, b)
struct IDirectSoundCapture * LPDIRECTSOUNDCAPTURE8
#define IDirectSoundBuffer_Release(p)
#define DSBCAPS_LOCHARDWARE
#define DSBCAPS_PRIMARYBUFFER
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static IPrintDialogCallback callback
#define DSBCAPS_CTRLDEFAULT
static LPVOID *static LPDIRECTSOUND LPUNKNOWN
static void propset_buffer_tests(void)
static BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, LPVOID context)
static BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data, LPVOID context)
static void propset_private_tests(void)
static unsigned driver_count
static BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data, LPVOID context)
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
LPWAVEFORMATEX lpwfxFormat
#define CLASS_E_CLASSNOTAVAILABLE