31 DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
48 DWORD speaker_config, new_speaker_config, ref_speaker_config;
52 ok(rc==
DS_OK,
"IDirectSound_QueryInterface(IID_IUnknown) failed: %08x\n", rc);
57 ok(rc==
DS_OK,
"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08x\n", rc);
63 "should have failed: %08x\n",rc);
71 "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc);
75 "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc);
79 "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc);
83 "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc);
87 "IDirectSound_Initialize() failed: %08x\n",rc);
89 trace(
" No Driver\n");
92 trace(
" No Device\n");
95 trace(
" Already In Use\n");
102 "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc);
107 "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
114 "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
116 dscaps.
dwSize=
sizeof(dscaps);
120 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
126 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
129 ok(rc==
DS_OK,
"IDirectSound_Compact() failed: %08x\n",rc);
133 "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
136 ok(rc==
DS_OK,
"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
137 ref_speaker_config = speaker_config;
141 if (speaker_config == ref_speaker_config)
146 ok(rc==
DS_OK,
"IDirectSound_SetSpeakerConfig() failed: %08x\n", rc);
150 ok(rc==
DS_OK,
"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc);
151 if (rc==
DS_OK && speaker_config!=new_speaker_config)
152 trace(
"IDirectSound_GetSpeakerConfig() failed to set speaker " 153 "config: expected 0x%08x, got 0x%08x\n",
154 speaker_config,new_speaker_config);
160 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
166 IDirectSound *dso=(IDirectSound*)0xdeadbeef;
169 trace(
"Testing IDirectSound\n");
173 ok(rc==
S_OK,
"CoGetClassObject(CLSID_DirectSound, IID_IClassFactory) " 174 "failed: %08x\n", rc);
178 ok(rc==
S_OK,
"CoGetClassObject(CLSID_DirectSound, IID_IUnknown) " 179 "failed: %08x\n", rc);
183 &IID_IDirectSound, (
void**)&dso);
185 "DirectMusicPerformance create failed: %08x, expected CLASS_E_NOAGGREGATION\n", rc);
189 &IID_IDirectSound, (
void**)&dso);
190 ok(rc==
S_OK,
"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc);
197 &IID_IDirectSound, (
void**)&dso);
198 ok(rc==
S_OK,
"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc);
205 &IID_IDirectSound, (
void**)&dso);
206 ok(rc==
S_OK,
"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc);
213 &CLSID_DirectSoundPrivate, (
void**)&dso);
215 "CoCreateInstance(CLSID_DirectSound,CLSID_DirectSoundPrivate) " 216 "should have failed: %08x\n",rc);
221 &IID_IDirectSound, (
void**)&dso);
223 "CoCreateInstance(CLSID_DirectSoundPrivate,IID_IDirectSound) " 224 "should have failed: %08x\n",rc);
229 "DirectSoundCreate(NULL) failed: %08x\n",rc);
236 "DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %08x\n", rc);
237 if (rc==
DS_OK && dso)
243 "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %08x\n", rc);
244 if (rc==
DS_OK && dso)
250 "should have failed: %08x\n",rc);
251 if (rc==
DS_OK && dso)
264 "DSERR_INVALIDPARAM, returned: %08x\n",rc);
269 "DirectSoundCreate() failed: %08x\n",rc);
278 &IID_IDirectSound, (
void**)&dso);
279 ok(rc==
S_OK,
"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc);
285 ok(rc==
DS_OK,
"DirectSoundCreate() failed: %08x\n",rc);
291 ok(rc==
DS_OK,
"DirectSoundCreate() failed: %08x\n",rc);
295 ok(
ref==0,
"IDirectSound_Release() has %d references, should have " 297 ok(dso!=dso1,
"DirectSound objects should be unique: dso=%p,dso1=%p\n",dso,dso1);
302 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
311 ok(rc==
DS_OK,
"DirectSoundCreate() failed: %08x\n",rc);
319 bufdesc.
dwSize=
sizeof(bufdesc);
326 "IDirectSound_CreateSoundBuffer() failed to create a secondary " 332 ok(rc==
DS_OK && buffer3d!=
NULL,
"IDirectSound_QueryInterface() " 333 "failed: %08x\n",rc);
336 ok(
ref==2,
"IDirectSound3DBuffer_AddRef() has %d references, " 337 "should have 2\n",
ref);
340 ok(
ref==2,
"IDirectSoundBuffer_AddRef() has %d references, " 341 "should have 2\n",
ref);
345 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
368 "DirectSoundCreate() failed: %08x\n",rc);
374 dscaps.
dwSize=
sizeof(dscaps);
376 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
383 "IDirectSound_CreateSoundBuffer() should have failed: %08x\n", rc);
389 "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," 390 "dsbo=%p\n",rc,primary);
396 bufdesc.
dwSize=
sizeof(bufdesc)-1;
399 "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," 400 "primary=%p\n",rc,primary);
406 bufdesc.
dwSize=
sizeof(bufdesc);
411 "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," 412 "primary=%p\n",rc,primary);
418 bufdesc.
dwSize=
sizeof(bufdesc);
423 "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," 424 "primary=%p\n",rc,primary);
429 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
436 bufdesc.
dwSize=
sizeof(bufdesc);
442 "returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
448 bufdesc.
dwSize=
sizeof(bufdesc);
452 "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc);
454 trace(
" No Primary\n");
462 ok(rc==
DS_OK && second==primary,
463 "IDirectSound_CreateSoundBuffer() should have returned original " 464 "primary buffer: %08x\n",rc);
466 ok(
ref==1,
"IDirectSoundBuffer_Release() primary has %d references, " 467 "should have 1\n",
ref);
473 ok(rc!=
DS_OK,
"IDirectSound_DuplicateSoundBuffer() primary buffer " 474 "should have failed %08x\n",rc);
477 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc);
480 trace(
"Playing a 5 seconds reference tone at the current " 483 trace(
"(the current volume is %d according to DirectSound)\n",
485 trace(
"All subsequent tones should be identical to this one.\n");
486 trace(
"Listen for stutter, changes in pitch, volume, etc.\n");
492 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references\n",
ref);
495 ok(
ref==1,
"IDirectSoundBuffer_AddRef() primary has %d references\n",
ref);
498 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references\n",
ref);
501 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 502 "should have 0\n",
ref);
508 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
512 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
536 "DirectSoundCreate() failed: %08x\n",rc);
542 dscaps.
dwSize=
sizeof(dscaps);
544 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
551 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
556 bufdesc.
dwSize=
sizeof(bufdesc);
560 "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc);
574 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
584 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n",
595 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc);
601 trace(
"Requested primary format tag=0x%04x %dx%dx%d " 602 "avg.B/s=%d align=%d\n",
605 trace(
"Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
613 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
619 bufdesc.
dwSize=
sizeof(bufdesc);
625 trace(
" Testing a primary buffer at %dx%dx%d (fmt=%d) with a " 626 "secondary buffer at %dx%dx%d\n",
632 "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc);
639 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 640 "should have 0\n",
ref);
646 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 647 "should have 0\n",
ref);
653 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
657 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
678 "DirectSoundCreate() failed: %08x\n",rc);
684 dscaps.
dwSize=
sizeof(dscaps);
686 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
693 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
698 bufdesc.
dwSize=
sizeof(bufdesc);
702 "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc);
706 ok(rc==
DS_OK,
"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc);
722 bufdesc.
dwSize=
sizeof(bufdesc);
728 "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
734 bufdesc.
dwSize=
sizeof(bufdesc);
745 "IDirectSound_CreateSoundBuffer() " 746 "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " 747 "and NULL, returned: %08x %p\n", rc, secondary);
750 "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc);
753 ok(rc==
E_INVALIDARG,
"Creating %d bpp buffer on dx < 8 returned: %p %08x\n",
758 win_skip(
"Not doing the WAVE_FORMAT_EXTENSIBLE tests\n");
779 "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
793 "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
805 "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
817 "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
829 "IDirectSound_CreateSoundBuffer() returned: %08x %p\n",
840 "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc);
845 trace(
" Testing a secondary buffer at %dx%dx%d (fmt=%d) " 846 "with a primary buffer at %dx%dx%d\n",
854 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 855 "should have 0\n",
ref);
861 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 862 "should have 0\n",
ref);
868 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
872 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
893 "DirectSoundCreate() failed: %08x\n",rc);
899 bufdesc.
dwSize=
sizeof(bufdesc);
905 "IDirectSound_CreateSoundBuffer() should have returned DS_OK, returned: %08x\n", rc);
909 dsbcaps.
dwSize =
sizeof(dsbcaps);
911 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetCaps() should have returned DS_OK, " 912 "returned: %08x\n", rc);
916 "Buffer size not a multiple of nBlockAlign: requested %d, " 921 ok(rc ==
DS_OK,
"Could not set position to 0: %08x\n", rc);
923 ok(rc ==
DS_OK,
"Could not get position: %08x\n", rc);
925 ok(rc ==
DS_OK,
"Could not set position to 1: %08x\n", rc);
927 ok(rc ==
DS_OK,
"Could not get new position: %08x\n", rc);
928 ok(
pos == pos2,
"Positions not the same! Old position: %d, new position: %d\n",
pos, pos2);
931 ok(
ref==0,
"IDirectSoundBuffer_Release() secondary has %d references, " 932 "should have 0\n",
ref);
936 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
946 }
fmts[] = { { 8, 1 }, { 8, 2 }, { 16, 1 }, {16, 2 } };
958 int rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100,
964 "DirectSoundCreate() failed: %08x\n",rc);
970 dscaps.
dwSize=
sizeof(dscaps);
972 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
979 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
984 bufdesc.
dwSize=
sizeof(bufdesc);
988 "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc);
992 ok(rc==
DS_OK,
"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc);
997 for (
r=0;
r<
sizeof(rates)/
sizeof(rates[0]);
r++) {
1002 bufdesc.
dwSize=
sizeof(bufdesc);
1008 trace(
" Testing a secondary buffer at %dx%dx%d " 1009 "with a primary buffer at %dx%dx%d\n",
1015 "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc);
1022 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 1023 "should have 0\n",
ref);
1029 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 1030 "should have 0\n",
ref);
1036 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
1040 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1056 "IDirectSoundBuffer_SetCurrentPosition failed %08x\n",rc);
1061 ok(rc==
DS_OK,
"IDirectSoundBuffer_Play failed %08x\n",rc);
1066 ok(rc==
DS_OK,
"IDirectSoundBuffer_Stop failed %08x\n",rc);
1086 "DirectSoundCreate() failed: %08x\n",rc);
1093 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
1098 bufdesc.
dwSize=
sizeof(bufdesc);
1101 ok(rc==
DS_OK && primary!=
NULL,
"IDirectSound_CreateSoundBuffer() failed " 1102 "to create a primary buffer %08x\n",rc);
1110 bufdesc.
dwSize=
sizeof(bufdesc);
1116 "IDirectSound_CreateSoundBuffer() failed to create a original " 1117 "buffer %08x\n",rc);
1135 "IDirectSoundBuffer_Lock failed to lock the buffer %08x\n",rc);
1140 ok(rc==
DS_OK,
"IDirectSoundBuffer_Unlock failed to unlock " 1145 &IID_IDirectSoundNotify,
1148 "IDirectSoundBuffer_QueryInterface() failed to create a " 1149 "notification %08x\n",rc);
1158 ok(rc==
DS_OK,
"IDirectSoundNotify_SetNotificationPositions " 1159 "failed %08x\n",rc);
1163 "IDirectSound_DuplicateSoundBuffer failed %08x\n",rc);
1165 trace(
"testing duplicated buffer without notifications.\n");
1170 &IID_IDirectSoundNotify,
1171 (
void**)&dup_notify);
1173 "IDirectSoundBuffer_QueryInterface() failed to create a " 1174 "notification %08x\n",rc);
1180 ok(rc==
DS_OK,
"IDirectSoundNotify_SetNotificationPositions " 1181 "failed %08x\n",rc);
1183 trace(
"testing duplicated buffer with a notification.\n");
1188 ok(
ref==0,
"IDirectSoundNotify_Release() has %d references, " 1189 "should have 0\n",
ref);
1192 ok(
ref==0,
"IDirectSoundNotify_Release() has %d references, " 1193 "should have 0\n",
ref);
1195 trace(
"testing original buffer with a notification.\n");
1200 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 1201 "should have 0\n",
ref);
1204 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 1205 "should have 0\n",
ref);
1208 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 1209 "should have 0\n",
ref);
1215 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
1219 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1236 "DirectSoundCreate() failed: %08x\n",rc);
1243 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc);
1250 bufdesc.
dwSize=
sizeof(bufdesc);
1253 ok(rc==
DS_OK && primary!=
NULL,
"IDirectSound_CreateSoundBuffer() failed " 1254 "to create a primary buffer %08x\n",rc);
1339 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1342 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1356 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1359 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1373 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1376 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1391 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1394 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1403 win_skip(
"Not doing the WAVE_FORMAT_EXTENSIBLE tests\n");
1418 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1421 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1428 ok(fmtex.Samples.wValidBitsPerSample == 0 ||
1429 fmtex.Samples.wValidBitsPerSample == 16,
1430 "validbits: %u\n", fmtex.Samples.wValidBitsPerSample);
1440 fmtex.Samples.wValidBitsPerSample = 20;
1444 ok(rc ==
S_OK,
"SetFormat: %08x\n", rc);
1447 ok(rc ==
S_OK,
"GetFormat: %08x\n", rc);
1454 ok(fmtex.Samples.wValidBitsPerSample == 20,
"validbits: %u\n", fmtex.Samples.wValidBitsPerSample);
1464 fmtex.Samples.wValidBitsPerSample = 32;
1485 trace(
"*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
1490 ok (!lpcstrModule[0],
"lpcstrModule(%s) != NULL\n", lpcstrModule);
1496 trace(
" No Driver\n");
1498 trace(
" Already In Use\n");
1500 trace(
" No Device\n");
1518 ok(rc==
DS_OK,
"DirectSoundEnumerateA() failed: %08x\n",rc);
1524 IDirectSoundBuffer *primary, *primary2, **secondaries, *secondary;
1525 IDirectSoundBuffer8 *buf8;
1535 "DirectSoundCreate failed: %08x\n",
hr);
1539 caps.
dwSize =
sizeof(caps);
1542 ok(
hr ==
S_OK,
"GetCaps failed: %08x\n",
hr);
1548 bufdesc.
dwSize =
sizeof(bufdesc);
1557 ok(
hr ==
S_OK,
"CreateSoundBuffer failed: %08x\n",
hr);
1567 ok(
hr ==
S_OK,
"CreateSoundBuffer failed: %08x\n",
hr);
1568 ok(primary == primary2,
"Got different primary buffers: %p, %p\n", primary, primary2);
1572 buf8 = (IDirectSoundBuffer8 *)0xDEADBEEF;
1576 ok(buf8 ==
NULL,
"Pointer didn't get set to NULL\n");
1580 fmt.nSamplesPerSec = 48000;
1581 fmt.wBitsPerSample = 16;
1582 fmt.nBlockAlign =
fmt.nChannels *
fmt.wBitsPerSample / 8;
1583 fmt.nAvgBytesPerSec =
fmt.nBlockAlign *
fmt.nSamplesPerSec;
1601 "CreateSoundBuffer(%u) failed: %08x\n",
i,
hr);
1605 bufcaps.
dwSize =
sizeof(bufcaps);
1607 ok(
hr ==
S_OK,
"GetCaps failed: %08x\n",
hr);
1609 "Buffer wasn't allocated in hardware, dwFlags: %x\n", bufcaps.
dwFlags);
1620 "CreateSoundBuffer(%u) gave wrong error: %08x\n",
i,
hr);
1653 "DirectSoundEnumerateA");
1655 "DirectSoundCreate");
1666 win_skip(
"dsound.dll not found - skipping all tests\n");
#define IDirectSoundBuffer_Lock(p, a, b, c, d, e, f, g)
#define IDirectSoundBuffer_AddRef(p)
#define DSSPEAKER_COMBINED(c, g)
#define DSBCAPS_CTRLVOLUME
#define IDirectSoundBuffer_GetFormat(p, a, b, c)
#define DSBCAPS_GETCURRENTPOSITION2
#define DSERR_INVALIDCALL
static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, LPCGUID lpGuid)
#define IDirectSound_Initialize(p, a)
#define DSBCAPS_LOCSOFTWARE
GLdouble GLdouble GLdouble r
#define IDirectSoundBuffer_Release(p)
#define DSERR_UNINITIALIZED
GLuint GLuint GLsizei count
static LPDIRECTSOUNDCREATE pDirectSoundCreate
static const struct pixel_format_desc formats[]
#define DSERR_ALREADYINITIALIZED
static HRESULT test_secondary(LPGUID lpGuid)
#define IDirectSound_GetSpeakerConfig(p, a)
DWORD WINAPI GetLastError(VOID)
static void dsound_tests(void)
int align(int length, int align)
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define IDirectSound_GetCaps(p, a)
GLenum GLuint GLsizei bufsize
#define IDirectSound8_Release(p)
GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
#define IDirectSoundBuffer_SetCurrentPosition(p, a)
#define DSSPEAKER_GEOMETRY_NARROW
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
DWORD dwMaxHwMixingAllBuffers
#define DSERR_PRIOLEVELNEEDED
#define IDirectSoundBuffer_GetCurrentPosition(p, a, b)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define DSERR_INVALIDPARAM
#define IDirectSound_DuplicateSoundBuffer(p, a, b)
static HRESULT test_duplicate(LPGUID lpGuid)
#define IDirectSoundBuffer_QueryInterface(p, a, b)
#define IDirectSoundBuffer_GetVolume(p, a)
#define IDirectSoundBuffer_GetCaps(p, a)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
#define DSCAPS_EMULDRIVER
#define DSBCAPS_CTRLPOSITIONNOTIFY
static void IDirectSound_tests(void)
#define DSBCAPS_PRIMARYBUFFER
void init_format(WAVEFORMATEX *wfx, int format, int rate, int depth, int channels)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define IDirectSound3DBuffer_AddRef(p)
#define IDirectSound_SetSpeakerConfig(p, a)
#define IDirectSound_QueryInterface(p, a, b)
#define DSERR_CONTROLUNAVAIL
#define IDirectSound_Compact(p)
LPWAVEFORMATEX lpwfxFormat
static HRESULT test_block_align(LPGUID lpGuid)
const char * format_string(const WAVEFORMATEX *wfx)
static HRESULT test_invalid_fmts(LPGUID lpGuid)
DWORD dwMaxHwMixingStaticBuffers
static const unsigned int format_tags[]
static HRESULT test_notify(LPDIRECTSOUNDBUFFER dsb, DWORD count, LPHANDLE event, DWORD expected)
static TCHAR test_buffer[TEST_BUFFER_SIZE]
#define CLASS_E_NOAGGREGATION
#define IDirectSound_SetCooperativeLevel(p, a, b)
struct IDirectSoundBuffer * LPDIRECTSOUNDBUFFER
#define IDirectSoundBuffer_Stop(p)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
struct IDirectSoundNotify * LPDIRECTSOUNDNOTIFY
#define REGDB_E_CLASSNOTREG
#define IDirectSoundNotify_SetNotificationPositions(p, a, b)
static HRESULT test_dsound(LPGUID lpGuid)
#define IDirectSound_Release(p)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static unsigned int number
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static void test_hw_buffers(void)
#define DSBCAPS_CTRLFREQUENCY
#define IDirectSound_CreateSoundBuffer(p, a, b, c)
struct IDirectSound3DBuffer * LPDIRECTSOUND3DBUFFER
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
static HRESULT test_primary(LPGUID lpGuid)
BOOL(CALLBACK * LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID)
union WAVEFORMATEXTENSIBLE::@3006 Samples
#define DSSPEAKER_GEOMETRY_WIDE
struct IDirectSound * LPDIRECTSOUND
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext)
#define IDirectSoundBuffer_SetFormat(p, a)
#define GetProcAddress(x, y)
#define IDirectSoundNotify_Release(p)
#define IDirectSoundBuffer_Play(p, a, b, c)
static LPDIRECTSOUND LPUNKNOWN
const GUID IID_IClassFactory
#define IDirectSoundBuffer_Unlock(p, a, b, c, d)
#define DSBLOCK_ENTIREBUFFER
static HRESULT(WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA
#define HeapFree(x, y, z)
DWORD dwMaxHwMixingStreamingBuffers
static HRESULT test_frequency(LPGUID lpGuid)
#define DSBCAPS_LOCHARDWARE
static HRESULT test_primary_secondary(LPGUID lpGuid)
#define WAVE_FORMAT_IEEE_FLOAT