28 #define PI 3.14159265358979323846 45 for (
i=0;
i<nb_samples;
i++) {
48 unsigned char sample=127.5*(
y+1.0);
53 signed short sample=32767.5*
y-0.5;
63 signed int sample=8388607.5*
y-0.5;
65 b[1]=(sample >> 8)&0xff;
70 b[1]=(sample >> 8)&0xff;
76 float *
ptr = (
float *)
b;
87 signed int sample=2147483647.5*
y-0.5;
89 b[1]=(sample >> 8)&0xff;
90 b[2]=(sample >> 16)&0xff;
95 b[1]=(sample >> 8)&0xff;
96 b[2]=(sample >> 16)&0xff;
111 #define FE(x) { x, #x }, 195 &ptr1,
NULL,&ptr2,&len2,0);
198 &ptr1,&len1,&ptr2,&len2,0);
199 ok(rc==
DS_OK,
"IDirectSoundBuffer_Lock() failed: %08x\n", rc);
204 state->written+=len1;
207 state->written+=len2;
214 ok(rc==
DS_OK,
"IDirectSoundBuffer_Unlock() failed: %08x\n", rc);
228 &ptr1,&len1,&ptr2,&len2,0);
229 ok(rc==
DS_OK,
"IDirectSoundBuffer_Lock() failed: %08x\n", rc);
233 s=(
state->wfx->wBitsPerSample==8?0x80:0);
240 ok(rc==
DS_OK,
"IDirectSoundBuffer_Unlock() failed: %08x\n", rc);
248 DWORD last_play_pos,play_pos,buf_free;
252 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetCurrentPosition() failed: %08x\n", rc);
258 last_play_pos=
state->played %
state->buffer_size;
259 if (play_pos<last_play_pos)
260 state->played+=
state->buffer_size-last_play_pos+play_pos;
262 state->played+=play_pos-last_play_pos;
265 trace(
"buf size=%d last_play_pos=%d play_pos=%d played=%d / %d\n",
266 state->buffer_size,last_play_pos,play_pos,
state->played,
276 if (
state->offset<=play_pos)
277 buf_free=play_pos-
state->offset;
279 buf_free=
state->buffer_size-
state->offset+play_pos;
282 trace(
"offset=%d free=%d written=%d / %d\n",
294 trace(
"last sound byte at %d\n",
301 trace(
"writing %d bytes of silence\n",buf_free);
309 trace(
"stopping playback\n");
311 ok(rc==
DS_OK,
"IDirectSoundBuffer_Stop() failed: %08x\n", rc);
319 BOOL move_listener,
BOOL move_sound,
332 "IDirectSoundBuffer_SetFrequency() failed to set frequency %08x\n",rc);
340 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
347 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
349 dsbcaps.
dwSize=
sizeof(dsbcaps);
351 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc);
360 ok(rc==
DS_OK &&
size!=0,
"IDirectSoundBuffer_GetFormat() should have " 361 "returned the needed size: rc=%08x size=%d\n",rc,
size);
364 "Expected a correct structure size, got %d\n",
size);
379 "IDirectSoundBuffer_GetFormat() failed: %08x\n", rc);
381 trace(
" Format: %s tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
382 is_primary ?
"Primary" :
"Secondary",
390 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
396 "IDirectSoundBuffer_GetFrequency() failed: %08x\n",rc);
399 ok(freq==
f,
"The frequency returned by GetFrequency " 400 "%d does not match the format %d\n",freq,
f);
406 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
409 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc);
417 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc);
424 "returned DSERR_INVALIDPARAM, returned: %08x\n",rc);
428 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n",
436 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc);
442 trace(
"Requested format tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
445 trace(
"Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n",
450 ZeroMemory(&new_dsbcaps,
sizeof(new_dsbcaps));
451 new_dsbcaps.
dwSize =
sizeof(new_dsbcaps);
453 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc);
455 trace(
" new Caps: flags=0x%08x size=%d\n",new_dsbcaps.
dwFlags,
461 " buffer size changed after SetFormat() - " 462 "previous size was %u, current size is %u\n",
468 " flags changed after SetFormat() - " 469 "previous flags were %08x, current flags are %08x\n",
475 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc);
489 trace(
" Playing %g second 440Hz tone at %dx%dx%d with a " 490 "frequency of %d (%dHz)\n", duration,
494 trace(
" Playing %g second 440Hz tone at %dx%dx%d\n", duration,
504 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_WRITEPRIMARY) " 505 "failed: %08x\n",rc);
514 ok(rc==
DS_OK,
"IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc);
522 "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc);
523 ok(temp_buffer==*dsbo,
"COM interface broken: %p != %p\n",
526 ok(
ref==1,
"IDirectSoundBuffer_Release() has %d references, " 527 "should have 1\n",
ref);
531 &IID_IDirectSoundBuffer,
534 "IDirectSound3DBuffer_QueryInterface() failed: %08x\n", rc);
535 ok(temp_buffer==*dsbo,
"COM interface broken: %p != %p\n",
538 ok(
ref==1,
"IDirectSoundBuffer_Release() has %d references, " 539 "should have 1\n",
ref);
542 ok(
ref==0,
"IDirectSoundBuffer_Release() has %d references, " 543 "should have 0\n",
ref);
546 &IID_IDirectSoundBuffer,
548 ok(rc==
DS_OK && *dsbo!=
NULL,
"IDirectSound3DBuffer_QueryInterface() " 549 "failed: %08x\n",rc);
554 "failed: %08x\n",rc);
556 ZeroMemory(&buffer_param,
sizeof(buffer_param));
561 "failed: %08x\n",rc);
563 buffer_param.
dwSize=
sizeof(buffer_param);
565 ok(rc==
DS_OK,
"IDirectSound3DBuffer_GetAllParameters() failed: %08x\n", rc);
571 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc);
574 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetVolume() failed: %08x\n", rc);
579 "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc);
587 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetPan() failed: %08x\n", rc);
590 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetPan() failed: %08x\n", rc);
595 "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc);
604 "returned DSERR_INVALIDPARAM, returned %08x\n", rc);
611 "returned DSERR_INVALIDPARAM, returned %08x\n", rc);
625 ok(rc==
DS_OK,
"IDirectSoundBuffer_Play() failed: %08x\n", rc);
628 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc);
630 "GetStatus: bad status: %x\n",
status);
633 ZeroMemory(&listener_param,
sizeof(listener_param));
634 listener_param.
dwSize=
sizeof(listener_param);
637 ok(rc==
DS_OK,
"IDirectSound3dListener_GetAllParameters() " 638 "failed: %08x\n",rc);
646 ok(rc==
DS_OK,
"IDirectSound3dListener_SetPosition() failed: %08x\n", rc);
656 ok(rc==
DS_OK,
"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc);
663 if (listener && move_listener) {
670 ok(rc==
DS_OK,
"IDirectSound3dListener_SetPosition() failed: %08x\n",rc);
672 if (buffer3d && move_sound) {
679 ok(rc==
DS_OK,
"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc);
684 ok(
fabs(1000*duration-
now+start_time)<=100*duration,
685 "The sound played for %d ms instead of %g ms\n",
686 now-start_time,1000*duration);
693 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) " 694 "failed: %08x\n",rc);
698 ok(
ref==0,
"IDirectSound3DBuffer_Release() has %d references, " 699 "should have 0\n",
ref);
705 int has_3d,
int has_3dbuffer,
707 int move_listener,
int move_sound)
726 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc);
731 bufdesc.
dwSize=
sizeof(bufdesc);
739 "IDirectSound_CreateSoundBuffer() failed to create a %sprimary buffer: %08x\n",has_3d?
"3D ":
"", rc);
741 trace(
" No Primary\n");
744 ok(rc==
DS_OK,
"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc);
750 &IID_IDirectSound3DListener,
753 "IDirectSoundBuffer_QueryInterface() failed to get a 3D listener: %08x\n",rc);
755 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 756 "should have 0\n",
ref);
759 ZeroMemory(&listener_param,
sizeof(listener_param));
763 "IDirectSound3dListener_GetAllParameters() should have " 764 "returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
770 "IDirectSound3dListener_GetAllParameters() should have " 771 "returned DSERR_INVALIDPARAM, returned: %08x\n", rc);
773 listener_param.
dwSize=
sizeof(listener_param);
776 ok(rc==
DS_OK,
"IDirectSound3dListener_GetAllParameters() " 777 "failed: %08x\n",rc);
779 ok(listener==
NULL,
"IDirectSoundBuffer_QueryInterface() " 780 "failed but returned a listener anyway\n");
781 ok(rc!=
DS_OK,
"IDirectSoundBuffer_QueryInterface() succeeded " 782 "but returned a NULL listener\n");
785 ok(
ref==0,
"IDirectSound3dListener_Release() listener has " 786 "%d references, should have 0\n",
ref);
795 bufdesc.
dwSize=
sizeof(bufdesc);
806 trace(
" Testing a %s%ssecondary buffer %s%s%s%sat %dx%dx%d " 807 "with a primary buffer at %dx%dx%d\n",
808 has_3dbuffer?
"3D ":
"",
810 listener!=
NULL||move_sound?
"with ":
"",
811 move_listener?
"moving ":
"",
812 listener!=
NULL?
"listener ":
"",
813 listener&&move_sound?
"and moving sound ":move_sound?
820 "IDirectSound_CreateSoundBuffer() failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n",
822 listener!=
NULL||move_sound?
"with ":
"", move_listener?
"moving ":
"",
823 listener!=
NULL?
"listener ":
"",
824 listener&&move_sound?
"and moving sound ":move_sound?
829 IDirectSound3DBuffer *ds3d;
833 "Wrong return trying to get 3D buffer on %s3D secondary interface: %08x\n", has_3dbuffer ?
"" :
"non-", rc);
838 LONG refvol,vol,refpan,pan;
842 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetVolume(secondary) failed: %08x\n",rc);
843 ok(vol==0,
"wrong volume for a new secondary buffer: %d\n",vol);
845 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc);
846 ok(pan==0,
"wrong pan for a new secondary buffer: %d\n",pan);
852 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc);
854 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc);
857 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc);
859 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc);
860 ok(vol==-1000,
"secondary: wrong volume %d instead of -1000\n",
863 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc);
865 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc);
866 ok(pan==-1000,
"secondary: wrong pan %d instead of -1000\n",
870 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc);
871 ok(vol==refvol,
"The primary volume changed from %d to %d\n",
874 ok(rc==
DS_OK,
"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc);
875 ok(pan==refpan,
"The primary pan changed from %d to %d\n",
879 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc);
881 ok(rc==
DS_OK,
"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc);
889 "IDirectSound_DuplicateSoundBuffer() should have returned " 890 "DSERR_INVALIDPARAM, returned: %08x\n",rc);
895 "IDirectSound_DuplicateSoundBuffer() should have returned " 896 "DSERR_INVALIDPARAM, returned: %08x\n",rc);
901 "IDirectSound_DuplicateSoundBuffer() should have returned " 902 "DSERR_INVALIDPARAM, returned: %08x\n",rc);
908 "IDirectSound_DuplicateSoundBuffer() failed to duplicate " 909 "a secondary buffer: %08x\n",rc);
913 ok(
ref==0,
"IDirectSoundBuffer_Release() secondary has %d " 914 "references, should have 0\n",
ref);
915 secondary=duplicated;
921 duration=(move_listener || move_sound?4.0:1.0);
924 listener,move_listener,move_sound,
FALSE,0);
926 ok(
ref==0,
"IDirectSoundBuffer_Release() %s has %d references, " 934 ok(
ref==0,
"IDirectSound3dListener_Release() listener has %d " 935 "references, should have 0\n",
ref);
938 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 939 "should have 0\n",
ref);
942 ok(primary==
NULL,
"IDirectSound_CreateSoundBuffer(primary) failed " 943 "but primary created anyway\n");
944 ok(rc!=
DS_OK,
"IDirectSound_CreateSoundBuffer(primary) succeeded " 945 "but primary not created\n");
948 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 949 "should have 0\n",
ref);
956 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc);
960 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
976 "DirectSoundCreate() failed: %08x\n",rc);
981 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1005 dscaps.
dwSize=
sizeof(dscaps);
1007 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
1014 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc);
1021 bufdesc.
dwSize=
sizeof(bufdesc);
1025 "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc);
1027 trace(
" No Primary\n");
1036 for (
i = 0;
i < 6;
i++) {
1045 for (
i = 0;
i < 7;
i++) {
1053 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 1054 "should have 0\n",
ref);
1060 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc);
1064 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1088 dscaps.
dwSize=
sizeof(dscaps);
1090 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
1097 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc);
1103 bufdesc.
dwSize=
sizeof(bufdesc);
1106 ok(rc==
DS_OK && primary!=
NULL,
"IDirectSound_CreateSoundBuffer() failed " 1107 "to create a primary buffer: %08x\n",rc);
1110 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 1111 "should have 0\n",
ref);
1114 bufdesc.
dwSize=
sizeof(bufdesc);
1117 ok(rc==
DS_OK && primary!=
NULL,
"IDirectSound_CreateSoundBuffer() " 1118 "failed to create a 3D primary buffer: %08x\n",rc);
1124 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 1125 "should have 0\n",
ref);
1131 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc);
1135 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1159 dscaps.
dwSize=
sizeof(dscaps);
1161 ok(rc==
DS_OK,
"IDirectSound_GetCaps() failed: %08x\n",rc);
1168 ok(rc==
DS_OK,
"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc);
1173 bufdesc.
dwSize=
sizeof(bufdesc);
1176 ok(rc==
DS_OK && primary!=
NULL,
"IDirectSound_CreateSoundBuffer() failed " 1177 "to create a 3D primary buffer: %08x\n",rc);
1182 &IID_IDirectSound3DListener,(
void **)&listener);
1183 ok(rc==
DS_OK && listener!=
NULL,
"IDirectSoundBuffer_QueryInterface() " 1184 "failed to get a 3D listener: %08x\n",rc);
1188 &IID_IDirectSoundBuffer,(
LPVOID *)&temp_buffer);
1190 "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc);
1191 ok(temp_buffer==primary,
1192 "COM interface broken: %p != %p\n",
1193 temp_buffer,primary);
1196 ok(
ref==1,
"IDirectSoundBuffer_Release() has %d references, " 1197 "should have 1\n",
ref);
1201 &IID_IDirectSoundBuffer,(
LPVOID *)&temp_buffer);
1203 "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc);
1204 ok(temp_buffer==primary,
1205 "COM interface broken: %p != %p\n",
1206 temp_buffer,primary);
1208 ok(
ref==1,
"IDirectSoundBuffer_Release() has %d references, " 1209 "should have 1\n",
ref);
1215 listener,0,0,
FALSE,0);
1219 (
void **)&temp_buffer);
1221 "IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc);
1228 ok(
ref==0,
"IDirectSound3DListener_Release() listener has %d " 1229 "references, should have 0\n",
ref);
1235 "IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc);
1241 ok(
ref==0,
"IDirectSoundBuffer_Release() primary has %d references, " 1242 "should have 0\n",
ref);
1247 ok(
ref==0,
"IDirectSound_Release() has %d references, should have 0\n",
ref);
1260 trace(
"*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule);
1265 trace(
" No Driver\n");
1268 trace(
" Already In Use\n");
1270 }
else if (rc ==
E_FAIL) {
1271 trace(
" No Device\n");
1275 trace(
" Testing the primary buffer\n");
1278 trace(
" Testing 3D primary buffer\n");
1281 trace(
" Testing 3D primary buffer with listener\n");
1307 ok(rc==
DS_OK,
"DirectSoundEnumerateA() failed: %08x\n",rc);
1322 "DirectSoundEnumerateA");
1324 "DirectSoundCreate");
1331 skip(
"dsound.dll not found - skipping all tests\n");
#define IDirectSoundBuffer_Lock(p, a, b, c, d, e, f, g)
GLubyte GLubyte GLubyte GLubyte w
#define DSBCAPS_CTRLVOLUME
#define IDirectSoundBuffer_GetFormat(p, a, b, c)
#define DSBCAPS_GETCURRENTPOSITION2
#define IKsPropertySet_Release(p)
char * strcat(char *DstString, const char *SrcString)
#define IDirectSound3DBuffer_QueryInterface(p, a, b)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define DSBCAPS_LOCSOFTWARE
#define IDirectSoundBuffer_Release(p)
static LPDIRECTSOUNDCREATE pDirectSoundCreate
DWORD WINAPI GetTickCount(VOID)
int align(int length, int align)
#define IDirectSound3DBuffer_SetPosition(p, a, b, c, d)
static HRESULT(WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA
#define IDirectSound_GetCaps(p, a)
GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
char * wave_generate_la(WAVEFORMATEX *wfx, double duration, DWORD *size, BOOL ieee)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define IDirectSoundBuffer_GetCurrentPosition(p, a, b)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
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 int buffer_service(play_state_t *state)
#define DSERR_INVALIDPARAM
#define IDirectSound_DuplicateSoundBuffer(p, a, b)
#define IDirectSoundBuffer_QueryInterface(p, a, b)
static int buffer_silence(play_state_t *state, DWORD size)
#define IDirectSoundBuffer_GetVolume(p, a)
#define IDirectSoundBuffer_GetCaps(p, a)
#define IDirectSoundBuffer_SetVolume(p, a)
HWND WINAPI GetDesktopWindow(void)
#define DSBCAPS_STICKYFOCUS
#define DSBCAPS_GLOBALFOCUS
static void ds3d_tests(void)
#define DSCAPS_EMULDRIVER
#define DSBCAPS_CTRLPOSITIONNOTIFY
GLboolean GLboolean GLboolean b
#define DSBCAPS_PRIMARYBUFFER
#define DSBSTATUS_LOOPING
void init_format(WAVEFORMATEX *wfx, int format, int rate, int depth, int channels)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DSBLOCK_FROMWRITECURSOR
#define IDirectSound3DListener_SetPosition(p, a, b, c, d)
#define IDirectSound3DBuffer_GetAllParameters(p, a)
HANDLE WINAPI GetCurrentProcess(VOID)
#define DSERR_CONTROLUNAVAIL
static HRESULT test_secondary(LPGUID lpGuid, int play, int has_3d, int has_3dbuffer, int has_listener, int has_duplicate, int move_listener, int move_sound)
#define IDirectSoundBuffer_GetStatus(p, a)
#define IDirectSound3DListener_SetAllParameters(p, a, b)
LPWAVEFORMATEX lpwfxFormat
static unsigned driver_count
static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext)
#define IDirectSound3DListener_QueryInterface(p, a, b)
GLint GLint GLsizei GLsizei GLsizei depth
static HRESULT test_primary_3d(LPGUID lpGuid)
struct IDirectSound3DListener * LPDIRECTSOUND3DLISTENER
const char * format_string(const WAVEFORMATEX *wfx)
#define DSBSTATUS_PLAYING
static HRESULT test_primary(LPGUID lpGuid)
#define IDirectSoundBuffer_SetFrequency(p, a)
#define memcpy(s1, s2, n)
#define IDirectSound3DBuffer_Release(p)
#define IDirectSound3DListener_GetAllParameters(p, a)
#define IDirectSoundBuffer_SetPan(p, a)
#define IDirectSound_SetCooperativeLevel(p, a, b)
const GUID IID_IKsPropertySet
struct IDirectSoundBuffer * LPDIRECTSOUNDBUFFER
static LARGE_INTEGER * frequency
#define IDirectSoundBuffer_Stop(p)
#define IDirectSoundBuffer_GetFrequency(p, a)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
static LPDIRECTSOUND LPUNKNOWN
void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, BOOL is_primary, BOOL set_volume, LONG volume, BOOL set_pan, LONG pan, BOOL play, double duration, BOOL buffer3d, LPDIRECTSOUND3DLISTENER listener, BOOL move_listener, BOOL move_sound, BOOL set_frequency, DWORD frequency)
#define IDirectSound_Release(p)
static float(__cdecl *square_half_float)(float x
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
#define DSBCAPS_CTRLFREQUENCY
#define IDirectSound_CreateSoundBuffer(p, a, b, c)
#define DSSCL_WRITEPRIMARY
struct IDirectSound3DBuffer * LPDIRECTSOUND3DBUFFER
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
HWND WINAPI GetForegroundWindow(void)
GLint GLint GLint GLint GLint GLint y
BOOL(CALLBACK * LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID)
struct IDirectSound * LPDIRECTSOUND
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
#define IDirectSoundBuffer_SetFormat(p, a)
#define GetProcAddress(x, y)
#define IDirectSound3DBuffer_SetAllParameters(p, a, b)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
static int buffer_refill(play_state_t *state, DWORD size)
#define IDirectSoundBuffer_GetPan(p, a)
static HRESULT test_for_driver(LPGUID lpGuid)
#define IDirectSoundBuffer_Play(p, a, b, c)
#define DSBCAPS_MUTE3DATMAXDISTANCE
#define IDirectSoundBuffer_Unlock(p, a, b, c, d)
const char * getDSBCAPS(DWORD xmask)
static SERVICE_STATUS status
static HRESULT test_primary_3d_with_listener(LPGUID lpGuid)
#define DSBLOCK_ENTIREBUFFER
#define HeapFree(x, y, z)
#define DSBCAPS_LOCHARDWARE
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define WAVE_FORMAT_IEEE_FLOAT
#define IDirectSound3DListener_Release(p)
GLuint const GLchar * name