2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DSOUND_H
20 #define __WINE_DSOUND_H
22 #ifndef DIRECTSOUND_VERSION
23 #define DIRECTSOUND_VERSION 0x0800
31 #endif /* defined(__cplusplus) */
33 /*****************************************************************************
34 * Predeclare the interfaces
36 DEFINE_GUID(CLSID_DirectSound
, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
37 DEFINE_GUID(CLSID_DirectSound8
, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
38 DEFINE_GUID(CLSID_DirectSoundCapture
, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
39 DEFINE_GUID(CLSID_DirectSoundCapture8
, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
40 DEFINE_GUID(CLSID_DirectSoundFullDuplex
,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
42 DEFINE_GUID(IID_IDirectSound
, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
43 typedef struct IDirectSound IDirectSound
,*LPDIRECTSOUND
;
45 DEFINE_GUID(IID_IDirectSound8
, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
46 typedef struct IDirectSound8 IDirectSound8
,*LPDIRECTSOUND8
;
48 DEFINE_GUID(IID_IDirectSoundBuffer
, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
49 typedef struct IDirectSoundBuffer IDirectSoundBuffer
,*LPDIRECTSOUNDBUFFER
,**LPLPDIRECTSOUNDBUFFER
;
51 DEFINE_GUID(IID_IDirectSoundBuffer8
, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
52 typedef struct IDirectSoundBuffer8 IDirectSoundBuffer8
,*LPDIRECTSOUNDBUFFER8
,**LPLPDIRECTSOUNDBUFFER8
;
54 DEFINE_GUID(IID_IDirectSoundNotify
, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
55 typedef struct IDirectSoundNotify IDirectSoundNotify
,*LPDIRECTSOUNDNOTIFY
;
56 #define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
58 DEFINE_GUID(IID_IDirectSound3DListener
, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
59 typedef struct IDirectSound3DListener IDirectSound3DListener
,*LPDIRECTSOUND3DLISTENER
;
61 DEFINE_GUID(IID_IDirectSound3DBuffer
, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
62 typedef struct IDirectSound3DBuffer IDirectSound3DBuffer
,*LPDIRECTSOUND3DBUFFER
;
64 DEFINE_GUID(IID_IDirectSoundCapture
, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
65 typedef struct IDirectSoundCapture IDirectSoundCapture
,*LPDIRECTSOUNDCAPTURE
;
66 #define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
67 typedef struct IDirectSoundCapture IDirectSoundCapture8
,*LPDIRECTSOUNDCAPTURE8
;
69 DEFINE_GUID(IID_IDirectSoundCaptureBuffer
,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
70 typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer
,*LPDIRECTSOUNDCAPTUREBUFFER
;
72 DEFINE_GUID(IID_IDirectSoundCaptureBuffer8
,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
73 typedef struct IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8
,*LPDIRECTSOUNDCAPTUREBUFFER8
,**LPLPDIRECTSOUNDCAPTUREBUFFER8
;
75 DEFINE_GUID(IID_IDirectSoundFullDuplex
, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
76 typedef struct IDirectSoundFullDuplex IDirectSoundFullDuplex
,*LPDIRECTSOUNDFULLDUPLEX
;
77 #define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
79 DEFINE_GUID(IID_IKsPropertySet
, 0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
80 typedef struct IKsPropertySet IKsPropertySet
,*LPKSPROPERTYSET
;
82 DEFINE_GUID(DSDEVID_DefaultPlayback
, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
83 DEFINE_GUID(DSDEVID_DefaultCapture
, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
84 DEFINE_GUID(DSDEVID_DefaultVoicePlayback
,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
85 DEFINE_GUID(DSDEVID_DefaultVoiceCapture
, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
87 DEFINE_GUID(DSDEVID_WinePlayback
, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
90 #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
93 #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
94 #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
95 #define DSERR_INVALIDPARAM E_INVALIDARG
96 #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
97 #define DSERR_GENERIC E_FAIL
98 #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
99 #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
100 #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
101 #define DSERR_UNSUPPORTED E_NOTIMPL
102 #define DSERR_NODRIVER MAKE_DSHRESULT(120)
103 #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
104 #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
105 #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
106 #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
107 #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
109 #define DSCAPS_PRIMARYMONO 0x00000001
110 #define DSCAPS_PRIMARYSTEREO 0x00000002
111 #define DSCAPS_PRIMARY8BIT 0x00000004
112 #define DSCAPS_PRIMARY16BIT 0x00000008
113 #define DSCAPS_CONTINUOUSRATE 0x00000010
114 #define DSCAPS_EMULDRIVER 0x00000020
115 #define DSCAPS_CERTIFIED 0x00000040
116 #define DSCAPS_SECONDARYMONO 0x00000100
117 #define DSCAPS_SECONDARYSTEREO 0x00000200
118 #define DSCAPS_SECONDARY8BIT 0x00000400
119 #define DSCAPS_SECONDARY16BIT 0x00000800
121 #define DSSCL_NORMAL 1
122 #define DSSCL_PRIORITY 2
123 #define DSSCL_EXCLUSIVE 3
124 #define DSSCL_WRITEPRIMARY 4
126 typedef struct _DSCAPS
130 DWORD dwMinSecondarySampleRate
;
131 DWORD dwMaxSecondarySampleRate
;
132 DWORD dwPrimaryBuffers
;
133 DWORD dwMaxHwMixingAllBuffers
;
134 DWORD dwMaxHwMixingStaticBuffers
;
135 DWORD dwMaxHwMixingStreamingBuffers
;
136 DWORD dwFreeHwMixingAllBuffers
;
137 DWORD dwFreeHwMixingStaticBuffers
;
138 DWORD dwFreeHwMixingStreamingBuffers
;
139 DWORD dwMaxHw3DAllBuffers
;
140 DWORD dwMaxHw3DStaticBuffers
;
141 DWORD dwMaxHw3DStreamingBuffers
;
142 DWORD dwFreeHw3DAllBuffers
;
143 DWORD dwFreeHw3DStaticBuffers
;
144 DWORD dwFreeHw3DStreamingBuffers
;
145 DWORD dwTotalHwMemBytes
;
146 DWORD dwFreeHwMemBytes
;
147 DWORD dwMaxContigFreeHwMemBytes
;
148 DWORD dwUnlockTransferRateHwBuffers
;
149 DWORD dwPlayCpuOverheadSwBuffers
;
154 #define DSBPLAY_LOOPING 0x00000001
156 #define DSBSTATUS_PLAYING 0x00000001
157 #define DSBSTATUS_BUFFERLOST 0x00000002
158 #define DSBSTATUS_LOOPING 0x00000004
161 #define DSBLOCK_FROMWRITECURSOR 0x00000001
162 #define DSBLOCK_ENTIREBUFFER 0x00000002
164 #define DSBCAPS_PRIMARYBUFFER 0x00000001
165 #define DSBCAPS_STATIC 0x00000002
166 #define DSBCAPS_LOCHARDWARE 0x00000004
167 #define DSBCAPS_LOCSOFTWARE 0x00000008
168 #define DSBCAPS_CTRL3D 0x00000010
169 #define DSBCAPS_CTRLFREQUENCY 0x00000020
170 #define DSBCAPS_CTRLPAN 0x00000040
171 #define DSBCAPS_CTRLVOLUME 0x00000080
172 #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
173 #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
174 #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
175 #define DSBCAPS_STICKYFOCUS 0x00004000
176 #define DSBCAPS_GLOBALFOCUS 0x00008000
177 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
178 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
180 #define DSBSIZE_MIN 4
181 #define DSBSIZE_MAX 0xFFFFFFF
182 #define DSBPAN_LEFT -10000
183 #define DSBPAN_RIGHT 10000
184 #define DSBVOLUME_MAX 0
185 #define DSBVOLUME_MIN -10000
186 #define DSBFREQUENCY_MIN 100
187 #define DSBFREQUENCY_MAX 100000
188 #define DSBFREQUENCY_ORIGINAL 0
190 typedef struct _DSBCAPS
195 DWORD dwUnlockTransferRate
;
196 DWORD dwPlayCpuOverhead
;
197 } DSBCAPS
,*LPDSBCAPS
;
199 #define DSSCL_NORMAL 1
200 #define DSSCL_PRIORITY 2
201 #define DSSCL_EXCLUSIVE 3
202 #define DSSCL_WRITEPRIMARY 4
204 typedef struct _DSEFFECTDESC
209 DWORD_PTR dwReserved1
;
210 DWORD_PTR dwReserved2
;
211 } DSEFFECTDESC
,*LPDSEFFECTDESC
;
212 typedef const DSEFFECTDESC
*LPCDSEFFECTDESC
;
214 #define DSFX_LOCHARDWARE 0x00000001
215 #define DSFX_LOCSOFTWARE 0x00000002
228 typedef struct _DSBUFFERDESC
234 LPWAVEFORMATEX lpwfxFormat
;
235 #if DIRECTSOUND_VERSION >= 0x0700
236 GUID guid3DAlgorithm
;
238 } DSBUFFERDESC
,*LPDSBUFFERDESC
;
239 typedef const DSBUFFERDESC
*LPCDSBUFFERDESC
;
241 typedef struct _DSBPOSITIONNOTIFY
245 } DSBPOSITIONNOTIFY
,*LPDSBPOSITIONNOTIFY
;
246 typedef const DSBPOSITIONNOTIFY
*LPCDSBPOSITIONNOTIFY
;
248 #define DSSPEAKER_HEADPHONE 1
249 #define DSSPEAKER_MONO 2
250 #define DSSPEAKER_QUAD 3
251 #define DSSPEAKER_STEREO 4
252 #define DSSPEAKER_SURROUND 5
254 #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
255 #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
256 #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
257 #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
259 #define DS_CERTIFIED 0x00000000
260 #define DS_UNCERTIFIED 0x00000001
262 typedef struct _DSCBUFFERDESC
268 LPWAVEFORMATEX lpwfxFormat
;
269 } DSCBUFFERDESC
, *LPDSCBUFFERDESC
;
270 typedef const DSCBUFFERDESC
*LPCDSCBUFFERDESC
;
272 typedef struct _DSCCAPS
278 } DSCCAPS
, *LPDSCCAPS
;
279 typedef const DSCCAPS
*LPCDSCCAPS
;
281 typedef struct _DSCBCAPS
287 } DSCBCAPS
, *LPDSCBCAPS
;
288 typedef const DSCBCAPS
*LPCDSCBCAPS
;
290 #define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
291 #define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
293 #define DSCBCAPS_WAVEMAPPED 0x80000000
294 #define DSCBCAPS_CTRLFX 0x00000200
296 #define DSCBLOCL_ENTIREBUFFER 0x00000001
297 #define DSCBSTART_LOOPING 0x00000001
298 #define DSCBPN_OFFSET_STOP 0xffffffff
300 #define DSCBSTATUS_CAPTURING 0x00000001
301 #define DSCBSTATUS_LOOPING 0x00000002
303 #ifndef __LPCGUID_DEFINED__
304 #define __LPCGUID_DEFINED__
305 typedef const GUID
*LPCGUID
;
308 typedef LPVOID
* LPLPVOID
;
310 typedef BOOL (CALLBACK
*LPDSENUMCALLBACKW
)(LPGUID
,LPCWSTR
,LPCWSTR
,LPVOID
);
311 typedef BOOL (CALLBACK
*LPDSENUMCALLBACKA
)(LPGUID
,LPCSTR
,LPCSTR
,LPVOID
);
313 extern HRESULT WINAPI
DirectSoundCreate(LPCGUID lpGUID
,LPDIRECTSOUND
*ppDS
,LPUNKNOWN pUnkOuter
);
314 extern HRESULT WINAPI
DirectSoundEnumerateA(LPDSENUMCALLBACKA
, LPVOID
);
315 extern HRESULT WINAPI
DirectSoundEnumerateW(LPDSENUMCALLBACKW
, LPVOID
);
317 extern HRESULT WINAPI
DirectSoundCaptureCreate(LPCGUID lpGUID
, LPDIRECTSOUNDCAPTURE
*ppDSC
, LPUNKNOWN pUnkOuter
);
318 extern HRESULT WINAPI
DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA
, LPVOID
);
319 extern HRESULT WINAPI
DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW
, LPVOID
);
321 extern HRESULT WINAPI
DirectSoundCreate8(LPCGUID lpGUID
,LPDIRECTSOUND8
*ppDS8
,LPUNKNOWN pUnkOuter
);
322 extern HRESULT WINAPI
DirectSoundCaptureCreate8(LPCGUID lpGUID
, LPDIRECTSOUNDCAPTURE
*ppDSC8
, LPUNKNOWN pUnkOuter
);
323 extern HRESULT WINAPI
DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice
, LPCGUID pcGuidRenderDevice
,
324 LPCDSCBUFFERDESC pcDSCBufferDesc
, LPCDSBUFFERDESC pcDSBufferDesc
, HWND hWnd
, DWORD dwLevel
,
325 LPDIRECTSOUNDFULLDUPLEX
*ppDSFD
, LPDIRECTSOUNDCAPTUREBUFFER8
*ppDSCBuffer8
, LPDIRECTSOUNDBUFFER8
*ppDSBuffer8
, LPUNKNOWN pUnkOuter
);
326 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
327 extern HRESULT WINAPI
GetDeviceID(LPCGUID lpGuidSrc
, LPGUID lpGuidDest
);
330 /*****************************************************************************
331 * IDirectSound interface
333 #define ICOM_INTERFACE IDirectSound
334 #define IDirectSound_METHODS \
335 ICOM_METHOD3(HRESULT,CreateSoundBuffer, LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \
336 ICOM_METHOD1(HRESULT,GetCaps, LPDSCAPS,lpDSCaps) \
337 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER,lplpDsbDuplicate) \
338 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwLevel) \
339 ICOM_METHOD (HRESULT,Compact) \
340 ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \
341 ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \
342 ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGuid)
343 #define IDirectSound_IMETHODS \
346 ICOM_DEFINE(IDirectSound
,IUnknown
)
347 #undef ICOM_INTERFACE
349 /*** IUnknown methods ***/
350 #define IDirectSound_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
351 #define IDirectSound_AddRef(p) ICOM_CALL (AddRef,p)
352 #define IDirectSound_Release(p) ICOM_CALL (Release,p)
353 /*** IDirectSound methods ***/
354 #define IDirectSound_CreateSoundBuffer(p,a,b,c) ICOM_CALL3(CreateSoundBuffer,p,a,b,c)
355 #define IDirectSound_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
356 #define IDirectSound_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
357 #define IDirectSound_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
358 #define IDirectSound_Compact(p) ICOM_CALL (Compact,p)
359 #define IDirectSound_GetSpeakerConfig(p,a) ICOM_CALL1(GetSpeakerConfig,p,a)
360 #define IDirectSound_SetSpeakerConfig(p,a) ICOM_CALL1(SetSpeakerConfig,p,a)
361 #define IDirectSound_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
364 /*****************************************************************************
365 * IDirectSound8 interface
367 #define ICOM_INTERFACE IDirectSound8
368 #define IDirectSound8_METHODS \
369 ICOM_METHOD3(HRESULT,CreateSoundBuffer, LPDSBUFFERDESC,lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER8,lplpDirectSoundBuffer, IUnknown*,pUnkOuter) \
370 ICOM_METHOD1(HRESULT,GetCaps, LPDSCAPS,lpDSCaps) \
371 ICOM_METHOD2(HRESULT,DuplicateSoundBuffer, LPDIRECTSOUNDBUFFER8,lpDsbOriginal, LPLPDIRECTSOUNDBUFFER8,lplpDsbDuplicate) \
372 ICOM_METHOD2(HRESULT,SetCooperativeLevel, HWND,hwnd, DWORD,dwLevel) \
373 ICOM_METHOD (HRESULT,Compact) \
374 ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \
375 ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \
376 ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGuid) \
377 ICOM_METHOD1(HRESULT,VerifyCertification, LPDWORD,pdwCertified)
378 #define IDirectSound8_IMETHODS \
380 IDirectSound8_METHODS
381 ICOM_DEFINE(IDirectSound8
,IUnknown
)
382 #undef ICOM_INTERFACE
384 /*** IUnknown methods ***/
385 #define IDirectSound8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
386 #define IDirectSound8_AddRef(p) ICOM_CALL (AddRef,p)
387 #define IDirectSound8_Release(p) ICOM_CALL (Release,p)
388 /*** IDirectSound methods ***/
389 #define IDirectSound8_CreateSoundBuffer(p,a,b,c) ICOM_CALL3(CreateSoundBuffer,p,a,b,c)
390 #define IDirectSound8_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
391 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) ICOM_CALL2(DuplicateSoundBuffer,p,a,b)
392 #define IDirectSound8_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
393 #define IDirectSound8_Compact(p) ICOM_CALL (Compact,p)
394 #define IDirectSound8_GetSpeakerConfig(p,a) ICOM_CALL1(GetSpeakerConfig,p,a)
395 #define IDirectSound8_SetSpeakerConfig(p,a) ICOM_CALL1(SetSpeakerConfig,p,a)
396 #define IDirectSound8_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
397 /*** IDirectSound8 methods ***/
398 #define IDirectSound8_VerifyCertification(p,a) ICOM_CALL1(VerifyCertification,p,a)
401 /*****************************************************************************
402 * IDirectSoundBuffer interface
404 #define ICOM_INTERFACE IDirectSoundBuffer
405 #define IDirectSoundBuffer_METHODS \
406 ICOM_METHOD1(HRESULT,GetCaps, LPDSBCAPS,lpDSBufferCaps) \
407 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \
408 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
409 ICOM_METHOD1(HRESULT,GetVolume, LPLONG,lplVolume) \
410 ICOM_METHOD1(HRESULT,GetPan, LPLONG,lplpan) \
411 ICOM_METHOD1(HRESULT,GetFrequency, LPDWORD,lpdwFrequency) \
412 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
413 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUND,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \
414 ICOM_METHOD7(HRESULT,Lock, DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
415 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \
416 ICOM_METHOD1(HRESULT,SetCurrentPosition, DWORD,dwNewPosition) \
417 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,lpcfxFormat) \
418 ICOM_METHOD1(HRESULT,SetVolume, LONG,lVolume) \
419 ICOM_METHOD1(HRESULT,SetPan, LONG,lPan) \
420 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
421 ICOM_METHOD (HRESULT,Stop) \
422 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \
423 ICOM_METHOD (HRESULT,Restore)
424 #define IDirectSoundBuffer_IMETHODS \
426 IDirectSoundBuffer_METHODS
427 ICOM_DEFINE(IDirectSoundBuffer
,IUnknown
)
428 #undef ICOM_INTERFACE
430 /*** IUnknown methods ***/
431 #define IDirectSoundBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
432 #define IDirectSoundBuffer_AddRef(p) ICOM_CALL (AddRef,p)
433 #define IDirectSoundBuffer_Release(p) ICOM_CALL (Release,p)
434 /*** IDirectSoundBuffer methods ***/
435 #define IDirectSoundBuffer_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
436 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
437 #define IDirectSoundBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
438 #define IDirectSoundBuffer_GetVolume(p,a) ICOM_CALL1(GetVolume,p,a)
439 #define IDirectSoundBuffer_GetPan(p,a) ICOM_CALL1(GetPan,p,a)
440 #define IDirectSoundBuffer_GetFrequency(p,a) ICOM_CALL1(GetFrequency,p,a)
441 #define IDirectSoundBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
442 #define IDirectSoundBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
443 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
444 #define IDirectSoundBuffer_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
445 #define IDirectSoundBuffer_SetCurrentPosition(p,a) ICOM_CALL1(SetCurrentPosition,p,a)
446 #define IDirectSoundBuffer_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
447 #define IDirectSoundBuffer_SetVolume(p,a) ICOM_CALL1(SetVolume,p,a)
448 #define IDirectSoundBuffer_SetPan(p,a) ICOM_CALL1(SetPan,p,a)
449 #define IDirectSoundBuffer_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
450 #define IDirectSoundBuffer_Stop(p) ICOM_CALL (Stop,p)
451 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
452 #define IDirectSoundBuffer_Restore(p) ICOM_CALL (Restore,p)
455 /*****************************************************************************
456 * IDirectSoundBuffer8 interface
458 #define ICOM_INTERFACE IDirectSoundBuffer8
459 #define IDirectSoundBuffer8_METHODS \
460 ICOM_METHOD1(HRESULT,GetCaps, LPDSBCAPS,lpDSBufferCaps) \
461 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCurrentPlayCursor, LPDWORD,lpdwCurrentWriteCursor) \
462 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
463 ICOM_METHOD1(HRESULT,GetVolume, LPLONG,lplVolume) \
464 ICOM_METHOD1(HRESULT,GetPan, LPLONG,lplpan) \
465 ICOM_METHOD1(HRESULT,GetFrequency, LPDWORD,lpdwFrequency) \
466 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
467 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUND8,lpDirectSound, LPDSBUFFERDESC,lpcDSBufferDesc) \
468 ICOM_METHOD7(HRESULT,Lock, DWORD,dwWriteCursor, DWORD,dwWriteBytes, LPVOID,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
469 ICOM_METHOD3(HRESULT,Play, DWORD,dwReserved1, DWORD,dwReserved2, DWORD,dwFlags) \
470 ICOM_METHOD1(HRESULT,SetCurrentPosition, DWORD,dwNewPosition) \
471 ICOM_METHOD1(HRESULT,SetFormat, LPWAVEFORMATEX,lpcfxFormat) \
472 ICOM_METHOD1(HRESULT,SetVolume, LONG,lVolume) \
473 ICOM_METHOD1(HRESULT,SetPan, LONG,lPan) \
474 ICOM_METHOD1(HRESULT,SetFrequency, DWORD,dwFrequency) \
475 ICOM_METHOD (HRESULT,Stop) \
476 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioPtr2) \
477 ICOM_METHOD (HRESULT,Restore) \
478 ICOM_METHOD3(HRESULT,SetFX, DWORD,dwEffectsCount, LPDSEFFECTDESC,pDSFXDesc, LPDWORD,pdwResultCodes) \
479 ICOM_METHOD3(HRESULT,AcquireResources, DWORD,dwFlags, DWORD,dwEffectsCount, LPDWORD,pdwResultCodes) \
480 ICOM_METHOD4(HRESULT,GetObjectInPath, REFGUID,rguidObject, DWORD,dwIndex, REFGUID,rguidInterface, LPVOID*,ppObject)
481 #define IDirectSoundBuffer8_IMETHODS \
483 IDirectSoundBuffer8_METHODS
484 ICOM_DEFINE(IDirectSoundBuffer8
,IUnknown
)
485 #undef ICOM_INTERFACE
487 /*** IUnknown methods ***/
488 #define IDirectSoundBuffer8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
489 #define IDirectSoundBuffer8_AddRef(p) ICOM_CALL (AddRef,p)
490 #define IDirectSoundBuffer8_Release(p) ICOM_CALL (Release,p)
491 /*** IDirectSoundBuffer methods ***/
492 #define IDirectSoundBuffer8_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
493 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
494 #define IDirectSoundBuffer8_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
495 #define IDirectSoundBuffer8_GetVolume(p,a) ICOM_CALL1(GetVolume,p,a)
496 #define IDirectSoundBuffer8_GetPan(p,a) ICOM_CALL1(GetPan,p,a)
497 #define IDirectSoundBuffer8_GetFrequency(p,a) ICOM_CALL1(GetFrequency,p,a)
498 #define IDirectSoundBuffer8_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
499 #define IDirectSoundBuffer8_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
500 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
501 #define IDirectSoundBuffer8_Play(p,a,b,c) ICOM_CALL3(Play,p,a,b,c)
502 #define IDirectSoundBuffer8_SetCurrentPosition(p,a) ICOM_CALL1(SetCurrentPosition,p,a)
503 #define IDirectSoundBuffer8_SetFormat(p,a) ICOM_CALL1(SetFormat,p,a)
504 #define IDirectSoundBuffer8_SetVolume(p,a) ICOM_CALL1(SetVolume,p,a)
505 #define IDirectSoundBuffer8_SetPan(p,a) ICOM_CALL1(SetPan,p,a)
506 #define IDirectSoundBuffer8_SetFrequency(p,a) ICOM_CALL1(SetFrequency,p,a)
507 #define IDirectSoundBuffer8_Stop(p) ICOM_CALL (Stop,p)
508 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
509 #define IDirectSoundBuffer8_Restore(p) ICOM_CALL (Restore,p)
510 /*** IDirectSoundBuffer8 methods ***/
511 #define IDirectSoundBuffer8_SetFX(p,a,b,c) ICOM_CALL3(SetFX,p,a,b,c)
512 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) ICOM_CALL3(AcquireResources,p,a,b,c)
513 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c) ICOM_CALL3(GetObjectInPath,p,a,b,c)
516 /*****************************************************************************
517 * IDirectSoundCapture interface
519 #define ICOM_INTERFACE IDirectSoundCapture
520 #define IDirectSoundCapture_METHODS \
521 ICOM_METHOD3(HRESULT,CreateCaptureBuffer, LPCDSCBUFFERDESC,lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER*,lplpDSCaptureBuffer, LPUNKNOWN,pUnk) \
522 ICOM_METHOD1(HRESULT,GetCaps, LPDSCCAPS,lpDSCCaps) \
523 ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGUID)
525 #define IDirectSoundCapture_IMETHODS \
527 IDirectSoundCapture_METHODS
528 ICOM_DEFINE(IDirectSoundCapture
,IUnknown
)
529 #undef ICOM_INTERFACE
531 #define IDirectSoundCapture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
532 #define IDirectSoundCapture_AddRef(p) ICOM_CALL (AddRef,p)
533 #define IDirectSoundCapture_Release(p) ICOM_CALL (Release,p)
534 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) ICOM_CALL3(CreateCaptureBuffer,p,a,b,c)
535 #define IDirectSoundCapture_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
536 #define IDirectSoundCapture_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
538 /*****************************************************************************
539 * IDirectSoundCaptureBuffer interface
541 #define ICOM_INTERFACE IDirectSoundCaptureBuffer
542 #define IDirectSoundCaptureBuffer_METHODS \
543 ICOM_METHOD1(HRESULT,GetCaps, LPDSCBCAPS,lpDSCBCaps) \
544 ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCapturePosition,LPDWORD,lpdwReadPosition) \
545 ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
546 ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
547 ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUNDCAPTURE,lpDSC, LPCDSCBUFFERDESC,lpcDSCBDesc) \
548 ICOM_METHOD7(HRESULT,Lock, DWORD,dwReadCusor, DWORD,dwReadBytes, LPVOID*,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID*,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
549 ICOM_METHOD1(HRESULT,Start, DWORD,dwFlags) \
550 ICOM_METHOD (HRESULT,Stop) \
551 ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2)
553 #define IDirectSoundCaptureBuffer_IMETHODS \
555 IDirectSoundCaptureBuffer_METHODS
556 ICOM_DEFINE(IDirectSoundCaptureBuffer
,IUnknown
)
557 #undef ICOM_INTERFACE
559 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
560 #define IDirectSoundCaptureBuffer_AddRef(p) ICOM_CALL (AddRef,p)
561 #define IDirectSoundCaptureBuffer_Release(p) ICOM_CALL (Release,p)
562 #define IDirectSoundCaptureBuffer_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
563 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
564 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
565 #define IDirectSoundCaptureBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
566 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
567 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
568 #define IDirectSoundCaptureBuffer_Start(p,a) ICOM_CALL1(Start,p,a)
569 #define IDirectSoundCaptureBuffer_Stop(p) ICOM_CALL (Stop,p)
570 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
572 /*****************************************************************************
573 * IDirectSoundCaptureBuffer8 interface
575 #define ICOM_INTERFACE IDirectSoundCaptureBuffer8
576 #define IDirectSoundCaptureBuffer8_METHODS \
577 ICOM_METHOD4(HRESULT,GetObjectInPath, REFGUID,rguidObject, DWORD,dwIndex, REFGUID,rguidInterface, LPVOID*,ppObject) \
578 ICOM_METHOD2(HRESULT,GetFXStatus, DWORD,dwFXCount, LPDWORD,pdwFXStatus)
580 #define IDirectSoundCaptureBuffer8_IMETHODS \
581 IDirectSoundCaptureBuffer_IMETHODS \
582 IDirectSoundCaptureBuffer8_METHODS
583 ICOM_DEFINE(IDirectSoundCaptureBuffer8
,IDirectSoundCaptureBuffer
)
584 #undef ICOM_INTERFACE
586 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
587 #define IDirectSoundCaptureBuffer8_AddRef(p) ICOM_CALL (AddRef,p)
588 #define IDirectSoundCaptureBuffer8_Release(p) ICOM_CALL (Release,p)
589 #define IDirectSoundCaptureBuffer8_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
590 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
591 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
592 #define IDirectSoundCaptureBuffer8_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
593 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
594 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
595 #define IDirectSoundCaptureBuffer8_Start(p,a) ICOM_CALL1(Start,p,a)
596 #define IDirectSoundCaptureBuffer8_Stop(p) ICOM_CALL (Stop,p)
597 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
598 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) ICOM_CALL4(GetObjectInPath,p,a,b,c,d)
599 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) ICOM_CALL2(GetFXStatus,p,a,b)
601 /*****************************************************************************
602 * IDirectSoundNotify interface
604 #define WINE_NOBUFFER 0x80000000
606 #define DSBPN_OFFSETSTOP -1
608 #define ICOM_INTERFACE IDirectSoundNotify
609 #define IDirectSoundNotify_METHODS \
610 ICOM_METHOD2(HRESULT,SetNotificationPositions, DWORD,cPositionNotifies, LPCDSBPOSITIONNOTIFY,lpcPositionNotifies)
611 #define IDirectSoundNotify_IMETHODS \
613 IDirectSoundNotify_METHODS
614 ICOM_DEFINE(IDirectSoundNotify
,IUnknown
)
615 #undef ICOM_INTERFACE
617 /*** IUnknown methods ***/
618 #define IDirectSoundNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
619 #define IDirectSoundNotify_AddRef(p) ICOM_CALL (AddRef,p)
620 #define IDirectSoundNotify_Release(p) ICOM_CALL (Release,p)
621 /*** IDirectSoundNotify methods ***/
622 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) ICOM_CALL2(SetNotificationPositions,p,a,b)
625 /*****************************************************************************
626 * IDirectSound3DListener interface
628 #define DS3DMODE_NORMAL 0x00000000
629 #define DS3DMODE_HEADRELATIVE 0x00000001
630 #define DS3DMODE_DISABLE 0x00000002
632 #define DS3D_IMMEDIATE 0x00000000
633 #define DS3D_DEFERRED 0x00000001
635 #define DS3D_MINDISTANCEFACTOR 0.0f
636 #define DS3D_MAXDISTANCEFACTOR 10.0f
637 #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
639 #define DS3D_MINROLLOFFFACTOR 0.0f
640 #define DS3D_MAXROLLOFFFACTOR 10.0f
641 #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
643 #define DS3D_MINDOPPLERFACTOR 0.0f
644 #define DS3D_MAXDOPPLERFACTOR 10.0f
645 #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
647 #define DS3D_DEFAULTMINDISTANCE 1.0f
648 #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
650 #define DS3D_MINCONEANGLE 0
651 #define DS3D_MAXCONEANGLE 360
652 #define DS3D_DEFAULTCONEANGLE 360
654 #define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
656 typedef struct _DS3DLISTENER
{
660 D3DVECTOR vOrientFront
;
661 D3DVECTOR vOrientTop
;
662 D3DVALUE flDistanceFactor
;
663 D3DVALUE flRolloffFactor
;
664 D3DVALUE flDopplerFactor
;
665 } DS3DLISTENER
, *LPDS3DLISTENER
;
667 typedef const DS3DLISTENER
*LPCDS3DLISTENER
;
669 #define ICOM_INTERFACE IDirectSound3DListener
670 #define IDirectSound3DListener_METHODS \
671 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DLISTENER,lpListener) \
672 ICOM_METHOD1(HRESULT,GetDistanceFactor, LPD3DVALUE,lpflDistanceFactor) \
673 ICOM_METHOD1(HRESULT,GetDopplerFactor, LPD3DVALUE,lpflDopplerFactor) \
674 ICOM_METHOD2(HRESULT,GetOrientation, LPD3DVECTOR,lpvOrientFront, LPD3DVECTOR,lpvOrientTop) \
675 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
676 ICOM_METHOD1(HRESULT,GetRolloffFactor, LPD3DVALUE,lpflRolloffFactor) \
677 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
678 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DLISTENER,lpcListener, DWORD,dwApply) \
679 ICOM_METHOD2(HRESULT,SetDistanceFactor, D3DVALUE,flDistanceFactor, DWORD,dwApply) \
680 ICOM_METHOD2(HRESULT,SetDopplerFactor, D3DVALUE,flDopplerFactor, DWORD,dwApply) \
681 ICOM_METHOD7(HRESULT,SetOrientation, D3DVALUE,xFront, D3DVALUE,yFront, D3DVALUE,zFront, D3DVALUE,xTop, D3DVALUE,yTop, D3DVALUE,zTop, DWORD,dwApply) \
682 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
683 ICOM_METHOD2(HRESULT,SetRolloffFactor, D3DVALUE,flRolloffFactor, DWORD,dwApply) \
684 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
685 ICOM_METHOD (HRESULT,CommitDeferredSettings)
686 #define IDirectSound3DListener_IMETHODS \
688 IDirectSound3DListener_METHODS
689 ICOM_DEFINE(IDirectSound3DListener
,IUnknown
)
690 #undef ICOM_INTERFACE
692 /*** IUnknown methods ***/
693 #define IDirectSound3DListener_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
694 #define IDirectSound3DListener_AddRef(p) ICOM_CALL (AddRef,p)
695 #define IDirectSound3DListener_Release(p) ICOM_CALL (Release,p)
696 /*** IDirectSound3DListener methods ***/
697 #define IDirectSound3DListener_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
698 #define IDirectSound3DListener_GetDistanceFactor(p,a) ICOM_CALL1(GetDistanceFactor,p,a)
699 #define IDirectSound3DListener_GetDopplerFactor(p,a) ICOM_CALL1(GetDopplerFactor,p,a)
700 #define IDirectSound3DListener_GetOrientation(p,a,b) ICOM_CALL2(GetOrientation,p,a,b)
701 #define IDirectSound3DListener_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
702 #define IDirectSound3DListener_GetRolloffFactor(p,a) ICOM_CALL1(GetRolloffFactor,p,a)
703 #define IDirectSound3DListener_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
704 #define IDirectSound3DListener_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
705 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) ICOM_CALL2(SetDistanceFactor,p,a,b)
706 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) ICOM_CALL2(SetDopplerFactor,p,a,b)
707 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) ICOM_CALL7(SetOrientation,p,a,b,c,d,e,f,g)
708 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
709 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) ICOM_CALL2(SetRolloffFactor,p,a,b)
710 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
711 #define IDirectSound3DListener_CommitDeferredSettings(p) ICOM_CALL (CommitDeferredSettings,p)
714 /*****************************************************************************
715 * IDirectSound3DBuffer interface
717 typedef struct _DS3DBUFFER
{
721 DWORD dwInsideConeAngle
;
722 DWORD dwOutsideConeAngle
;
723 D3DVECTOR vConeOrientation
;
724 LONG lConeOutsideVolume
;
725 D3DVALUE flMinDistance
;
726 D3DVALUE flMaxDistance
;
728 } DS3DBUFFER
, *LPDS3DBUFFER
;
730 typedef const DS3DBUFFER
*LPCDS3DBUFFER
;
732 #define ICOM_INTERFACE IDirectSound3DBuffer
733 #define IDirectSound3DBuffer_METHODS \
734 ICOM_METHOD1(HRESULT,GetAllParameters, LPDS3DBUFFER,lpDs3dBuffer) \
735 ICOM_METHOD2(HRESULT,GetConeAngles, LPDWORD,lpdwInsideConeAngle, LPDWORD,lpdwOutsideConeAngle) \
736 ICOM_METHOD1(HRESULT,GetConeOrientation, LPD3DVECTOR,lpvOrientation) \
737 ICOM_METHOD1(HRESULT,GetConeOutsideVolume, LPLONG,lplConeOutsideVolume) \
738 ICOM_METHOD1(HRESULT,GetMaxDistance, LPD3DVALUE,lpflMaxDistance) \
739 ICOM_METHOD1(HRESULT,GetMinDistance, LPD3DVALUE,lpflMinDistance) \
740 ICOM_METHOD1(HRESULT,GetMode, LPDWORD,lpwdMode) \
741 ICOM_METHOD1(HRESULT,GetPosition, LPD3DVECTOR,lpvPosition) \
742 ICOM_METHOD1(HRESULT,GetVelocity, LPD3DVECTOR,lpvVelocity) \
743 ICOM_METHOD2(HRESULT,SetAllParameters, LPCDS3DBUFFER,lpcDs3dBuffer, DWORD,dwApply) \
744 ICOM_METHOD3(HRESULT,SetConeAngles, DWORD,dwInsideConeAngle, DWORD,dwOutsideConeAngle, DWORD,dwApply) \
745 ICOM_METHOD4(HRESULT,SetConeOrientation, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
746 ICOM_METHOD2(HRESULT,SetConeOutsideVolume, LONG,lConeOutsideVolume, DWORD,dwApply) \
747 ICOM_METHOD2(HRESULT,SetMaxDistance, D3DVALUE,flMaxDistance, DWORD,dwApply) \
748 ICOM_METHOD2(HRESULT,SetMinDistance, D3DVALUE,flMinDistance, DWORD,dwApply) \
749 ICOM_METHOD2(HRESULT,SetMode, DWORD,dwMode, DWORD,dwApply) \
750 ICOM_METHOD4(HRESULT,SetPosition, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply) \
751 ICOM_METHOD4(HRESULT,SetVelocity, D3DVALUE,x, D3DVALUE,y, D3DVALUE,z, DWORD,dwApply)
752 #define IDirectSound3DBuffer_IMETHODS \
754 IDirectSound3DBuffer_METHODS
755 ICOM_DEFINE(IDirectSound3DBuffer
,IUnknown
)
756 #undef ICOM_INTERFACE
758 /*** IUnknown methods ***/
759 #define IDirectSound3DBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
760 #define IDirectSound3DBuffer_AddRef(p) ICOM_CALL (AddRef,p)
761 #define IDirectSound3DBuffer_Release(p) ICOM_CALL (Release,p)
762 /*** IDirectSound3DBuffer methods ***/
763 #define IDirectSound3DBuffer_GetAllParameters(p,a) ICOM_CALL1(GetAllParameters,p,a)
764 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) ICOM_CALL2(GetConeAngles,p,a,b)
765 #define IDirectSound3DBuffer_GetConeOrientation(p,a) ICOM_CALL1(GetConeOrientation,p,a)
766 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) ICOM_CALL1(GetConeOutsideVolume,p,a)
767 #define IDirectSound3DBuffer_GetMaxDistance(p,a) ICOM_CALL1(GetMaxDistance,p,a)
768 #define IDirectSound3DBuffer_GetMinDistance(p,a) ICOM_CALL1(GetMinDistance,p,a)
769 #define IDirectSound3DBuffer_GetMode(p,a) ICOM_CALL1(GetMode,p,a)
770 #define IDirectSound3DBuffer_GetPosition(p,a) ICOM_CALL1(GetPosition,p,a)
771 #define IDirectSound3DBuffer_GetVelocity(p,a) ICOM_CALL1(GetVelocity,p,a)
772 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) ICOM_CALL2(SetAllParameters,p,a,b)
773 #define IDirectSound3DBuffer_SetConeAngles(p,a,b) ICOM_CALL3(SetConeAngles,p,a,b)
774 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) ICOM_CALL4(SetConeOrientation,p,a,b,c,d)
775 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) ICOM_CALL2(SetConeOutsideVolume,p,a,b)
776 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) ICOM_CALL2(SetMaxDistance,p,a,b)
777 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) ICOM_CALL2(SetMinDistance,p,a,b)
778 #define IDirectSound3DBuffer_SetMode(p,a,b) ICOM_CALL2(SetMode,p,a,b)
779 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) ICOM_CALL4(SetPosition,p,a,b,c,d)
780 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) ICOM_CALL4(SetVelocity,p,a,b,c,d)
782 /*****************************************************************************
783 * IKsPropertySet interface
785 #define KSPROPERTY_SUPPORT_GET 1
786 #define KSPROPERTY_SUPPORT_SET 2
788 #define ICOM_INTERFACE IKsPropertySet
789 #define IKsPropertySet_METHODS \
790 ICOM_METHOD7(HRESULT,Get,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3,ULONG*,px4)\
791 ICOM_METHOD6(HRESULT,Set,REFGUID,rgid,ULONG,x1,LPVOID,p1,ULONG,x2,LPVOID,p2,ULONG,x3)\
792 ICOM_METHOD3(HRESULT,QuerySupport,REFGUID,rgid,ULONG,x1,ULONG*,px2)
793 #define IKsPropertySet_IMETHODS \
795 IKsPropertySet_METHODS
796 ICOM_DEFINE(IKsPropertySet
,IUnknown
)
797 #undef ICOM_INTERFACE
799 #define IKsPropertySet_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
800 #define IKsPropertySet_AddRef(p) ICOM_CALL (AddRef,p)
801 #define IKsPropertySet_Release(p) ICOM_CALL (Release,p)
802 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) ICOM_CALL7(Get,p,a,b,c,d,e,f,g)
803 #define IKsPropertySet_Set(p,a,b,c,d,e,f) ICOM_CALL6(Set,p,a,b,c,d,e,f)
804 #define IKsPropertySet_QuerySupport(p,a,b,c) ICOM_CALL3(QuerySupport,p,a,b,c)
807 /*****************************************************************************
808 * IDirectSoundFullDuplex interface
810 #define ICOM_INTERFACE IDirectSoundFullDuplex
811 #define IDirectSoundFullDuplex_METHODS \
812 ICOM_METHOD8(HRESULT,Initialize,LPCGUID,pCaptureGuid,LPCGUID,pRendererGuid,LPCDSCBUFFERDESC,lpDscBufferDesc,LPCDSBUFFERDESC,lpDsBufferDesc,HWND,hWnd,DWORD,dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8,lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8,lplpDirectSoundBuffer8)
813 #define IDirectSoundFullDuplex_IMETHODS \
815 IDirectSoundFullDuplex_METHODS
816 ICOM_DEFINE(IDirectSoundFullDuplex
,IUnknown
)
817 #undef ICOM_INTERFACE
819 #define IDirectSoundFullDuplex_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
820 #define IDirectSoundFullDuplex_AddRef(p) ICOM_CALL (AddRef,p)
821 #define IDirectSoundFullDuplex_Release(p) ICOM_CALL (Release,p)
822 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) ICOM_CALL8(Initialize,p,a,b,c,d,e,f,g,h)
826 #endif /* defined(__cplusplus) */
828 #endif /* __WINE_DSOUND_H */