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