Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbejy@wpi.edu>
[wine/multimedia.git] / include / dsound.h
blob542488f9c265e806cfafffe998c7b6f51b975b28
1 #ifndef __WINE_DSOUND_H
2 #define __WINE_DSOUND_H
4 #include "winbase.h" /* for CRITICAL_SECTION */
5 #include "mmsystem.h"
6 #include "d3d.h" /*FIXME: Need to break out d3dtypes.h */
8 /*****************************************************************************
9 * Predeclare the interfaces
11 DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
13 DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
14 typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND;
16 DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
17 typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
19 DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
20 typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY;
22 DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
23 typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER;
25 DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
26 typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER;
28 DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
29 typedef struct IDirectSoundCapture IDirectSoundCapture,*LPDIRECTSOUNDCAPTURE;
31 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
32 typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER;
34 DEFINE_GUID(IID_IKsPropertySet, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
37 #define _FACDS 0x878
38 #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
40 #define DS_OK 0
41 #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
42 #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
43 #define DSERR_INVALIDPARAM E_INVALIDARG
44 #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
45 #define DSERR_GENERIC E_FAIL
46 #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
47 #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
48 #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
49 #define DSERR_UNSUPPORTED E_NOTIMPL
50 #define DSERR_NODRIVER MAKE_DSHRESULT(120)
51 #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
52 #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
53 #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
54 #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
55 #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
57 #define DSCAPS_PRIMARYMONO 0x00000001
58 #define DSCAPS_PRIMARYSTEREO 0x00000002
59 #define DSCAPS_PRIMARY8BIT 0x00000004
60 #define DSCAPS_PRIMARY16BIT 0x00000008
61 #define DSCAPS_CONTINUOUSRATE 0x00000010
62 #define DSCAPS_EMULDRIVER 0x00000020
63 #define DSCAPS_CERTIFIED 0x00000040
64 #define DSCAPS_SECONDARYMONO 0x00000100
65 #define DSCAPS_SECONDARYSTEREO 0x00000200
66 #define DSCAPS_SECONDARY8BIT 0x00000400
67 #define DSCAPS_SECONDARY16BIT 0x00000800
69 #define DSSCL_NORMAL 1
70 #define DSSCL_PRIORITY 2
71 #define DSSCL_EXCLUSIVE 3
72 #define DSSCL_WRITEPRIMARY 4
74 typedef struct _DSCAPS
76 DWORD dwSize;
77 DWORD dwFlags;
78 DWORD dwMinSecondarySampleRate;
79 DWORD dwMaxSecondarySampleRate;
80 DWORD dwPrimaryBuffers;
81 DWORD dwMaxHwMixingAllBuffers;
82 DWORD dwMaxHwMixingStaticBuffers;
83 DWORD dwMaxHwMixingStreamingBuffers;
84 DWORD dwFreeHwMixingAllBuffers;
85 DWORD dwFreeHwMixingStaticBuffers;
86 DWORD dwFreeHwMixingStreamingBuffers;
87 DWORD dwMaxHw3DAllBuffers;
88 DWORD dwMaxHw3DStaticBuffers;
89 DWORD dwMaxHw3DStreamingBuffers;
90 DWORD dwFreeHw3DAllBuffers;
91 DWORD dwFreeHw3DStaticBuffers;
92 DWORD dwFreeHw3DStreamingBuffers;
93 DWORD dwTotalHwMemBytes;
94 DWORD dwFreeHwMemBytes;
95 DWORD dwMaxContigFreeHwMemBytes;
96 DWORD dwUnlockTransferRateHwBuffers;
97 DWORD dwPlayCpuOverheadSwBuffers;
98 DWORD dwReserved1;
99 DWORD dwReserved2;
100 } DSCAPS,*LPDSCAPS;
102 #define DSBPLAY_LOOPING 0x00000001
104 #define DSBSTATUS_PLAYING 0x00000001
105 #define DSBSTATUS_BUFFERLOST 0x00000002
106 #define DSBSTATUS_LOOPING 0x00000004
109 #define DSBLOCK_FROMWRITECURSOR 0x00000001
110 #define DSBLOCK_ENTIREBUFFER 0x00000002
112 #define DSBCAPS_PRIMARYBUFFER 0x00000001
113 #define DSBCAPS_STATIC 0x00000002
114 #define DSBCAPS_LOCHARDWARE 0x00000004
115 #define DSBCAPS_LOCSOFTWARE 0x00000008
116 #define DSBCAPS_CTRL3D 0x00000010
117 #define DSBCAPS_CTRLFREQUENCY 0x00000020
118 #define DSBCAPS_CTRLPAN 0x00000040
119 #define DSBCAPS_CTRLVOLUME 0x00000080
120 #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
121 #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
122 #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
123 #define DSBCAPS_STICKYFOCUS 0x00004000
124 #define DSBCAPS_GLOBALFOCUS 0x00008000
125 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
126 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
128 #define DSBPAN_LEFT -10000
129 #define DSBPAN_RIGHT 10000
130 #define DSBVOLUME_MAX 0
131 #define DSBVOLUME_MIN -10000
132 #define DSBFREQUENCY_MIN 100
133 #define DSBFREQUENCY_MAX 100000
134 #define DSBFREQUENCY_ORIGINAL 0
136 typedef struct _DSBCAPS
138 DWORD dwSize;
139 DWORD dwFlags;
140 DWORD dwBufferBytes;
141 DWORD dwUnlockTransferRate;
142 DWORD dwPlayCpuOverhead;
143 } DSBCAPS,*LPDSBCAPS;
145 #define DSSCL_NORMAL 1
146 #define DSSCL_PRIORITY 2
147 #define DSSCL_EXCLUSIVE 3
148 #define DSSCL_WRITEPRIMARY 4
150 typedef struct _DSBUFFERDESC
152 DWORD dwSize;
153 DWORD dwFlags;
154 DWORD dwBufferBytes;
155 DWORD dwReserved;
156 LPWAVEFORMATEX lpwfxFormat;
157 } DSBUFFERDESC,*LPDSBUFFERDESC;
159 typedef struct _DSBPOSITIONNOTIFY
161 DWORD dwOffset;
162 HANDLE hEventNotify;
163 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
165 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
167 #define DSSPEAKER_HEADPHONE 1
168 #define DSSPEAKER_MONO 2
169 #define DSSPEAKER_QUAD 3
170 #define DSSPEAKER_STEREO 4
171 #define DSSPEAKER_SURROUND 5
173 #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
174 #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
175 #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
176 #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
179 typedef LPVOID* LPLPVOID;
181 typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPWSTR,LPWSTR,LPVOID);
182 typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPSTR,LPSTR,LPVOID);
184 extern HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND * ppDS,IUnknown *pUnkOuter );
187 /*****************************************************************************
188 * IDirectSound interface
190 #define ICOM_INTERFACE IDirectSound
191 #define IDirectSound_METHODS \
192 ICOM_METHOD3(HRESULT,CreateSoundBuffer, LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \
193 ICOM_METHOD1(HRESULT,GetCaps, LPDSCAPS,lpDSCaps) \
194 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER,lplpDsbDuplicate) \
195 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwLevel) \
196 ICOM_METHOD (HRESULT,Compact) \
197 ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \
198 ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \
199 ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGuid)
200 #define IDirectSound_IMETHODS \
201 IUnknown_IMETHODS \
202 IDirectSound_METHODS
203 ICOM_DEFINE(IDirectSound,IUnknown)
204 #undef ICOM_INTERFACE
206 #ifdef ICOM_CINTERFACE
207 /*** IUnknown methods ***/
208 #define IDirectSound_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
209 #define IDirectSound_AddRef(p) ICOM_CALL (AddRef,p)
210 #define IDirectSound_Release(p) ICOM_CALL (Release,p)
211 /*** IDirectSound methods ***/
212 #define IDirectSound_CreateSoundBuffer(p,a,b,c) ICOM_CALL3(CreateSoundBuffer,p,a,b,c)
213 #define IDirectSound_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
214 #define IDirectSound_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
215 #define IDirectSound_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
216 #define IDirectSound_Compact(p) ICOM_CALL (Compact,p)
217 #define IDirectSound_GetSpeakerConfig(p,a) ICOM_CALL1(GetSpeakerConfig,p,a)
218 #define IDirectSound_SetSpeakerConfig(p,a) ICOM_CALL1(SetSpeakerConfig,p,a)
219 #define IDirectSound_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
220 #endif
223 /*****************************************************************************
224 * IDirectSoundBuffer interface
226 #define ICOM_INTERFACE IDirectSoundBuffer
227 #define IDirectSoundBuffer_METHODS \
228 ICOM_METHOD1(HRESULT,GetCaps, LPDSBCAPS,lpDSBufferCaps) \
229 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \
230 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
231 ICOM_METHOD1(HRESULT,GetVolume, LPLONG,lplVolume) \
232 ICOM_METHOD1(HRESULT,GetPan, LPLONG,lplpan) \
233 ICOM_METHOD1(HRESULT,GetFrequency, LPDWORD,lpdwFrequency) \
234 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
235 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUND,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \
236 ICOM_METHOD7(HRESULT,Lock, DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
237 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \
238 ICOM_METHOD1(HRESULT,SetCurrentPosition, DWORD,dwNewPosition) \
239 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,lpcfxFormat) \
240 ICOM_METHOD1(HRESULT,SetVolume, LONG,lVolume) \
241 ICOM_METHOD1(HRESULT,SetPan, LONG,lPan) \
242 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
243 ICOM_METHOD (HRESULT,Stop) \
244 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \
245 ICOM_METHOD (HRESULT,Restore)
246 #define IDirectSoundBuffer_IMETHODS \
247 IUnknown_IMETHODS \
248 IDirectSoundBuffer_METHODS
249 ICOM_DEFINE(IDirectSoundBuffer,IUnknown)
250 #undef ICOM_INTERFACE
252 #ifdef ICOM_CINTERFACE
253 /*** IUnknown methods ***/
254 #define IDirectSoundBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
255 #define IDirectSoundBuffer_AddRef(p) ICOM_CALL (AddRef,p)
256 #define IDirectSoundBuffer_Release(p) ICOM_CALL (Release,p)
257 /*** IDirectSoundBuffer methods ***/
258 #define IDirectSoundBuffer_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
259 #define IDirectSoundBuffer_GetCurrentPosition16(p,a,b) ICOM_CALL2(GetCurrentPosition16,p,a,b)
260 #define IDirectSoundBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
261 #define IDirectSoundBuffer_GetVolume(p,a) ICOM_CALL1(GetVolume,p,a)
262 #define IDirectSoundBuffer_GetPan(p,a) ICOM_CALL1(GetPan,p,a)
263 #define IDirectSoundBuffer_GetFrequency(p,a) ICOM_CALL1(GetFrequency,p,a)
264 #define IDirectSoundBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a
265 #define IDirectSoundBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
266 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
267 #define IDirectSoundBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
268 #define IDirectSoundBuffer_SetCurrentPosition(p,a) ICOM_CALL1(SetCurrentPosition,p,a)
269 #define IDirectSoundBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
270 #define IDirectSoundBuffer_SetVolume(p,a) ICOM_CALL1(SetVolume,p,a)
271 #define IDirectSoundBuffer_SetPan(p,a) ICOM_CALL1(SetPan,p,a)
272 #define IDirectSoundBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
273 #define IDirectSoundBuffer_Stop(p) ICOM_CALL (Stop,p)
274 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,)
275 #define IDirectSoundBuffer_Restore(p) ICOM_CALL (Restore,p)
276 #endif
279 /*****************************************************************************
280 * IDirectSoundCapture interface
282 /* FIXME: not implemented yet */
285 /*****************************************************************************
286 * IDirectSoundCaptureBuffer interface
288 /* FIXME: not implemented yet */
291 /*****************************************************************************
292 * IDirectSoundNotify interface
294 #define WINE_NOBUFFER 0x80000000
296 #define DSBPN_OFFSETSTOP -1
298 #define ICOM_INTERFACE IDirectSoundNotify
299 #define IDirectSoundNotify_METHODS \
300 ICOM_METHOD2(HRESULT,SetNotificationPositions, DWORD,cPositionNotifies, LPCDSBPOSITIONNOTIFY,lpcPositionNotifies)
301 #define IDirectSoundNotify_IMETHODS \
302 IUnknown_IMETHODS \
303 IDirectSoundNotify_METHODS
304 ICOM_DEFINE(IDirectSoundNotify,IUnknown)
305 #undef ICOM_INTERFACE
307 #ifdef ICOM_CINTERFACE
308 /*** IUnknown methods ***/
309 #define IDirectSoundNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
310 #define IDirectSoundNotify_AddRef(p) ICOM_CALL (AddRef,p)
311 #define IDirectSoundNotify_Release(p) ICOM_CALL (Release,p)
312 /*** IDirectSoundNotify methods ***/
313 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) ICOM_CALL2(SetNotificationPositions,p,a,b)
314 #endif
317 /*****************************************************************************
318 * IDirectSound3DListener interface
320 #define DS3DMODE_NORMAL 0x00000000
321 #define DS3DMODE_HEADRELATIVE 0x00000001
322 #define DS3DMODE_DISABLE 0x00000002
324 #define DS3D_IMMEDIATE 0x00000000
325 #define DS3D_DEFERRED 0x00000001
327 #define DS3D_MINDISTANCEFACTOR 0.0f
328 #define DS3D_MAXDISTANCEFACTOR 10.0f
329 #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
331 #define DS3D_MINROLLOFFFACTOR 0.0f
332 #define DS3D_MAXROLLOFFFACTOR 10.0f
333 #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
335 #define DS3D_MINDOPPLERFACTOR 0.0f
336 #define DS3D_MAXDOPPLERFACTOR 10.0f
337 #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
339 #define DS3D_DEFAULTMINDISTANCE 1.0f
340 #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
342 #define DS3D_MINCONEANGLE 0
343 #define DS3D_MAXCONEANGLE 360
344 #define DS3D_DEFAULTCONEANGLE 360
346 #define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
348 typedef struct _DS3DLISTENER {
349 DWORD dwSize;
350 D3DVECTOR vPosition;
351 D3DVECTOR vVelocity;
352 D3DVECTOR vOrientFront;
353 D3DVECTOR vOrientTop;
354 D3DVALUE flDistanceFactor;
355 D3DVALUE flRolloffFactor;
356 D3DVALUE flDopplerFactor;
357 } DS3DLISTENER, *LPDS3DLISTENER;
359 typedef const DS3DLISTENER *LPCDS3DLISTENER;
361 #define ICOM_INTERFACE IDirectSound3DListener
362 #define IDirectSound3DListener_METHODS \
363 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DLISTENER,lpListener) \
364 ICOM_METHOD1(HRESULT,GetDistanceFactor, LPD3DVALUE,lpflDistanceFactor) \
365 ICOM_METHOD1(HRESULT,GetDopplerFactor, LPD3DVALUE,lpflDopplerFactor) \
366 ICOM_METHOD2(HRESULT,GetOrientation, LPD3DVECTOR,lpvOrientFront, LPD3DVECTOR,lpvOrientTop) \
367 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
368 ICOM_METHOD1(HRESULT,GetRolloffFactor, LPD3DVALUE,lpflRolloffFactor) \
369 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
370 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DLISTENER,lpcListener, DWORD,dwApply) \
371 ICOM_METHOD2(HRESULT,SetDistanceFactor, D3DVALUE,flDistanceFactor, DWORD,dwApply) \
372 ICOM_METHOD2(HRESULT,SetDopplerFactor, D3DVALUE,flDopplerFactor, DWORD,dwApply) \
373 ICOM_METHOD7(HRESULT,SetOrientation, D3DVALUE,xFront, D3DVALUE,yFront, D3DVALUE,zFront, D3DVALUE,xTop, D3DVALUE,yTop, D3DVALUE,zTop, DWORD,dwApply) \
374 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
375 ICOM_METHOD2(HRESULT,SetRolloffFactor, D3DVALUE,flRolloffFactor, DWORD,dwApply) \
376 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
377 ICOM_METHOD (HRESULT,CommitDeferredSettings)
378 #define IDirectSound3DListener_IMETHODS \
379 IUnknown_IMETHODS \
380 IDirectSound3DListener_METHODS
381 ICOM_DEFINE(IDirectSound3DListener,IUnknown)
382 #undef ICOM_INTERFACE
384 #ifdef ICOM_CINTERFACE
385 /*** IUnknown methods ***/
386 #define IDirectSound3DListener_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
387 #define IDirectSound3DListener_AddRef(p) ICOM_CALL (AddRef,p)
388 #define IDirectSound3DListener_Release(p) ICOM_CALL (Release,p)
389 /*** IDirectSound3DListener methods ***/
390 #define IDirectSound3DListener_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
391 #define IDirectSound3DListener_GetDistanceFactor(p,a) ICOM_CALL1(GetDistanceFactor,p,a)
392 #define IDirectSound3DListener_GetDopplerFactor(p,a) ICOM_CALL1(GetDopplerFactor,p,a)
393 #define IDirectSound3DListener_GetOrientation(p,a,b) ICOM_CALL2(GetOrientation,p,a,b)
394 #define IDirectSound3DListener_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
395 #define IDirectSound3DListener_GetRolloffFactor(p,a) ICOM_CALL1(GetRolloffFactor,p,a)
396 #define IDirectSound3DListener_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
397 #define IDirectSound3DListener_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
398 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) ICOM_CALL2(SetDistanceFactor,p,a,b)
399 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) ICOM_CALL2(SetDopplerFactor,p,a,b)
400 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) ICOM_CALL7(SetOrientation,p,a,b,c,d,e,f,g)
401 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
402 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) ICOM_CALL2(SetRolloffFactor,p,a,b)
403 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
404 #define IDirectSound3DListener_CommitDeferredSettings(p) ICOM_CALL (CommitDeferredSettings,p)
405 #endif
408 /*****************************************************************************
409 * IDirectSound3DBuffer interface
411 typedef struct _DS3DBUFFER {
412 DWORD dwSize;
413 D3DVECTOR vPosition;
414 D3DVECTOR vVelocity;
415 DWORD dwInsideConeAngle;
416 DWORD dwOutsideConeAngle;
417 D3DVECTOR vConeOrientation;
418 LONG lConeOutsideVolume;
419 D3DVALUE flMinDistance;
420 D3DVALUE flMaxDistance;
421 DWORD dwMode;
422 } DS3DBUFFER, *LPDS3DBUFFER;
424 typedef const DS3DBUFFER *LPCDS3DBUFFER;
426 #define ICOM_INTERFACE IDirectSound3DBuffer
427 #define IDirectSound3DBuffer_METHODS \
428 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DBUFFER,lpDs3dBuffer) \
429 ICOM_METHOD2(HRESULT,GetConeAngles, LPDWORD,lpdwInsideConeAngle, LPDWORD,lpdwOutsideConeAngle) \
430 ICOM_METHOD1(HRESULT,GetConeOrientation, LPD3DVECTOR,lpvOrientation) \
431 ICOM_METHOD1(HRESULT,GetConeOutsideVolume, LPLONG,lplConeOutsideVolume) \
432 ICOM_METHOD1(HRESULT,GetMaxDistance, LPD3DVALUE,lpflMaxDistance) \
433 ICOM_METHOD1(HRESULT,GetMinDistance, LPD3DVALUE,lpflMinDistance) \
434 ICOM_METHOD1(HRESULT,GetMode, LPDWORD,lpwdMode) \
435 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
436 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
437 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DBUFFER,lpcDs3dBuffer, DWORD,dwApply) \
438 ICOM_METHOD3(HRESULT,SetConeAngles, DWORD,dwInsideConeAngle, DWORD,dwOutsideConeAngle, DWORD,dwApply) \
439 ICOM_METHOD4(HRESULT,SetConeOrientation, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
440 ICOM_METHOD2(HRESULT,SetConeOutsideVolume, LONG,lConeOutsideVolume, DWORD,dwApply) \
441 ICOM_METHOD2(HRESULT,SetMaxDistance, D3DVALUE,flMaxDistance, DWORD,dwApply) \
442 ICOM_METHOD2(HRESULT,SetMinDistance, D3DVALUE,flMinDistance, DWORD,dwApply) \
443 ICOM_METHOD2(HRESULT,SetMode, DWORD,dwMode, DWORD,dwApply) \
444 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
445 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply)
446 #define IDirectSound3DBuffer_IMETHODS \
447 IUnknown_IMETHODS \
448 IDirectSound3DBuffer_METHODS
449 ICOM_DEFINE(IDirectSound3DBuffer,IUnknown)
450 #undef ICOM_INTERFACE
452 #ifdef ICOM_CINTERFACE
453 /*** IUnknown methods ***/
454 #define IDirectSound3DBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
455 #define IDirectSound3DBuffer_AddRef(p) ICOM_CALL (AddRef,p)
456 #define IDirectSound3DBuffer_Release(p) ICOM_CALL (Release,p)
457 /*** IDirectSound3DBuffer methods ***/
458 #define IDirectSound3DBuffer_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
459 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) ICOM_CALL2(GetConeAngles,p,a,b)
460 #define IDirectSound3DBuffer_GetConeOrientation(p,a) ICOM_CALL1(GetConeOrientation,p,a)
461 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) ICOM_CALL1(GetConeOutsideVolume,p,a)
462 #define IDirectSound3DBuffer_GetMaxDistance(p,a) ICOM_CALL1(GetMaxDistance,p,a)
463 #define IDirectSound3DBuffer_GetMinDistance(p,a) ICOM_CALL1(GetMinDistance,p,a)
464 #define IDirectSound3DBuffer_GetMode(p,a) ICOM_CALL1(GetMode,p,a)
465 #define IDirectSound3DBuffer_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
466 #define IDirectSound3DBuffer_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
467 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
468 #define IDirectSound3DBuffer_SetConeAngles(p,a,b) ICOM_CALL3(SetConeAngles,p,a,b)
469 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) ICOM_CALL4(SetConeOrientation,p,a,b,c,d)
470 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) ICOM_CALL2(SetConeOutsideVolume,p,a,b)
471 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) ICOM_CALL2(SetMaxDistance,p,a,b)
472 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) ICOM_CALL2(SetMinDistance,p,a,b)
473 #define IDirectSound3DBuffer_SetMode(p,a,b) ICOM_CALL2(SetMode,p,a,b)
474 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
475 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
476 #endif
479 /*****************************************************************************
480 * IKsPropertySet interface
482 /* FIXME: not implemented yet */
485 #endif /* __WINE_DSOUND_H */