- fix some prototypes, remove dxroslayer from dsound
[reactos.git] / reactos / include / psdk / dsound.h
1 /*
2 * Copyright (C) the Wine project
3 *
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.
8 *
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.
13 *
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
17 */
18
19
20
21 #ifndef __WINE_DSOUND_H
22 #define __WINE_DSOUND_H
23
24 // hack
25 #define __DSOUND_INCLUDED__
26
27
28 #ifndef DIRECTSOUND_VERSION
29 #define DIRECTSOUND_VERSION 0x0900
30 #endif
31
32 #define COM_NO_WINDOWS_H
33 #include <objbase.h>
34 #include <float.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* defined(__cplusplus) */
39
40 #ifndef DX_SHARED_DEFINES
41
42 typedef float D3DVALUE, *LPD3DVALUE;
43
44 #ifndef D3DCOLOR_DEFINED
45 typedef DWORD D3DCOLOR, *LPD3DCOLOR;
46 #define D3DCOLOR_DEFINED
47 #endif
48
49 #ifndef D3DVECTOR_DEFINED
50 typedef struct _D3DVECTOR {
51 float x;
52 float y;
53 float z;
54 } D3DVECTOR;
55 #define D3DVECTOR_DEFINED
56 #endif
57
58 #ifndef LPD3DVECTOR_DEFINED
59 typedef D3DVECTOR *LPD3DVECTOR;
60 #define LPD3DVECTOR_DEFINED
61 #endif
62
63
64
65 #define DX_SHARED_DEFINES
66 #endif /* DX_SHARED_DEFINES */
67
68 /*****************************************************************************
69 * Predeclare the interfaces
70 */
71 DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
72 DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
73 DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
74 DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
75 DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
76
77 DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
78 typedef struct IDirectSound *LPDIRECTSOUND,**LPLPDIRECTSOUND;
79
80 DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
81 typedef struct IDirectSound8 *LPDIRECTSOUND8,**LPLPDIRECTSOUND8;
82
83 DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
84 typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
85
86 DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
87 typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
88
89 DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
90 typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY;
91 #define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
92
93 DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
94 typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER;
95
96 DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
97 typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER;
98
99 DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
100 typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE;
101 #define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
102 typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
103
104 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
105 typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
106
107 DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
108 typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
109
110 DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
111 typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX;
112 #define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
113
114 DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
115 DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
116 DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
117 DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
118
119 DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
120
121 #define _FACDS 0x878
122 #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
123
124 #define DS_OK 0
125 #define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
126 #define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20)
127 #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
128 #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
129 #define DSERR_INVALIDPARAM E_INVALIDARG
130 #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
131 #define DSERR_GENERIC E_FAIL
132 #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
133 #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
134 #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
135 #define DSERR_UNSUPPORTED E_NOTIMPL
136 #define DSERR_NODRIVER MAKE_DSHRESULT(120)
137 #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
138 #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
139 #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
140 #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
141 #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
142 #define DSERR_NOINTERFACE E_NOINTERFACE
143 #define DSERR_ACCESSDENIED E_ACCESSDENIED
144 #define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
145 #define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
146 #define DSERR_SENDLOOP MAKE_DSHRESULT(200)
147 #define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
148 #define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
149 #define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
150
151 #define DSCAPS_PRIMARYMONO 0x00000001
152 #define DSCAPS_PRIMARYSTEREO 0x00000002
153 #define DSCAPS_PRIMARY8BIT 0x00000004
154 #define DSCAPS_PRIMARY16BIT 0x00000008
155 #define DSCAPS_CONTINUOUSRATE 0x00000010
156 #define DSCAPS_EMULDRIVER 0x00000020
157 #define DSCAPS_CERTIFIED 0x00000040
158 #define DSCAPS_SECONDARYMONO 0x00000100
159 #define DSCAPS_SECONDARYSTEREO 0x00000200
160 #define DSCAPS_SECONDARY8BIT 0x00000400
161 #define DSCAPS_SECONDARY16BIT 0x00000800
162
163 #define DSSCL_NORMAL 1
164 #define DSSCL_PRIORITY 2
165 #define DSSCL_EXCLUSIVE 3
166 #define DSSCL_WRITEPRIMARY 4
167
168 typedef struct _DSCAPS
169 {
170 DWORD dwSize;
171 DWORD dwFlags;
172 DWORD dwMinSecondarySampleRate;
173 DWORD dwMaxSecondarySampleRate;
174 DWORD dwPrimaryBuffers;
175 DWORD dwMaxHwMixingAllBuffers;
176 DWORD dwMaxHwMixingStaticBuffers;
177 DWORD dwMaxHwMixingStreamingBuffers;
178 DWORD dwFreeHwMixingAllBuffers;
179 DWORD dwFreeHwMixingStaticBuffers;
180 DWORD dwFreeHwMixingStreamingBuffers;
181 DWORD dwMaxHw3DAllBuffers;
182 DWORD dwMaxHw3DStaticBuffers;
183 DWORD dwMaxHw3DStreamingBuffers;
184 DWORD dwFreeHw3DAllBuffers;
185 DWORD dwFreeHw3DStaticBuffers;
186 DWORD dwFreeHw3DStreamingBuffers;
187 DWORD dwTotalHwMemBytes;
188 DWORD dwFreeHwMemBytes;
189 DWORD dwMaxContigFreeHwMemBytes;
190 DWORD dwUnlockTransferRateHwBuffers;
191 DWORD dwPlayCpuOverheadSwBuffers;
192 DWORD dwReserved1;
193 DWORD dwReserved2;
194 } DSCAPS,*LPDSCAPS;
195 typedef const DSCAPS *LPCDSCAPS;
196
197 #define DSBPLAY_LOOPING 0x00000001
198 #define DSBPLAY_LOCHARDWARE 0x00000002
199 #define DSBPLAY_LOCSOFTWARE 0x00000004
200 #define DSBPLAY_TERMINATEBY_TIME 0x00000008
201 #define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
202 #define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
203
204 #define DSBSTATUS_PLAYING 0x00000001
205 #define DSBSTATUS_BUFFERLOST 0x00000002
206 #define DSBSTATUS_LOOPING 0x00000004
207 #define DSBSTATUS_LOCHARDWARE 0x00000008
208 #define DSBSTATUS_LOCSOFTWARE 0x00000010
209 #define DSBSTATUS_TERMINATED 0x00000020
210
211 #define DSBLOCK_FROMWRITECURSOR 0x00000001
212 #define DSBLOCK_ENTIREBUFFER 0x00000002
213
214 #define DSBCAPS_PRIMARYBUFFER 0x00000001
215 #define DSBCAPS_STATIC 0x00000002
216 #define DSBCAPS_LOCHARDWARE 0x00000004
217 #define DSBCAPS_LOCSOFTWARE 0x00000008
218 #define DSBCAPS_CTRL3D 0x00000010
219 #define DSBCAPS_CTRLFREQUENCY 0x00000020
220 #define DSBCAPS_CTRLPAN 0x00000040
221 #define DSBCAPS_CTRLVOLUME 0x00000080
222 #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
223 #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
224 #define DSBCAPS_CTRLFX 0x00000200
225 #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
226 #define DSBCAPS_STICKYFOCUS 0x00004000
227 #define DSBCAPS_GLOBALFOCUS 0x00008000
228 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
229 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
230 #define DSBCAPS_LOCDEFER 0x00040000
231
232 #define DSBSIZE_MIN 4
233 #define DSBSIZE_MAX 0xFFFFFFF
234 #define DSBPAN_LEFT -10000
235 #define DSBPAN_CENTER 0
236 #define DSBPAN_RIGHT 10000
237 #define DSBVOLUME_MAX 0
238 #define DSBVOLUME_MIN -10000
239 #define DSBFREQUENCY_MIN 100
240 #define DSBFREQUENCY_MAX 200000
241 #define DSBFREQUENCY_ORIGINAL 0
242
243 typedef struct _DSBCAPS
244 {
245 DWORD dwSize;
246 DWORD dwFlags;
247 DWORD dwBufferBytes;
248 DWORD dwUnlockTransferRate;
249 DWORD dwPlayCpuOverhead;
250 } DSBCAPS,*LPDSBCAPS;
251 typedef const DSBCAPS *LPCDSBCAPS;
252
253 #define DSSCL_NORMAL 1
254 #define DSSCL_PRIORITY 2
255 #define DSSCL_EXCLUSIVE 3
256 #define DSSCL_WRITEPRIMARY 4
257
258 typedef struct _DSEFFECTDESC
259 {
260 DWORD dwSize;
261 DWORD dwFlags;
262 GUID guidDSFXClass;
263 DWORD_PTR dwReserved1;
264 DWORD_PTR dwReserved2;
265 } DSEFFECTDESC,*LPDSEFFECTDESC;
266 typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
267
268 #define DSFX_LOCHARDWARE 0x00000001
269 #define DSFX_LOCSOFTWARE 0x00000002
270
271 enum
272 {
273 DSFXR_PRESENT,
274 DSFXR_LOCHARDWARE,
275 DSFXR_LOCSOFTWARE,
276 DSFXR_UNALLOCATED,
277 DSFXR_FAILED,
278 DSFXR_UNKNOWN,
279 DSFXR_SENDLOOP
280 };
281
282 typedef struct _DSBUFFERDESC1
283 {
284 DWORD dwSize;
285 DWORD dwFlags;
286 DWORD dwBufferBytes;
287 DWORD dwReserved;
288 LPWAVEFORMATEX lpwfxFormat;
289 } DSBUFFERDESC1,*LPDSBUFFERDESC1;
290 typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
291
292 typedef struct _DSBUFFERDESC
293 {
294 DWORD dwSize;
295 DWORD dwFlags;
296 DWORD dwBufferBytes;
297 DWORD dwReserved;
298 LPWAVEFORMATEX lpwfxFormat;
299 GUID guid3DAlgorithm;
300 } DSBUFFERDESC,*LPDSBUFFERDESC;
301 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
302
303 typedef struct _DSBPOSITIONNOTIFY
304 {
305 DWORD dwOffset;
306 HANDLE hEventNotify;
307 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
308 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
309
310 #define DSSPEAKER_HEADPHONE 1
311 #define DSSPEAKER_MONO 2
312 #define DSSPEAKER_QUAD 3
313 #define DSSPEAKER_STEREO 4
314 #define DSSPEAKER_SURROUND 5
315 #define DSSPEAKER_5POINT1 6
316 #define DSSPEAKER_7POINT1 7
317
318 #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
319 #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
320 #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
321 #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
322
323 #define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
324 #define DSSPEAKER_CONFIG(a) ((BYTE)(a))
325 #define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
326
327 #define DS_CERTIFIED 0x00000000
328 #define DS_UNCERTIFIED 0x00000001
329
330 typedef struct _DSCEFFECTDESC
331 {
332 DWORD dwSize;
333 DWORD dwFlags;
334 GUID guidDSCFXClass;
335 GUID guidDSCFXInstance;
336 DWORD dwReserved1;
337 DWORD dwReserved2;
338 } DSCEFFECTDESC, *LPDSCEFFECTDESC;
339 typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
340
341 #define DSCFX_LOCHARDWARE 0x00000001
342 #define DSCFX_LOCSOFTWARE 0x00000002
343
344 #define DSCFXR_LOCHARDWARE 0x00000010
345 #define DSCFXR_LOCSOFTWARE 0x00000020
346
347 typedef struct _DSCBUFFERDESC1
348 {
349 DWORD dwSize;
350 DWORD dwFlags;
351 DWORD dwBufferBytes;
352 DWORD dwReserved;
353 LPWAVEFORMATEX lpwfxFormat;
354 } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
355
356 typedef struct _DSCBUFFERDESC
357 {
358 DWORD dwSize;
359 DWORD dwFlags;
360 DWORD dwBufferBytes;
361 DWORD dwReserved;
362 LPWAVEFORMATEX lpwfxFormat;
363 DWORD dwFXCount;
364 LPDSCEFFECTDESC lpDSCFXDesc;
365 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
366 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
367
368 typedef struct _DSCCAPS
369 {
370 DWORD dwSize;
371 DWORD dwFlags;
372 DWORD dwFormats;
373 DWORD dwChannels;
374 } DSCCAPS, *LPDSCCAPS;
375 typedef const DSCCAPS *LPCDSCCAPS;
376
377 typedef struct _DSCBCAPS
378 {
379 DWORD dwSize;
380 DWORD dwFlags;
381 DWORD dwBufferBytes;
382 DWORD dwReserved;
383 } DSCBCAPS, *LPDSCBCAPS;
384 typedef const DSCBCAPS *LPCDSCBCAPS;
385
386 #define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
387 #define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
388 #define DSCCAPS_MULTIPLECAPTURE 0x00000001
389
390 #define DSCBCAPS_WAVEMAPPED 0x80000000
391 #define DSCBCAPS_CTRLFX 0x00000200
392
393 #define DSCBLOCK_ENTIREBUFFER 0x00000001
394 #define DSCBSTART_LOOPING 0x00000001
395 #define DSCBPN_OFFSET_STOP 0xffffffff
396
397 #define DSCBSTATUS_CAPTURING 0x00000001
398 #define DSCBSTATUS_LOOPING 0x00000002
399
400 #ifndef __LPCGUID_DEFINED__
401 #define __LPCGUID_DEFINED__
402 typedef const GUID *LPCGUID;
403 #endif
404
405 typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
406 typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
407
408 extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
409 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
410 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
411
412 extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
413 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
414 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
415
416 extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
417 extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
418 extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
419 LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
420 LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
421 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
422 extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
423
424
425 /*****************************************************************************
426 * IDirectSound interface
427 */
428 #undef INTERFACE
429 #define INTERFACE IDirectSound
430 DECLARE_INTERFACE_(IDirectSound,IUnknown)
431 {
432 /*** IUnknown methods ***/
433 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
434 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
435 STDMETHOD_(ULONG,Release)(THIS) PURE;
436 /*** IDirectSound methods ***/
437 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
438 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
439 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
440 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
441 STDMETHOD(Compact)(THIS) PURE;
442 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
443 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
444 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
445 };
446 #undef INTERFACE
447
448 #if !defined(__cplusplus) || defined(CINTERFACE)
449 /*** IUnknown methods ***/
450 #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
451 #define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
452 #define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
453 /*** IDirectSound methods ***/
454 #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
455 #define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
456 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
457 #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
458 #define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
459 #define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
460 #define IDirectSound_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
461 #define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
462 #else
463 /*** IUnknown methods ***/
464 #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
465 #define IDirectSound_AddRef(p) (p)->AddRef()
466 #define IDirectSound_Release(p) (p)->Release()
467 /*** IDirectSound methods ***/
468 #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
469 #define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
470 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
471 #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
472 #define IDirectSound_Compact(p) (p)->Compact()
473 #define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
474 #define IDirectSound_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
475 #define IDirectSound_Initialize(p,a) (p)->Initialize(a)
476 #endif
477
478
479 /*****************************************************************************
480 * IDirectSound8 interface
481 */
482 #define INTERFACE IDirectSound8
483 DECLARE_INTERFACE_(IDirectSound8,IUnknown)
484 {
485 /*** IUnknown methods ***/
486 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
487 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
488 STDMETHOD_(ULONG,Release)(THIS) PURE;
489 /*** IDirectSound8 methods ***/
490 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
491 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
492 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
493 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
494 STDMETHOD(Compact)(THIS) PURE;
495 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
496 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
497 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
498 STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
499 };
500 #undef INTERFACE
501
502 #if !defined(__cplusplus) || defined(CINTERFACE)
503 /*** IUnknown methods ***/
504 #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
505 #define IDirectSound8_AddRef(p) (p)->lpVtbl->AddRef(p)
506 #define IDirectSound8_Release(p) (p)->lpVtbl->Release(p)
507 /*** IDirectSound methods ***/
508 #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
509 #define IDirectSound8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
510 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
511 #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
512 #define IDirectSound8_Compact(p) (p)->lpVtbl->Compact(p)
513 #define IDirectSound8_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
514 #define IDirectSound8_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
515 #define IDirectSound8_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
516 /*** IDirectSound8 methods ***/
517 #define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a)
518 #else
519 /*** IUnknown methods ***/
520 #define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
521 #define IDirectSound8_AddRef(p) (p)->AddRef()
522 #define IDirectSound8_Release(p) (p)->Release()
523 /*** IDirectSound methods ***/
524 #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
525 #define IDirectSound8_GetCaps(p,a) (p)->GetCaps(a)
526 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
527 #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
528 #define IDirectSound8_Compact(p) (p)->Compact()
529 #define IDirectSound8_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
530 #define IDirectSound8_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
531 #define IDirectSound8_Initialize(p,a) (p)->Initialize(a)
532 /*** IDirectSound8 methods ***/
533 #define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
534 #endif
535
536
537 /*****************************************************************************
538 * IDirectSoundBuffer interface
539 */
540 #define INTERFACE IDirectSoundBuffer
541 DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)
542 {
543 /*** IUnknown methods ***/
544 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
545 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
546 STDMETHOD_(ULONG,Release)(THIS) PURE;
547 /*** IDirectSoundBuffer methods ***/
548 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
549 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
550 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
551 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
552 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
553 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
554 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
555 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
556 STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
557 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
558 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
559 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
560 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
561 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
562 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
563 STDMETHOD(Stop)(THIS) PURE;
564 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE;
565 STDMETHOD(Restore)(THIS) PURE;
566 };
567 #undef INTERFACE
568
569 #if !defined(__cplusplus) || defined(CINTERFACE)
570 /*** IUnknown methods ***/
571 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
572 #define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
573 #define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
574 /*** IDirectSoundBuffer methods ***/
575 #define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
576 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
577 #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
578 #define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
579 #define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
580 #define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
581 #define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
582 #define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
583 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
584 #define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
585 #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
586 #define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
587 #define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
588 #define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
589 #define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
590 #define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
591 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
592 #define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
593 #else
594 /*** IUnknown methods ***/
595 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
596 #define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
597 #define IDirectSoundBuffer_Release(p) (p)->Release()
598 /*** IDirectSoundBuffer methods ***/
599 #define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
600 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
601 #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
602 #define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
603 #define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
604 #define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
605 #define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
606 #define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
607 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
608 #define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
609 #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
610 #define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
611 #define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
612 #define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
613 #define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
614 #define IDirectSoundBuffer_Stop(p) (p)->Stop()
615 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
616 #define IDirectSoundBuffer_Restore(p) (p)->Restore()
617 #endif
618
619
620 /*****************************************************************************
621 * IDirectSoundBuffer8 interface
622 */
623 #define INTERFACE IDirectSoundBuffer8
624 DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
625 {
626 /*** IUnknown methods ***/
627 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
628 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
629 STDMETHOD_(ULONG,Release)(THIS) PURE;
630 /*** IDirectSoundBuffer8 methods ***/
631 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
632 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
633 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
634 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
635 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
636 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
637 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
638 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
639 STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
640 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
641 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
642 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
643 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
644 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
645 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
646 STDMETHOD(Stop)(THIS) PURE;
647 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE;
648 STDMETHOD(Restore)(THIS) PURE;
649 STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
650 STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
651 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
652 };
653 #undef INTERFACE
654
655 #if !defined(__cplusplus) || defined(CINTERFACE)
656 /*** IUnknown methods ***/
657 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
658 #define IDirectSoundBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
659 #define IDirectSoundBuffer8_Release(p) (p)->lpVtbl->Release(p)
660 /*** IDirectSoundBuffer methods ***/
661 #define IDirectSoundBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
662 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
663 #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
664 #define IDirectSoundBuffer8_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
665 #define IDirectSoundBuffer8_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
666 #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
667 #define IDirectSoundBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
668 #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
669 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
670 #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
671 #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
672 #define IDirectSoundBuffer8_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
673 #define IDirectSoundBuffer8_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
674 #define IDirectSoundBuffer8_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
675 #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
676 #define IDirectSoundBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
677 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
678 #define IDirectSoundBuffer8_Restore(p) (p)->lpVtbl->Restore(p)
679 /*** IDirectSoundBuffer8 methods ***/
680 #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c)
681 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c)
682 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
683 #else
684 /*** IUnknown methods ***/
685 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
686 #define IDirectSoundBuffer8_AddRef(p) (p)->AddRef()
687 #define IDirectSoundBuffer8_Release(p) (p)->Release()
688 /*** IDirectSoundBuffer methods ***/
689 #define IDirectSoundBuffer8_GetCaps(p,a) (p)->GetCaps(a)
690 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
691 #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
692 #define IDirectSoundBuffer8_GetVolume(p,a) (p)->GetVolume(a)
693 #define IDirectSoundBuffer8_GetPan(p,a) (p)->GetPan(a)
694 #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->GetFrequency(a)
695 #define IDirectSoundBuffer8_GetStatus(p,a) (p)->GetStatus(a)
696 #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
697 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
698 #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->Play(a,b,c)
699 #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
700 #define IDirectSoundBuffer8_SetFormat(p,a) (p)->SetFormat(a)
701 #define IDirectSoundBuffer8_SetVolume(p,a) (p)->SetVolume(a)
702 #define IDirectSoundBuffer8_SetPan(p,a) (p)->SetPan(a)
703 #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->SetFrequency(a)
704 #define IDirectSoundBuffer8_Stop(p) (p)->Stop()
705 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
706 #define IDirectSoundBuffer8_Restore(p) (p)->Restore()
707 /*** IDirectSoundBuffer8 methods ***/
708 #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
709 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
710 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
711 #endif
712
713
714 /*****************************************************************************
715 * IDirectSoundCapture interface
716 */
717 #define INTERFACE IDirectSoundCapture
718 DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
719 {
720 /*** IUnknown methods ***/
721 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
722 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
723 STDMETHOD_(ULONG,Release)(THIS) PURE;
724 /*** IDirectSoundCapture methods ***/
725 STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
726 STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
727 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
728 };
729 #undef INTERFACE
730
731 #if !defined(__cplusplus) || defined(CINTERFACE)
732 /*** IUnknown methods ***/
733 #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
734 #define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
735 #define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
736 /*** IDirectSoundCapture methods ***/
737 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
738 #define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
739 #define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
740 #else
741 /*** IUnknown methods ***/
742 #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
743 #define IDirectSoundCapture_AddRef(p) (p)->AddRef()
744 #define IDirectSoundCapture_Release(p) (p)->Release()
745 /*** IDirectSoundCapture methods ***/
746 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
747 #define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
748 #define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
749 #endif
750
751 /*****************************************************************************
752 * IDirectSoundCaptureBuffer interface
753 */
754 #define INTERFACE IDirectSoundCaptureBuffer
755 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)
756 {
757 /*** IUnknown methods ***/
758 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
759 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
760 STDMETHOD_(ULONG,Release)(THIS) PURE;
761 /*** IDirectSoundCaptureBuffer methods ***/
762 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
763 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
764 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
765 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
766 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
767 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
768 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
769 STDMETHOD(Stop)(THIS) PURE;
770 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
771 };
772 #undef INTERFACE
773
774 #if !defined(__cplusplus) || defined(CINTERFACE)
775 /*** IUnknown methods ***/
776 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
777 #define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
778 #define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
779 /*** IDirectSoundCaptureBuffer methods ***/
780 #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
781 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
782 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
783 #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
784 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
785 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
786 #define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
787 #define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
788 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
789 #else
790 /*** IUnknown methods ***/
791 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
792 #define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
793 #define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
794 /*** IDirectSoundCaptureBuffer methods ***/
795 #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
796 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
797 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
798 #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
799 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
800 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
801 #define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
802 #define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
803 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
804 #endif
805
806 /*****************************************************************************
807 * IDirectSoundCaptureBuffer8 interface
808 */
809 #define INTERFACE IDirectSoundCaptureBuffer8
810 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
811 {
812 /*** IUnknown methods ***/
813 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
814 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
815 STDMETHOD_(ULONG,Release)(THIS) PURE;
816 /*** IDirectSoundCaptureBuffer methods ***/
817 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
818 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
819 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
820 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
821 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
822 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
823 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
824 STDMETHOD(Stop)(THIS) PURE;
825 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
826 /*** IDirectSoundCaptureBuffer8 methods ***/
827 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
828 STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
829 };
830 #undef INTERFACE
831
832 #if !defined(__cplusplus) || defined(CINTERFACE)
833 /*** IUnknown methods ***/
834 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
835 #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
836 #define IDirectSoundCaptureBuffer8_Release(p) (p)->lpVtbl->Release(p)
837 /*** IDirectSoundCaptureBuffer methods ***/
838 #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
839 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
840 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
841 #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
842 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
843 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
844 #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->lpVtbl->Start(p,a)
845 #define IDirectSoundCaptureBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
846 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
847 /*** IDirectSoundCaptureBuffer8 methods ***/
848 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
849 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b)
850 #else
851 /*** IUnknown methods ***/
852 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
853 #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->AddRef()
854 #define IDirectSoundCaptureBuffer8_Release(p) (p)->Release()
855 /*** IDirectSoundCaptureBuffer methods ***/
856 #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->GetCaps(a)
857 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
858 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
859 #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->GetStatus(a)
860 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
861 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
862 #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->Start(a)
863 #define IDirectSoundCaptureBuffer8_Stop(p) (p)->Stop()
864 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
865 /*** IDirectSoundCaptureBuffer8 methods ***/
866 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
867 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
868 #endif
869
870 /*****************************************************************************
871 * IDirectSoundNotify interface
872 */
873 #define WINE_NOBUFFER 0x80000000
874
875 #define DSBPN_OFFSETSTOP -1
876
877 #define INTERFACE IDirectSoundNotify
878 DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
879 {
880 /*** IUnknown methods ***/
881 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
882 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
883 STDMETHOD_(ULONG,Release)(THIS) PURE;
884 /*** IDirectSoundNotify methods ***/
885 STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
886 };
887 #undef INTERFACE
888
889 #if !defined(__cplusplus) || defined(CINTERFACE)
890 /*** IUnknown methods ***/
891 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
892 #define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
893 #define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
894 /*** IDirectSoundNotify methods ***/
895 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
896 #else
897 /*** IUnknown methods ***/
898 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
899 #define IDirectSoundNotify_AddRef(p) (p)->AddRef()
900 #define IDirectSoundNotify_Release(p) (p)->Release()
901 /*** IDirectSoundNotify methods ***/
902 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
903 #endif
904
905
906 /*****************************************************************************
907 * IDirectSound3DListener interface
908 */
909 #define DS3DMODE_NORMAL 0x00000000
910 #define DS3DMODE_HEADRELATIVE 0x00000001
911 #define DS3DMODE_DISABLE 0x00000002
912
913 #define DS3D_IMMEDIATE 0x00000000
914 #define DS3D_DEFERRED 0x00000001
915
916 #define DS3D_MINDISTANCEFACTOR FLT_MIN
917 #define DS3D_MAXDISTANCEFACTOR FLT_MAX
918 #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
919
920 #define DS3D_MINROLLOFFFACTOR 0.0f
921 #define DS3D_MAXROLLOFFFACTOR 10.0f
922 #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
923
924 #define DS3D_MINDOPPLERFACTOR 0.0f
925 #define DS3D_MAXDOPPLERFACTOR 10.0f
926 #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
927
928 #define DS3D_DEFAULTMINDISTANCE 1.0f
929 #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
930
931 #define DS3D_MINCONEANGLE 0
932 #define DS3D_MAXCONEANGLE 360
933 #define DS3D_DEFAULTCONEANGLE 360
934
935 #define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
936
937 typedef struct _DS3DLISTENER {
938 DWORD dwSize;
939 D3DVECTOR vPosition;
940 D3DVECTOR vVelocity;
941 D3DVECTOR vOrientFront;
942 D3DVECTOR vOrientTop;
943 D3DVALUE flDistanceFactor;
944 D3DVALUE flRolloffFactor;
945 D3DVALUE flDopplerFactor;
946 } DS3DLISTENER, *LPDS3DLISTENER;
947
948 typedef const DS3DLISTENER *LPCDS3DLISTENER;
949
950 #define INTERFACE IDirectSound3DListener
951 DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
952 {
953 /*** IUnknown methods ***/
954 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
955 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
956 STDMETHOD_(ULONG,Release)(THIS) PURE;
957 /*** IDirectSound3DListener methods ***/
958 STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
959 STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
960 STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
961 STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
962 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
963 STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
964 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
965 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
966 STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
967 STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
968 STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
969 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
970 STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
971 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
972 STDMETHOD(CommitDeferredSettings)(THIS) PURE;
973 };
974 #undef INTERFACE
975
976 #if !defined(__cplusplus) || defined(CINTERFACE)
977 /*** IUnknown methods ***/
978 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
979 #define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
980 #define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
981 /*** IDirectSound3DListener methods ***/
982 #define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
983 #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
984 #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
985 #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
986 #define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
987 #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
988 #define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
989 #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
990 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
991 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
992 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
993 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
994 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
995 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
996 #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
997 #else
998 /*** IUnknown methods ***/
999 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1000 #define IDirectSound3DListener_AddRef(p) (p)->AddRef()
1001 #define IDirectSound3DListener_Release(p) (p)->Release()
1002 /*** IDirectSound3DListener methods ***/
1003 #define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
1004 #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
1005 #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
1006 #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
1007 #define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
1008 #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
1009 #define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
1010 #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1011 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
1012 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
1013 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
1014 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1015 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
1016 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
1017 #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
1018 #endif
1019
1020
1021 /*****************************************************************************
1022 * IDirectSound3DBuffer interface
1023 */
1024 typedef struct _DS3DBUFFER {
1025 DWORD dwSize;
1026 D3DVECTOR vPosition;
1027 D3DVECTOR vVelocity;
1028 DWORD dwInsideConeAngle;
1029 DWORD dwOutsideConeAngle;
1030 D3DVECTOR vConeOrientation;
1031 LONG lConeOutsideVolume;
1032 D3DVALUE flMinDistance;
1033 D3DVALUE flMaxDistance;
1034 DWORD dwMode;
1035 } DS3DBUFFER, *LPDS3DBUFFER;
1036
1037 typedef const DS3DBUFFER *LPCDS3DBUFFER;
1038
1039 #define INTERFACE IDirectSound3DBuffer
1040 DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
1041 {
1042 /*** IUnknown methods ***/
1043 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1044 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1045 STDMETHOD_(ULONG,Release)(THIS) PURE;
1046 /*** IDirectSound3DBuffer methods ***/
1047 STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
1048 STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
1049 STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
1050 STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
1051 STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
1052 STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
1053 STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
1054 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
1055 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
1056 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
1057 STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
1058 STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1059 STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
1060 STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
1061 STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
1062 STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
1063 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1064 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1065 };
1066 #undef INTERFACE
1067
1068 #if !defined(__cplusplus) || defined(CINTERFACE)
1069 /*** IUnknown methods ***/
1070 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1071 #define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
1072 #define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
1073 /*** IDirectSound3DBuffer methods ***/
1074 #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1075 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
1076 #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
1077 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
1078 #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
1079 #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
1080 #define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
1081 #define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
1082 #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
1083 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
1084 #define IDirectSound3DBuffer_SetConeAngles(p,a,b) (p)->lpVtbl->SetConeAngles(p,a,b)
1085 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
1086 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
1087 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
1088 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
1089 #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
1090 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
1091 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
1092 #else
1093 /*** IUnknown methods ***/
1094 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1095 #define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
1096 #define IDirectSound3DBuffer_Release(p) (p)->Release()
1097 /*** IDirectSound3DBuffer methods ***/
1098 #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
1099 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
1100 #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
1101 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
1102 #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
1103 #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
1104 #define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
1105 #define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
1106 #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
1107 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1108 #define IDirectSound3DBuffer_SetConeAngles(p,a,b) (p)->SetConeAngles(a,b)
1109 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
1110 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
1111 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
1112 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
1113 #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
1114 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1115 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
1116 #endif
1117
1118 /*****************************************************************************
1119 * IKsPropertySet interface
1120 */
1121 #ifndef _IKsPropertySet_
1122 #define _IKsPropertySet_
1123
1124 typedef struct IKsPropertySet *LPKSPROPERTYSET;
1125
1126 DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
1127
1128 #define KSPROPERTY_SUPPORT_GET 1
1129 #define KSPROPERTY_SUPPORT_SET 2
1130
1131 #define INTERFACE IKsPropertySet
1132 DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
1133 {
1134 /*** IUnknown methods ***/
1135 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1136 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1137 STDMETHOD_(ULONG,Release)(THIS) PURE;
1138 /*** IKsPropertySet methods ***/
1139 STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
1140 STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
1141 STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
1142 };
1143 #undef INTERFACE
1144
1145 #if !defined(__cplusplus) || defined(CINTERFACE)
1146 /*** IUnknown methods ***/
1147 #define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1148 #define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
1149 #define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
1150 /*** IKsPropertySet methods ***/
1151 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
1152 #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
1153 #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
1154 #else
1155 /*** IUnknown methods ***/
1156 #define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1157 #define IKsPropertySet_AddRef(p) (p)->AddRef()
1158 #define IKsPropertySet_Release(p) (p)->Release()
1159 /*** IKsPropertySet methods ***/
1160 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
1161 #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
1162 #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
1163 #endif
1164
1165 #endif /* _IKsPropertySet_ */
1166
1167 /*****************************************************************************
1168 * IDirectSoundFullDuplex interface
1169 */
1170 #define INTERFACE IDirectSoundFullDuplex
1171 DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
1172 {
1173 /*** IUnknown methods ***/
1174 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1175 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1176 STDMETHOD_(ULONG,Release)(THIS) PURE;
1177 /*** IDirectSoundFullDuplex methods ***/
1178 STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
1179 };
1180 #undef INTERFACE
1181
1182 #if !defined(__cplusplus) || defined(CINTERFACE)
1183 /*** IUnknown methods ***/
1184 #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1185 #define IDirectSoundFullDuplex_AddRef(p) (p)->lpVtbl->AddRef(p)
1186 #define IDirectSoundFullDuplex_Release(p) (p)->lpVtbl->Release(p)
1187 /*** IDirectSoundFullDuplex methods ***/
1188 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
1189 #else
1190 /*** IUnknown methods ***/
1191 #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1192 #define IDirectSoundFullDuplex_AddRef(p) (p)->AddRef()
1193 #define IDirectSoundFullDuplex_Release(p) (p)->Release()
1194 /*** IDirectSoundFullDuplex methods ***/
1195 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
1196 #endif
1197
1198 #ifdef __cplusplus
1199 } /* extern "C" */
1200 #endif /* defined(__cplusplus) */
1201
1202 #endif /* __WINE_DSOUND_H */