1 #ifndef __WINE_DSOUND_H
2 #define __WINE_DSOUND_H
4 #include "winbase.h" /* for CRITICAL_SECTION */
7 #include "wine/obj_ksproperty.h"
11 #endif /* defined(__cplusplus) */
13 /*****************************************************************************
14 * Predeclare the interfaces
16 DEFINE_GUID(CLSID_DirectSound
, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
18 DEFINE_GUID(IID_IDirectSound
, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
19 typedef struct IDirectSound IDirectSound
,*LPDIRECTSOUND
;
21 DEFINE_GUID(IID_IDirectSoundBuffer
, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
22 typedef struct IDirectSoundBuffer IDirectSoundBuffer
,*LPDIRECTSOUNDBUFFER
,**LPLPDIRECTSOUNDBUFFER
;
24 DEFINE_GUID(IID_IDirectSoundNotify
, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
25 typedef struct IDirectSoundNotify IDirectSoundNotify
,*LPDIRECTSOUNDNOTIFY
;
27 DEFINE_GUID(IID_IDirectSound3DListener
, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
28 typedef struct IDirectSound3DListener IDirectSound3DListener
,*LPDIRECTSOUND3DLISTENER
;
30 DEFINE_GUID(IID_IDirectSound3DBuffer
, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
31 typedef struct IDirectSound3DBuffer IDirectSound3DBuffer
,*LPDIRECTSOUND3DBUFFER
;
33 DEFINE_GUID(IID_IDirectSoundCapture
, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
34 typedef struct IDirectSoundCapture IDirectSoundCapture
,*LPDIRECTSOUNDCAPTURE
;
36 DEFINE_GUID(IID_IDirectSoundCaptureBuffer
,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
37 typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer
,*LPDIRECTSOUNDCAPTUREBUFFER
;
41 #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
44 #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
45 #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
46 #define DSERR_INVALIDPARAM E_INVALIDARG
47 #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
48 #define DSERR_GENERIC E_FAIL
49 #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
50 #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
51 #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
52 #define DSERR_UNSUPPORTED E_NOTIMPL
53 #define DSERR_NODRIVER MAKE_DSHRESULT(120)
54 #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
55 #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
56 #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
57 #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
58 #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
60 #define DSCAPS_PRIMARYMONO 0x00000001
61 #define DSCAPS_PRIMARYSTEREO 0x00000002
62 #define DSCAPS_PRIMARY8BIT 0x00000004
63 #define DSCAPS_PRIMARY16BIT 0x00000008
64 #define DSCAPS_CONTINUOUSRATE 0x00000010
65 #define DSCAPS_EMULDRIVER 0x00000020
66 #define DSCAPS_CERTIFIED 0x00000040
67 #define DSCAPS_SECONDARYMONO 0x00000100
68 #define DSCAPS_SECONDARYSTEREO 0x00000200
69 #define DSCAPS_SECONDARY8BIT 0x00000400
70 #define DSCAPS_SECONDARY16BIT 0x00000800
72 #define DSSCL_NORMAL 1
73 #define DSSCL_PRIORITY 2
74 #define DSSCL_EXCLUSIVE 3
75 #define DSSCL_WRITEPRIMARY 4
77 typedef struct _DSCAPS
81 DWORD dwMinSecondarySampleRate
;
82 DWORD dwMaxSecondarySampleRate
;
83 DWORD dwPrimaryBuffers
;
84 DWORD dwMaxHwMixingAllBuffers
;
85 DWORD dwMaxHwMixingStaticBuffers
;
86 DWORD dwMaxHwMixingStreamingBuffers
;
87 DWORD dwFreeHwMixingAllBuffers
;
88 DWORD dwFreeHwMixingStaticBuffers
;
89 DWORD dwFreeHwMixingStreamingBuffers
;
90 DWORD dwMaxHw3DAllBuffers
;
91 DWORD dwMaxHw3DStaticBuffers
;
92 DWORD dwMaxHw3DStreamingBuffers
;
93 DWORD dwFreeHw3DAllBuffers
;
94 DWORD dwFreeHw3DStaticBuffers
;
95 DWORD dwFreeHw3DStreamingBuffers
;
96 DWORD dwTotalHwMemBytes
;
97 DWORD dwFreeHwMemBytes
;
98 DWORD dwMaxContigFreeHwMemBytes
;
99 DWORD dwUnlockTransferRateHwBuffers
;
100 DWORD dwPlayCpuOverheadSwBuffers
;
105 #define DSBPLAY_LOOPING 0x00000001
107 #define DSBSTATUS_PLAYING 0x00000001
108 #define DSBSTATUS_BUFFERLOST 0x00000002
109 #define DSBSTATUS_LOOPING 0x00000004
112 #define DSBLOCK_FROMWRITECURSOR 0x00000001
113 #define DSBLOCK_ENTIREBUFFER 0x00000002
115 #define DSBCAPS_PRIMARYBUFFER 0x00000001
116 #define DSBCAPS_STATIC 0x00000002
117 #define DSBCAPS_LOCHARDWARE 0x00000004
118 #define DSBCAPS_LOCSOFTWARE 0x00000008
119 #define DSBCAPS_CTRL3D 0x00000010
120 #define DSBCAPS_CTRLFREQUENCY 0x00000020
121 #define DSBCAPS_CTRLPAN 0x00000040
122 #define DSBCAPS_CTRLVOLUME 0x00000080
123 #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
124 #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
125 #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
126 #define DSBCAPS_STICKYFOCUS 0x00004000
127 #define DSBCAPS_GLOBALFOCUS 0x00008000
128 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
129 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
131 #define DSBSIZE_MIN 4
132 #define DSBSIZE_MAX 0xFFFFFFF
133 #define DSBPAN_LEFT -10000
134 #define DSBPAN_RIGHT 10000
135 #define DSBVOLUME_MAX 0
136 #define DSBVOLUME_MIN -10000
137 #define DSBFREQUENCY_MIN 100
138 #define DSBFREQUENCY_MAX 100000
139 #define DSBFREQUENCY_ORIGINAL 0
141 typedef struct _DSBCAPS
146 DWORD dwUnlockTransferRate
;
147 DWORD dwPlayCpuOverhead
;
148 } DSBCAPS
,*LPDSBCAPS
;
150 #define DSSCL_NORMAL 1
151 #define DSSCL_PRIORITY 2
152 #define DSSCL_EXCLUSIVE 3
153 #define DSSCL_WRITEPRIMARY 4
155 typedef struct _DSBUFFERDESC
161 LPWAVEFORMATEX lpwfxFormat
;
162 } DSBUFFERDESC
,*LPDSBUFFERDESC
;
164 typedef struct _DSBPOSITIONNOTIFY
168 } DSBPOSITIONNOTIFY
,*LPDSBPOSITIONNOTIFY
;
170 typedef const DSBPOSITIONNOTIFY
*LPCDSBPOSITIONNOTIFY
;
172 #define DSSPEAKER_HEADPHONE 1
173 #define DSSPEAKER_MONO 2
174 #define DSSPEAKER_QUAD 3
175 #define DSSPEAKER_STEREO 4
176 #define DSSPEAKER_SURROUND 5
178 #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
179 #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
180 #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
181 #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
183 typedef struct _DSCBUFFERDESC
189 LPWAVEFORMATEX lpwfxFormat
;
190 } DSCBUFFERDESC
, *LPDSCBUFFERDESC
;
191 typedef const DSCBUFFERDESC
*LPCDSCBUFFERDESC
;
193 typedef struct _DSCCAPS
199 } DSCCAPS
, *LPDSCCAPS
;
200 typedef const DSCCAPS
*LPCDSCCAPS
;
202 typedef struct _DSCBCAPS
208 } DSCBCAPS
, *LPDSCBCAPS
;
209 typedef const DSCBCAPS
*LPCDSCBCAPS
;
211 #ifndef __LPCGUID_DEFINED__
212 #define __LPCGUID_DEFINED__
213 typedef const GUID
*LPCGUID
;
216 typedef LPVOID
* LPLPVOID
;
218 typedef BOOL
CALLBACK (*LPDSENUMCALLBACKW
)(LPGUID
,LPWSTR
,LPWSTR
,LPVOID
);
219 typedef BOOL
CALLBACK (*LPDSENUMCALLBACKA
)(LPGUID
,LPSTR
,LPSTR
,LPVOID
);
221 extern HRESULT WINAPI
DirectSoundCreate(LPCGUID lpGUID
,LPDIRECTSOUND
* ppDS
,IUnknown
*pUnkOuter
);
222 extern HRESULT WINAPI
DirectSoundEnumerateA(LPDSENUMCALLBACKA
, LPVOID
);
223 extern HRESULT WINAPI
DirectSoundEnumerateW(LPDSENUMCALLBACKW
, LPVOID
);
225 extern HRESULT WINAPI
DirectSoundCaptureCreate(LPCGUID
, LPDIRECTSOUNDCAPTURE
*, LPUNKNOWN
);
226 extern HRESULT WINAPI
DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA
, LPVOID
);
227 extern HRESULT WINAPI
DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW
, LPVOID
);
230 /*****************************************************************************
231 * IDirectSound interface
233 #define ICOM_INTERFACE IDirectSound
234 #define IDirectSound_METHODS \
235 ICOM_METHOD3(HRESULT,CreateSoundBuffer, LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \
236 ICOM_METHOD1(HRESULT,GetCaps, LPDSCAPS,lpDSCaps) \
237 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER,lplpDsbDuplicate) \
238 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwLevel) \
239 ICOM_METHOD (HRESULT,Compact) \
240 ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \
241 ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \
242 ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGuid)
243 #define IDirectSound_IMETHODS \
246 ICOM_DEFINE(IDirectSound
,IUnknown
)
247 #undef ICOM_INTERFACE
249 /*** IUnknown methods ***/
250 #define IDirectSound_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
251 #define IDirectSound_AddRef(p) ICOM_CALL (AddRef,p)
252 #define IDirectSound_Release(p) ICOM_CALL (Release,p)
253 /*** IDirectSound methods ***/
254 #define IDirectSound_CreateSoundBuffer(p,a,b,c) ICOM_CALL3(CreateSoundBuffer,p,a,b,c)
255 #define IDirectSound_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
256 #define IDirectSound_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
257 #define IDirectSound_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
258 #define IDirectSound_Compact(p) ICOM_CALL (Compact,p)
259 #define IDirectSound_GetSpeakerConfig(p,a) ICOM_CALL1(GetSpeakerConfig,p,a)
260 #define IDirectSound_SetSpeakerConfig(p,a) ICOM_CALL1(SetSpeakerConfig,p,a)
261 #define IDirectSound_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
264 /*****************************************************************************
265 * IDirectSoundBuffer interface
267 #define ICOM_INTERFACE IDirectSoundBuffer
268 #define IDirectSoundBuffer_METHODS \
269 ICOM_METHOD1(HRESULT,GetCaps, LPDSBCAPS,lpDSBufferCaps) \
270 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \
271 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
272 ICOM_METHOD1(HRESULT,GetVolume, LPLONG,lplVolume) \
273 ICOM_METHOD1(HRESULT,GetPan, LPLONG,lplpan) \
274 ICOM_METHOD1(HRESULT,GetFrequency, LPDWORD,lpdwFrequency) \
275 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
276 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUND,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \
277 ICOM_METHOD7(HRESULT,Lock, DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
278 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \
279 ICOM_METHOD1(HRESULT,SetCurrentPosition, DWORD,dwNewPosition) \
280 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,lpcfxFormat) \
281 ICOM_METHOD1(HRESULT,SetVolume, LONG,lVolume) \
282 ICOM_METHOD1(HRESULT,SetPan, LONG,lPan) \
283 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
284 ICOM_METHOD (HRESULT,Stop) \
285 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \
286 ICOM_METHOD (HRESULT,Restore)
287 #define IDirectSoundBuffer_IMETHODS \
289 IDirectSoundBuffer_METHODS
290 ICOM_DEFINE(IDirectSoundBuffer
,IUnknown
)
291 #undef ICOM_INTERFACE
293 /*** IUnknown methods ***/
294 #define IDirectSoundBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
295 #define IDirectSoundBuffer_AddRef(p) ICOM_CALL (AddRef,p)
296 #define IDirectSoundBuffer_Release(p) ICOM_CALL (Release,p)
297 /*** IDirectSoundBuffer methods ***/
298 #define IDirectSoundBuffer_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
299 #define IDirectSoundBuffer_GetCurrentPosition16(p,a,b) ICOM_CALL2(GetCurrentPosition16,p,a,b)
300 #define IDirectSoundBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
301 #define IDirectSoundBuffer_GetVolume(p,a) ICOM_CALL1(GetVolume,p,a)
302 #define IDirectSoundBuffer_GetPan(p,a) ICOM_CALL1(GetPan,p,a)
303 #define IDirectSoundBuffer_GetFrequency(p,a) ICOM_CALL1(GetFrequency,p,a)
304 #define IDirectSoundBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
305 #define IDirectSoundBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
306 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
307 #define IDirectSoundBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
308 #define IDirectSoundBuffer_SetCurrentPosition(p,a) ICOM_CALL1(SetCurrentPosition,p,a)
309 #define IDirectSoundBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
310 #define IDirectSoundBuffer_SetVolume(p,a) ICOM_CALL1(SetVolume,p,a)
311 #define IDirectSoundBuffer_SetPan(p,a) ICOM_CALL1(SetPan,p,a)
312 #define IDirectSoundBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
313 #define IDirectSoundBuffer_Stop(p) ICOM_CALL (Stop,p)
314 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
315 #define IDirectSoundBuffer_Restore(p) ICOM_CALL (Restore,p)
318 /*****************************************************************************
319 * IDirectSoundCapture interface
321 #define ICOM_INTERFACE IDirectSoundCapture
322 #define IDirectSoundCapture_METHODS \
323 ICOM_METHOD3(HRESULT,CreateCaptureBuffer, LPCDSCBUFFERDESC,lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER*,lplpDSCaptureBuffer, LPUNKNOWN,pUnk) \
324 ICOM_METHOD1(HRESULT,GetCaps, LPDSCCAPS,lpDSCCaps) \
325 ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGUID)
327 #define IDirectSoundCapture_IMETHODS \
329 IDirectSoundCapture_METHODS
330 ICOM_DEFINE(IDirectSoundCapture
,IUnknown
)
331 #undef ICOM_INTERFACE
333 #define IDirectSoundCapture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
334 #define IDirectSoundCapture_AddRef(p) ICOM_CALL (AddRef,p)
335 #define IDirectSoundCapture_Release(p) ICOM_CALL (Release,p)
336 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) ICOM_CALL3(CreateCaptureBuffer,p,a,b,c)
337 #define IDirectSoundCapture_GetCaps(p,a) ICOM_CALL (GetCaps,p,a)
338 #define IDirectSoundCapture_Initialize(p,a) ICOM_CALL (Initialize,p,a)
340 /*****************************************************************************
341 * IDirectSoundCaptureBuffer interface
343 #define ICOM_INTERFACE IDirectSoundCaptureBuffer
344 #define IDirectSoundCaptureBuffer_METHODS \
345 ICOM_METHOD1(HRESULT,GetCaps, LPDSCBCAPS,lpDSCBCaps) \
346 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCapturePosition,LPDWORD,lpdwReadPosition) \
347 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
348 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
349 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUNDCAPTURE,lpDSC, LPCDSCBUFFERDESC,lpcDSCBDesc) \
350 ICOM_METHOD7(HRESULT,Lock, DWORD,dwReadCusor, DWORD,dwReadBytes, LPVOID*,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID*,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
351 ICOM_METHOD1(HRESULT,Start, DWORD,dwFlags) \
352 ICOM_METHOD (HRESULT,Stop) \
353 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2)
355 #define IDirectSoundCaptureBuffer_IMETHODS \
357 IDirectSoundCaptureBuffer_METHODS
358 ICOM_DEFINE(IDirectSoundCaptureBuffer
,IUnknown
)
359 #undef ICOM_INTERFACE
361 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
362 #define IDirectSoundCaptureBuffer_AddRef(p) ICOM_CALL (AddRef,p)
363 #define IDirectSoundCaptureBuffer_Release(p) ICOM_CALL (Release,p)
364 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
365 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
366 #define IDirectSoundCaptureBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
367 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
368 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
369 #define IDirectSoundCaptureBuffer_Start(p,a) ICOM_CALL1(Start,p,a)
370 #define IDirectSoundCaptureBuffer_Stop(p) ICOM_CALL (Stop,p)
371 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
373 /*****************************************************************************
374 * IDirectSoundNotify interface
376 #define WINE_NOBUFFER 0x80000000
378 #define DSBPN_OFFSETSTOP -1
380 #define ICOM_INTERFACE IDirectSoundNotify
381 #define IDirectSoundNotify_METHODS \
382 ICOM_METHOD2(HRESULT,SetNotificationPositions, DWORD,cPositionNotifies, LPCDSBPOSITIONNOTIFY,lpcPositionNotifies)
383 #define IDirectSoundNotify_IMETHODS \
385 IDirectSoundNotify_METHODS
386 ICOM_DEFINE(IDirectSoundNotify
,IUnknown
)
387 #undef ICOM_INTERFACE
389 /*** IUnknown methods ***/
390 #define IDirectSoundNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
391 #define IDirectSoundNotify_AddRef(p) ICOM_CALL (AddRef,p)
392 #define IDirectSoundNotify_Release(p) ICOM_CALL (Release,p)
393 /*** IDirectSoundNotify methods ***/
394 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) ICOM_CALL2(SetNotificationPositions,p,a,b)
397 /*****************************************************************************
398 * IDirectSound3DListener interface
400 #define DS3DMODE_NORMAL 0x00000000
401 #define DS3DMODE_HEADRELATIVE 0x00000001
402 #define DS3DMODE_DISABLE 0x00000002
404 #define DS3D_IMMEDIATE 0x00000000
405 #define DS3D_DEFERRED 0x00000001
407 #define DS3D_MINDISTANCEFACTOR 0.0f
408 #define DS3D_MAXDISTANCEFACTOR 10.0f
409 #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
411 #define DS3D_MINROLLOFFFACTOR 0.0f
412 #define DS3D_MAXROLLOFFFACTOR 10.0f
413 #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
415 #define DS3D_MINDOPPLERFACTOR 0.0f
416 #define DS3D_MAXDOPPLERFACTOR 10.0f
417 #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
419 #define DS3D_DEFAULTMINDISTANCE 1.0f
420 #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
422 #define DS3D_MINCONEANGLE 0
423 #define DS3D_MAXCONEANGLE 360
424 #define DS3D_DEFAULTCONEANGLE 360
426 #define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
428 typedef struct _DS3DLISTENER
{
432 D3DVECTOR vOrientFront
;
433 D3DVECTOR vOrientTop
;
434 D3DVALUE flDistanceFactor
;
435 D3DVALUE flRolloffFactor
;
436 D3DVALUE flDopplerFactor
;
437 } DS3DLISTENER
, *LPDS3DLISTENER
;
439 typedef const DS3DLISTENER
*LPCDS3DLISTENER
;
441 #define ICOM_INTERFACE IDirectSound3DListener
442 #define IDirectSound3DListener_METHODS \
443 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DLISTENER,lpListener) \
444 ICOM_METHOD1(HRESULT,GetDistanceFactor, LPD3DVALUE,lpflDistanceFactor) \
445 ICOM_METHOD1(HRESULT,GetDopplerFactor, LPD3DVALUE,lpflDopplerFactor) \
446 ICOM_METHOD2(HRESULT,GetOrientation, LPD3DVECTOR,lpvOrientFront, LPD3DVECTOR,lpvOrientTop) \
447 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
448 ICOM_METHOD1(HRESULT,GetRolloffFactor, LPD3DVALUE,lpflRolloffFactor) \
449 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
450 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DLISTENER,lpcListener, DWORD,dwApply) \
451 ICOM_METHOD2(HRESULT,SetDistanceFactor, D3DVALUE,flDistanceFactor, DWORD,dwApply) \
452 ICOM_METHOD2(HRESULT,SetDopplerFactor, D3DVALUE,flDopplerFactor, DWORD,dwApply) \
453 ICOM_METHOD7(HRESULT,SetOrientation, D3DVALUE,xFront, D3DVALUE,yFront, D3DVALUE,zFront, D3DVALUE,xTop, D3DVALUE,yTop, D3DVALUE,zTop, DWORD,dwApply) \
454 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
455 ICOM_METHOD2(HRESULT,SetRolloffFactor, D3DVALUE,flRolloffFactor, DWORD,dwApply) \
456 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
457 ICOM_METHOD (HRESULT,CommitDeferredSettings)
458 #define IDirectSound3DListener_IMETHODS \
460 IDirectSound3DListener_METHODS
461 ICOM_DEFINE(IDirectSound3DListener
,IUnknown
)
462 #undef ICOM_INTERFACE
464 /*** IUnknown methods ***/
465 #define IDirectSound3DListener_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
466 #define IDirectSound3DListener_AddRef(p) ICOM_CALL (AddRef,p)
467 #define IDirectSound3DListener_Release(p) ICOM_CALL (Release,p)
468 /*** IDirectSound3DListener methods ***/
469 #define IDirectSound3DListener_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
470 #define IDirectSound3DListener_GetDistanceFactor(p,a) ICOM_CALL1(GetDistanceFactor,p,a)
471 #define IDirectSound3DListener_GetDopplerFactor(p,a) ICOM_CALL1(GetDopplerFactor,p,a)
472 #define IDirectSound3DListener_GetOrientation(p,a,b) ICOM_CALL2(GetOrientation,p,a,b)
473 #define IDirectSound3DListener_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
474 #define IDirectSound3DListener_GetRolloffFactor(p,a) ICOM_CALL1(GetRolloffFactor,p,a)
475 #define IDirectSound3DListener_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
476 #define IDirectSound3DListener_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
477 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) ICOM_CALL2(SetDistanceFactor,p,a,b)
478 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) ICOM_CALL2(SetDopplerFactor,p,a,b)
479 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) ICOM_CALL7(SetOrientation,p,a,b,c,d,e,f,g)
480 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
481 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) ICOM_CALL2(SetRolloffFactor,p,a,b)
482 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
483 #define IDirectSound3DListener_CommitDeferredSettings(p) ICOM_CALL (CommitDeferredSettings,p)
486 /*****************************************************************************
487 * IDirectSound3DBuffer interface
489 typedef struct _DS3DBUFFER
{
493 DWORD dwInsideConeAngle
;
494 DWORD dwOutsideConeAngle
;
495 D3DVECTOR vConeOrientation
;
496 LONG lConeOutsideVolume
;
497 D3DVALUE flMinDistance
;
498 D3DVALUE flMaxDistance
;
500 } DS3DBUFFER
, *LPDS3DBUFFER
;
502 typedef const DS3DBUFFER
*LPCDS3DBUFFER
;
504 #define ICOM_INTERFACE IDirectSound3DBuffer
505 #define IDirectSound3DBuffer_METHODS \
506 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DBUFFER,lpDs3dBuffer) \
507 ICOM_METHOD2(HRESULT,GetConeAngles, LPDWORD,lpdwInsideConeAngle, LPDWORD,lpdwOutsideConeAngle) \
508 ICOM_METHOD1(HRESULT,GetConeOrientation, LPD3DVECTOR,lpvOrientation) \
509 ICOM_METHOD1(HRESULT,GetConeOutsideVolume, LPLONG,lplConeOutsideVolume) \
510 ICOM_METHOD1(HRESULT,GetMaxDistance, LPD3DVALUE,lpflMaxDistance) \
511 ICOM_METHOD1(HRESULT,GetMinDistance, LPD3DVALUE,lpflMinDistance) \
512 ICOM_METHOD1(HRESULT,GetMode, LPDWORD,lpwdMode) \
513 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
514 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
515 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DBUFFER,lpcDs3dBuffer, DWORD,dwApply) \
516 ICOM_METHOD3(HRESULT,SetConeAngles, DWORD,dwInsideConeAngle, DWORD,dwOutsideConeAngle, DWORD,dwApply) \
517 ICOM_METHOD4(HRESULT,SetConeOrientation, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
518 ICOM_METHOD2(HRESULT,SetConeOutsideVolume, LONG,lConeOutsideVolume, DWORD,dwApply) \
519 ICOM_METHOD2(HRESULT,SetMaxDistance, D3DVALUE,flMaxDistance, DWORD,dwApply) \
520 ICOM_METHOD2(HRESULT,SetMinDistance, D3DVALUE,flMinDistance, DWORD,dwApply) \
521 ICOM_METHOD2(HRESULT,SetMode, DWORD,dwMode, DWORD,dwApply) \
522 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
523 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply)
524 #define IDirectSound3DBuffer_IMETHODS \
526 IDirectSound3DBuffer_METHODS
527 ICOM_DEFINE(IDirectSound3DBuffer
,IUnknown
)
528 #undef ICOM_INTERFACE
530 /*** IUnknown methods ***/
531 #define IDirectSound3DBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
532 #define IDirectSound3DBuffer_AddRef(p) ICOM_CALL (AddRef,p)
533 #define IDirectSound3DBuffer_Release(p) ICOM_CALL (Release,p)
534 /*** IDirectSound3DBuffer methods ***/
535 #define IDirectSound3DBuffer_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
536 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) ICOM_CALL2(GetConeAngles,p,a,b)
537 #define IDirectSound3DBuffer_GetConeOrientation(p,a) ICOM_CALL1(GetConeOrientation,p,a)
538 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) ICOM_CALL1(GetConeOutsideVolume,p,a)
539 #define IDirectSound3DBuffer_GetMaxDistance(p,a) ICOM_CALL1(GetMaxDistance,p,a)
540 #define IDirectSound3DBuffer_GetMinDistance(p,a) ICOM_CALL1(GetMinDistance,p,a)
541 #define IDirectSound3DBuffer_GetMode(p,a) ICOM_CALL1(GetMode,p,a)
542 #define IDirectSound3DBuffer_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
543 #define IDirectSound3DBuffer_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
544 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
545 #define IDirectSound3DBuffer_SetConeAngles(p,a,b) ICOM_CALL3(SetConeAngles,p,a,b)
546 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) ICOM_CALL4(SetConeOrientation,p,a,b,c,d)
547 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) ICOM_CALL2(SetConeOutsideVolume,p,a,b)
548 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) ICOM_CALL2(SetMaxDistance,p,a,b)
549 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) ICOM_CALL2(SetMinDistance,p,a,b)
550 #define IDirectSound3DBuffer_SetMode(p,a,b) ICOM_CALL2(SetMode,p,a,b)
551 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
552 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
558 #endif /* defined(__cplusplus) */
560 #endif /* __WINE_DSOUND_H */