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