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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #include <_mingw_unicode.h>
20 #undef INTERFACE
21
22 #ifndef __DSOUND_INCLUDED__
23 #define __DSOUND_INCLUDED__
24
25 #ifndef DIRECTSOUND_VERSION
26 #define DIRECTSOUND_VERSION 0x0900
27 #endif
28
29 #define COM_NO_WINDOWS_H
30 #include <objbase.h>
31 #include <float.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* defined(__cplusplus) */
36
37 #ifndef DX_SHARED_DEFINES
38
39 typedef float D3DVALUE, *LPD3DVALUE;
40
41 #ifndef D3DCOLOR_DEFINED
42 typedef DWORD D3DCOLOR, *LPD3DCOLOR;
43 #define D3DCOLOR_DEFINED
44 #endif
45
46 #ifndef D3DVECTOR_DEFINED
47 typedef struct _D3DVECTOR {
48 float x;
49 float y;
50 float z;
51 } D3DVECTOR;
52 #define D3DVECTOR_DEFINED
53 #endif
54
55 #ifndef LPD3DVECTOR_DEFINED
56 typedef D3DVECTOR *LPD3DVECTOR;
57 #define LPD3DVECTOR_DEFINED
58 #endif
59
60 #define DX_SHARED_DEFINES
61 #endif /* DX_SHARED_DEFINES */
62
63 /*****************************************************************************
64 * Predeclare the interfaces
65 */
66 DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
67 DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
68 DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
69 DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
70 DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
71
72 DEFINE_GUID(IID_IDirectSound, 0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
73 typedef struct IDirectSound *LPDIRECTSOUND,**LPLPDIRECTSOUND;
74
75 DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
76 typedef struct IDirectSound8 *LPDIRECTSOUND8,**LPLPDIRECTSOUND8;
77
78 DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
79 typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
80
81 DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
82 typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
83
84 DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
85 typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY,**LPLPDIRECTSOUNDNOTIFY;
86 #define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
87
88 DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
89 typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER,**LPLPDIRECTSOUND3DLISTENER;
90
91 DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
92 typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER,**LPLPDIRECTSOUND3DBUFFER;
93
94 DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
95 typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE,**LPLPDIRECTSOUNDCAPTURE;
96 #define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
97 typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
98
99 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
100 typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
101
102 DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
103 typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
104
105 DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
106 typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX,**LPLPDIRECTSOUNDFULLDUPLEX;
107 #define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
108
109 DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
110 typedef struct IDirectSoundFXI3DL2Reverb *LPDIRECTSOUNDFXI3DL2REVERB;
111 #define IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb
112 #define IID_IDirectSoundFXI3DL2Reverb8 IID_IDirectSoundFXI3DL2Reverb
113 typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8;
114
115 DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
116 DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
117 DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
118 DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
119
120 #define DS3DALG_DEFAULT GUID_NULL
121 DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
122 DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
123 DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342,0x1c1b,0x11d2,0x94,0xf5,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
124
125 DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xDAFD8210,0x5711,0x4B91,0x9F,0xE3,0xF7,0x5B,0x7A,0xE2,0x79,0xBF);
126 DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xEFE6629C,0x81F7,0x4281,0xBD,0x91,0xC9,0xD6,0x04,0xA9,0x5A,0xF6);
127 DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xEFCA3D92,0xDFD8,0x4672,0xA6,0x03,0x74,0x20,0x89,0x4B,0xAD,0x98);
128 DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xEF3E932C,0xD40B,0x4F51,0x8C,0xCF,0x3F,0x98,0xF1,0xB2,0x9D,0x5D);
129 DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xEF114C90,0xCD1D,0x484E,0x96,0xE5,0x09,0xCF,0xAF,0x91,0x2A,0x21);
130 DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xEF011F79,0x4000,0x406D,0x87,0xAF,0xBF,0xFB,0x3F,0xC3,0x9D,0x57);
131 DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120CED89,0x3BF4,0x4173,0xA1,0x32,0x3C,0xB4,0x06,0xCF,0x32,0x31);
132 DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xEF985E71,0xD5C7,0x42D4,0xBA,0x4D,0x2D,0x07,0x3E,0x2E,0x96,0xF4);
133 DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87FC0268,0x9A55,0x4360,0x95,0xAA,0x00,0x4A,0x1D,0x9D,0xE2,0x6C);
134 DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1);
135 DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xCDEBB919,0x379A,0x488A,0x87,0x65,0xF5,0x3C,0xFD,0x36,0xDE,0x40);
136 DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1C22C56D,0x9879,0x4F5B,0xA3,0x89,0x27,0x99,0x6D,0xDC,0x28,0x10);
137 DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xE07F903F,0x62FD,0x4E60,0x8C,0xDD,0xDE,0xA7,0x23,0x66,0x65,0xB5);
138 DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11C5C73B,0x66E9,0x4BA1,0xA0,0xBA,0xE8,0x14,0xC6,0xEE,0xD9,0x2D);
139 DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5AB0882E,0x7274,0x4516,0x87,0x7D,0x4E,0xEE,0x99,0xBA,0x4F,0xD0);
140
141 DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352,0xd622,0x11ce,0xaa,0xc5,0x00,0x20,0xaf,0x0b,0x99,0xa3);
142 #define IDirectSoundFXGargle8 IDirectSoundFXGargle
143 typedef struct IDirectSoundFXGargle8 *LPDIRECTSOUNDFXGARGLE8;
144 #define IID_IDirectSoundFXGargle8 IID_IDirectSoundFXGargle
145
146 DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3,0x145f,0x43e6,0xa9,0x34,0xa7,0x18,0x06,0xe5,0x05,0x47);
147 #define IDirectSoundFXChorus8 IDirectSoundFXChorus
148 typedef struct IDirectSoundFXChorus8 *LPDIRECTSOUNDFXCHORUS8;
149 #define IID_IDirectSoundFXChorus8 IID_IDirectSoundFXChorus
150
151 DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878,0x2c92,0x4072,0x9b,0x2c,0xea,0x68,0xf5,0x39,0x67,0x83);
152 #define IDirectSoundFXFlanger8 IDirectSoundFXFlanger
153 typedef struct IDirectSoundFXFlanger8 *LPDIRECTSOUNDFXFLANGER8;
154 #define IID_IDirectSoundFXFlanger8 IID_IDirectSoundFXFlanger
155
156 DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf,0x50db,0x4e92,0xa2,0xbd,0x44,0x54,0x88, 0xd1,0xed,0x42);
157 #define IDirectSoundFXEcho8 IDirectSoundFXEcho
158 typedef struct IDirectSoundFXEcho8 *LPDIRECTSOUNDFXECHO8;
159 #define IID_IDirectSoundFXEcho8 IID_IDirectSoundFXEcho
160
161 DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326,0x455f,0x4d8b,0xbd,0xa9,0x8d,0x5d,0x3e,0x9e,0x3e,0x0b);
162 #define IDirectSoundFXDistortion8 IDirectSoundFXDistortion
163 typedef struct IDirectSoundFXDistortion8 *LPDIRECTSOUNDFXDISTORTION8;
164 #define IID_IDirectSoundFXDistortion8 IID_IDirectSoundFXDistortion
165
166 DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154,0x62f6,0x4e2c,0xa1,0x5c,0xd3,0xb6,0xc4,0x17,0xf7,0xa0);
167 #define IDirectSoundFXCompressor8 IDirectSoundFXCompressor
168 typedef struct IDirectSoundFXCompressor8 *LPDIRECTSOUNDFXCOMPRESSOR8;
169 #define IID_IDirectSoundFXCompressor8 IID_IDirectSoundFXCompressor
170
171 DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe,0xfe90,0x4204,0x80,0x78,0x82,0x33,0x4c,0xd1,0x77,0xda);
172 #define IDirectSoundFXParamEq8 IDirectSoundFXParamEq
173 typedef struct IDirectSoundFXParamEq8 *LPDIRECTSOUNDFXPARAMEQ8;
174 #define IID_IDirectSoundFXParamEq8 IID_IDirectSoundFXParamEq
175
176 DEFINE_GUID(IID_IDirectSoundFXWavesReverb, 0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
177 #define IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb
178 typedef struct IDirectSoundFXWavesReverb8 *LPDIRECTSOUNDFXWAVESREVERB8;
179 #define IID_IDirectSoundFXWavesReverb8 IID_IDirectSoundFXWavesReverb
180
181 #define _FACDS 0x878
182 #define MAKE_DSHRESULT(code) MAKE_HRESULT(1,_FACDS,code)
183
184 #define DS_OK 0
185 #define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
186 #define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20)
187 #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
188 #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
189 #define DSERR_INVALIDPARAM E_INVALIDARG
190 #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
191 #define DSERR_GENERIC E_FAIL
192 #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
193 #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
194 #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
195 #define DSERR_UNSUPPORTED E_NOTIMPL
196 #define DSERR_NODRIVER MAKE_DSHRESULT(120)
197 #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
198 #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
199 #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
200 #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
201 #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
202 #define DSERR_NOINTERFACE E_NOINTERFACE
203 #define DSERR_ACCESSDENIED E_ACCESSDENIED
204 #define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
205 #define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
206 #define DSERR_SENDLOOP MAKE_DSHRESULT(200)
207 #define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
208 #define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
209 #define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
210
211 #define DSCAPS_PRIMARYMONO 0x00000001
212 #define DSCAPS_PRIMARYSTEREO 0x00000002
213 #define DSCAPS_PRIMARY8BIT 0x00000004
214 #define DSCAPS_PRIMARY16BIT 0x00000008
215 #define DSCAPS_CONTINUOUSRATE 0x00000010
216 #define DSCAPS_EMULDRIVER 0x00000020
217 #define DSCAPS_CERTIFIED 0x00000040
218 #define DSCAPS_SECONDARYMONO 0x00000100
219 #define DSCAPS_SECONDARYSTEREO 0x00000200
220 #define DSCAPS_SECONDARY8BIT 0x00000400
221 #define DSCAPS_SECONDARY16BIT 0x00000800
222
223 #define DSSCL_NORMAL 1
224 #define DSSCL_PRIORITY 2
225 #define DSSCL_EXCLUSIVE 3
226 #define DSSCL_WRITEPRIMARY 4
227
228 typedef struct _DSCAPS
229 {
230 DWORD dwSize;
231 DWORD dwFlags;
232 DWORD dwMinSecondarySampleRate;
233 DWORD dwMaxSecondarySampleRate;
234 DWORD dwPrimaryBuffers;
235 DWORD dwMaxHwMixingAllBuffers;
236 DWORD dwMaxHwMixingStaticBuffers;
237 DWORD dwMaxHwMixingStreamingBuffers;
238 DWORD dwFreeHwMixingAllBuffers;
239 DWORD dwFreeHwMixingStaticBuffers;
240 DWORD dwFreeHwMixingStreamingBuffers;
241 DWORD dwMaxHw3DAllBuffers;
242 DWORD dwMaxHw3DStaticBuffers;
243 DWORD dwMaxHw3DStreamingBuffers;
244 DWORD dwFreeHw3DAllBuffers;
245 DWORD dwFreeHw3DStaticBuffers;
246 DWORD dwFreeHw3DStreamingBuffers;
247 DWORD dwTotalHwMemBytes;
248 DWORD dwFreeHwMemBytes;
249 DWORD dwMaxContigFreeHwMemBytes;
250 DWORD dwUnlockTransferRateHwBuffers;
251 DWORD dwPlayCpuOverheadSwBuffers;
252 DWORD dwReserved1;
253 DWORD dwReserved2;
254 } DSCAPS,*LPDSCAPS;
255 typedef const DSCAPS *LPCDSCAPS;
256
257 #define DSBPLAY_LOOPING 0x00000001
258 #define DSBPLAY_LOCHARDWARE 0x00000002
259 #define DSBPLAY_LOCSOFTWARE 0x00000004
260 #define DSBPLAY_TERMINATEBY_TIME 0x00000008
261 #define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
262 #define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
263
264 #define DSBSTATUS_PLAYING 0x00000001
265 #define DSBSTATUS_BUFFERLOST 0x00000002
266 #define DSBSTATUS_LOOPING 0x00000004
267 #define DSBSTATUS_LOCHARDWARE 0x00000008
268 #define DSBSTATUS_LOCSOFTWARE 0x00000010
269 #define DSBSTATUS_TERMINATED 0x00000020
270
271 #define DSBLOCK_FROMWRITECURSOR 0x00000001
272 #define DSBLOCK_ENTIREBUFFER 0x00000002
273
274 #define DSBCAPS_PRIMARYBUFFER 0x00000001
275 #define DSBCAPS_STATIC 0x00000002
276 #define DSBCAPS_LOCHARDWARE 0x00000004
277 #define DSBCAPS_LOCSOFTWARE 0x00000008
278 #define DSBCAPS_CTRL3D 0x00000010
279 #define DSBCAPS_CTRLFREQUENCY 0x00000020
280 #define DSBCAPS_CTRLPAN 0x00000040
281 #define DSBCAPS_CTRLVOLUME 0x00000080
282 #define DSBCAPS_CTRLDEFAULT 0x000000E0 /* Pan + volume + frequency. */
283 #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
284 #define DSBCAPS_CTRLFX 0x00000200
285 #define DSBCAPS_CTRLALL 0x000001F0 /* All control capabilities */
286 #define DSBCAPS_STICKYFOCUS 0x00004000
287 #define DSBCAPS_GLOBALFOCUS 0x00008000
288 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000 /* More accurate play cursor under emulation*/
289 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
290 #define DSBCAPS_LOCDEFER 0x00040000
291
292 #define DSBSIZE_MIN 4
293 #define DSBSIZE_MAX 0xFFFFFFF
294 #define DSBSIZE_FX_MIN 150
295 #define DSBPAN_LEFT -10000
296 #define DSBPAN_CENTER 0
297 #define DSBPAN_RIGHT 10000
298 #define DSBVOLUME_MAX 0
299 #define DSBVOLUME_MIN -10000
300 #define DSBFREQUENCY_MIN 100
301 #if (DIRECTSOUND_VERSION >= 0x0900)
302 #define DSBFREQUENCY_MAX 200000
303 #else
304 #define DSBFREQUENCY_MAX 100000
305 #endif
306 #define DSBFREQUENCY_ORIGINAL 0
307
308 #define DSBNOTIFICATIONS_MAX 100000U
309
310 typedef struct _DSBCAPS
311 {
312 DWORD dwSize;
313 DWORD dwFlags;
314 DWORD dwBufferBytes;
315 DWORD dwUnlockTransferRate;
316 DWORD dwPlayCpuOverhead;
317 } DSBCAPS,*LPDSBCAPS;
318 typedef const DSBCAPS *LPCDSBCAPS;
319
320 #define DSSCL_NORMAL 1
321 #define DSSCL_PRIORITY 2
322 #define DSSCL_EXCLUSIVE 3
323 #define DSSCL_WRITEPRIMARY 4
324
325 typedef struct _DSEFFECTDESC
326 {
327 DWORD dwSize;
328 DWORD dwFlags;
329 GUID guidDSFXClass;
330 DWORD_PTR dwReserved1;
331 DWORD_PTR dwReserved2;
332 } DSEFFECTDESC,*LPDSEFFECTDESC;
333 typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
334
335 #define DSFX_LOCHARDWARE 0x00000001
336 #define DSFX_LOCSOFTWARE 0x00000002
337
338 enum
339 {
340 DSFXR_PRESENT,
341 DSFXR_LOCHARDWARE,
342 DSFXR_LOCSOFTWARE,
343 DSFXR_UNALLOCATED,
344 DSFXR_FAILED,
345 DSFXR_UNKNOWN,
346 DSFXR_SENDLOOP
347 };
348
349 typedef struct _DSBUFFERDESC1
350 {
351 DWORD dwSize;
352 DWORD dwFlags;
353 DWORD dwBufferBytes;
354 DWORD dwReserved;
355 LPWAVEFORMATEX lpwfxFormat;
356 } DSBUFFERDESC1,*LPDSBUFFERDESC1;
357 typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
358
359 typedef struct _DSBUFFERDESC
360 {
361 DWORD dwSize;
362 DWORD dwFlags;
363 DWORD dwBufferBytes;
364 DWORD dwReserved;
365 LPWAVEFORMATEX lpwfxFormat;
366 #if (DIRECTSOUND_VERSION >= 0x0700)
367 GUID guid3DAlgorithm;
368 #endif /* DS7 */
369 } DSBUFFERDESC,*LPDSBUFFERDESC;
370 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
371
372 typedef struct _DSBPOSITIONNOTIFY
373 {
374 DWORD dwOffset;
375 HANDLE hEventNotify;
376 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
377 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
378
379 #define DSSPEAKER_DIRECTOUT 0
380 #define DSSPEAKER_HEADPHONE 1
381 #define DSSPEAKER_MONO 2
382 #define DSSPEAKER_QUAD 3
383 #define DSSPEAKER_STEREO 4
384 #define DSSPEAKER_SURROUND 5
385 #define DSSPEAKER_5POINT1 6
386 #define DSSPEAKER_5POINT1_BACK 6
387 #define DSSPEAKER_7POINT1 7
388 #define DSSPEAKER_7POINT1_WIDE 7
389 #define DSSPEAKER_7POINT1_SURROUND 8
390 #define DSSPEAKER_5POINT1_SURROUND 9
391
392 #define DSSPEAKER_GEOMETRY_MIN 0x00000005 /* 5 degrees */
393 #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A /* 10 degrees */
394 #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
395 #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
396
397 #define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
398 #define DSSPEAKER_CONFIG(a) ((BYTE)(a))
399 #define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
400
401 #define DS_CERTIFIED 0x00000000
402 #define DS_UNCERTIFIED 0x00000001
403
404 typedef struct _DSCEFFECTDESC
405 {
406 DWORD dwSize;
407 DWORD dwFlags;
408 GUID guidDSCFXClass;
409 GUID guidDSCFXInstance;
410 DWORD dwReserved1;
411 DWORD dwReserved2;
412 } DSCEFFECTDESC, *LPDSCEFFECTDESC;
413 typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
414
415 #define DSCFX_LOCHARDWARE 0x00000001
416 #define DSCFX_LOCSOFTWARE 0x00000002
417
418 #define DSCFXR_LOCHARDWARE 0x00000010
419 #define DSCFXR_LOCSOFTWARE 0x00000020
420
421 typedef struct _DSCBUFFERDESC1
422 {
423 DWORD dwSize;
424 DWORD dwFlags;
425 DWORD dwBufferBytes;
426 DWORD dwReserved;
427 LPWAVEFORMATEX lpwfxFormat;
428 } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
429
430 typedef struct _DSCBUFFERDESC
431 {
432 DWORD dwSize;
433 DWORD dwFlags;
434 DWORD dwBufferBytes;
435 DWORD dwReserved;
436 LPWAVEFORMATEX lpwfxFormat;
437 #if (DIRECTSOUND_VERSION >= 0x0800)
438 DWORD dwFXCount;
439 LPDSCEFFECTDESC lpDSCFXDesc;
440 #endif /* DS8 */
441 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
442 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
443
444 typedef struct _DSCCAPS
445 {
446 DWORD dwSize;
447 DWORD dwFlags;
448 DWORD dwFormats;
449 DWORD dwChannels;
450 } DSCCAPS, *LPDSCCAPS;
451 typedef const DSCCAPS *LPCDSCCAPS;
452
453 typedef struct _DSCBCAPS
454 {
455 DWORD dwSize;
456 DWORD dwFlags;
457 DWORD dwBufferBytes;
458 DWORD dwReserved;
459 } DSCBCAPS, *LPDSCBCAPS;
460 typedef const DSCBCAPS *LPCDSCBCAPS;
461
462 typedef struct _DSFXI3DL2Reverb
463 {
464 LONG lRoom;
465 LONG lRoomHF;
466 FLOAT flRoomRolloffFactor;
467 FLOAT flDecayTime;
468 FLOAT flDecayHFRatio;
469 LONG lReflections;
470 FLOAT flReflectionsDelay;
471 LONG lReverb;
472 FLOAT flReverbDelay;
473 FLOAT flDiffusion;
474 FLOAT flDensity;
475 FLOAT flHFReference;
476 } DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb;
477
478 #define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT 1.49f
479 #define DSFX_I3DL2REVERB_DECAYTIME_MIN 0.1f
480 #define DSFX_I3DL2REVERB_DECAYTIME_MAX 20.0f
481 #define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT 0.83f
482 #define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN 0.1f
483 #define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX 2.0f
484 #define DSFX_I3DL2REVERB_DENSITY_DEFAULT 100.0f
485 #define DSFX_I3DL2REVERB_DENSITY_MIN 0.0f
486 #define DSFX_I3DL2REVERB_DENSITY_MAX 100.0f
487 #define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT 100.0f
488 #define DSFX_I3DL2REVERB_DIFFUSION_MIN 0.0f
489 #define DSFX_I3DL2REVERB_DIFFUSION_MAX 100.0f
490 #define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT 5000.0f
491 #define DSFX_I3DL2REVERB_HFREFERENCE_MIN 20.0f
492 #define DSFX_I3DL2REVERB_HFREFERENCE_MAX 20000.0f
493 #define DSFX_I3DL2REVERB_QUALITY_DEFAULT 2
494 #define DSFX_I3DL2REVERB_QUALITY_MIN 0
495 #define DSFX_I3DL2REVERB_QUALITY_MAX 3
496 #define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT (-2602)
497 #define DSFX_I3DL2REVERB_REFLECTIONS_MIN (-10000)
498 #define DSFX_I3DL2REVERB_REFLECTIONS_MAX 1000
499 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT 0.007f
500 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN 0.0f
501 #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX 0.3f
502 #define DSFX_I3DL2REVERB_REVERB_MIN (-10000)
503 #define DSFX_I3DL2REVERB_REVERB_MAX 2000
504 #define DSFX_I3DL2REVERB_REVERB_DEFAULT 200
505 #define DSFX_I3DL2REVERB_REVERBDELAY_MIN 0.0f
506 #define DSFX_I3DL2REVERB_REVERBDELAY_MAX 0.1f
507 #define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT 0.011f
508 #define DSFX_I3DL2REVERB_ROOM_DEFAULT (-1000)
509 #define DSFX_I3DL2REVERB_ROOM_MIN (-10000)
510 #define DSFX_I3DL2REVERB_ROOM_MAX 0
511 #define DSFX_I3DL2REVERB_ROOMHF_MIN (-10000)
512 #define DSFX_I3DL2REVERB_ROOMHF_MAX 0
513 #define DSFX_I3DL2REVERB_ROOMHF_DEFAULT (-100)
514 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN 0.0f
515 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX 10.0f
516 #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT 0.0f
517
518 typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb;
519
520 #define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
521 #define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
522 #define DSCCAPS_MULTIPLECAPTURE 0x00000001
523
524 #define DSCBCAPS_WAVEMAPPED 0x80000000
525 #define DSCBCAPS_CTRLFX 0x00000200
526
527 #define DSCBLOCK_ENTIREBUFFER 0x00000001
528 #define DSCBSTART_LOOPING 0x00000001
529 #define DSCBPN_OFFSET_STOP 0xffffffff
530
531 #define DSCBSTATUS_CAPTURING 0x00000001
532 #define DSCBSTATUS_LOOPING 0x00000002
533
534 #ifndef __LPCGUID_DEFINED__
535 #define __LPCGUID_DEFINED__
536 typedef const GUID *LPCGUID;
537 #endif
538
539 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
540 typedef WINBOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
541 __MINGW_TYPEDEF_AW(LPDSENUMCALLBACK)
542
543 extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
544 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
545 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
546 #define DirectSoundEnumerate __MINGW_NAME_AW(DirectSoundEnumerate)
547 extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
548 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
549 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
550 #define DirectSoundCaptureEnumerate __MINGW_NAME_AW(DirectSoundCaptureEnumerate)
551
552 extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
553 extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
554 extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
555 LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel,
556 LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
557 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
558 extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
559
560
561 /*****************************************************************************
562 * IDirectSound interface
563 */
564 #define INTERFACE IDirectSound
DECLARE_INTERFACE_(IDirectSound,IUnknown)565 DECLARE_INTERFACE_(IDirectSound,IUnknown)
566 {
567 /*** IUnknown methods ***/
568 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
569 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
570 STDMETHOD_(ULONG,Release)(THIS) PURE;
571 /*** IDirectSound methods ***/
572 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
573 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
574 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
575 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
576 STDMETHOD(Compact)(THIS) PURE;
577 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
578 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
579 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
580 };
581 #undef INTERFACE
582
583 #if !defined(__cplusplus) || defined(CINTERFACE)
584 /*** IUnknown methods ***/
585 #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
586 #define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
587 #define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
588 /*** IDirectSound methods ***/
589 #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
590 #define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
591 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
592 #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
593 #define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
594 #define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
595 #define IDirectSound_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
596 #define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
597 #else
598 /*** IUnknown methods ***/
599 #define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
600 #define IDirectSound_AddRef(p) (p)->AddRef()
601 #define IDirectSound_Release(p) (p)->Release()
602 /*** IDirectSound methods ***/
603 #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
604 #define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
605 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
606 #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
607 #define IDirectSound_Compact(p) (p)->Compact()
608 #define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
609 #define IDirectSound_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
610 #define IDirectSound_Initialize(p,a) (p)->Initialize(a)
611 #endif
612
613
614 /*****************************************************************************
615 * IDirectSound8 interface
616 */
617 #define INTERFACE IDirectSound8
DECLARE_INTERFACE_(IDirectSound8,IUnknown)618 DECLARE_INTERFACE_(IDirectSound8,IUnknown)
619 {
620 /*** IUnknown methods ***/
621 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
622 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
623 STDMETHOD_(ULONG,Release)(THIS) PURE;
624 /*** IDirectSound8 methods ***/
625 STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
626 STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE;
627 STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
628 STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE;
629 STDMETHOD(Compact)(THIS) PURE;
630 STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE;
631 STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE;
632 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
633 STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
634 };
635 #undef INTERFACE
636
637 #if !defined(__cplusplus) || defined(CINTERFACE)
638 /*** IUnknown methods ***/
639 #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
640 #define IDirectSound8_AddRef(p) (p)->lpVtbl->AddRef(p)
641 #define IDirectSound8_Release(p) (p)->lpVtbl->Release(p)
642 /*** IDirectSound methods ***/
643 #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
644 #define IDirectSound8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
645 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
646 #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
647 #define IDirectSound8_Compact(p) (p)->lpVtbl->Compact(p)
648 #define IDirectSound8_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
649 #define IDirectSound8_SetSpeakerConfig(p,a) (p)->lpVtbl->SetSpeakerConfig(p,a)
650 #define IDirectSound8_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
651 /*** IDirectSound8 methods ***/
652 #define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a)
653 #else
654 /*** IUnknown methods ***/
655 #define IDirectSound8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
656 #define IDirectSound8_AddRef(p) (p)->AddRef()
657 #define IDirectSound8_Release(p) (p)->Release()
658 /*** IDirectSound methods ***/
659 #define IDirectSound8_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
660 #define IDirectSound8_GetCaps(p,a) (p)->GetCaps(a)
661 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
662 #define IDirectSound8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
663 #define IDirectSound8_Compact(p) (p)->Compact()
664 #define IDirectSound8_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
665 #define IDirectSound8_SetSpeakerConfig(p,a) (p)->SetSpeakerConfig(a)
666 #define IDirectSound8_Initialize(p,a) (p)->Initialize(a)
667 /*** IDirectSound8 methods ***/
668 #define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
669 #endif
670
671
672 /*****************************************************************************
673 * IDirectSoundBuffer interface
674 */
675 #define INTERFACE IDirectSoundBuffer
DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)676 DECLARE_INTERFACE_(IDirectSoundBuffer,IUnknown)
677 {
678 /*** IUnknown methods ***/
679 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
680 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
681 STDMETHOD_(ULONG,Release)(THIS) PURE;
682 /*** IDirectSoundBuffer methods ***/
683 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
684 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
685 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
686 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
687 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
688 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
689 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
690 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
691 STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
692 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
693 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
694 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
695 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
696 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
697 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
698 STDMETHOD(Stop)(THIS) PURE;
699 STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
700 STDMETHOD(Restore)(THIS) PURE;
701 };
702 #undef INTERFACE
703
704 #if !defined(__cplusplus) || defined(CINTERFACE)
705 /*** IUnknown methods ***/
706 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
707 #define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
708 #define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
709 /*** IDirectSoundBuffer methods ***/
710 #define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
711 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
712 #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
713 #define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
714 #define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
715 #define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
716 #define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
717 #define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
718 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
719 #define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
720 #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
721 #define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
722 #define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
723 #define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
724 #define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
725 #define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
726 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
727 #define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
728 #else
729 /*** IUnknown methods ***/
730 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
731 #define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
732 #define IDirectSoundBuffer_Release(p) (p)->Release()
733 /*** IDirectSoundBuffer methods ***/
734 #define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
735 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
736 #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
737 #define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
738 #define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
739 #define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
740 #define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
741 #define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
742 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
743 #define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
744 #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
745 #define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
746 #define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
747 #define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
748 #define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
749 #define IDirectSoundBuffer_Stop(p) (p)->Stop()
750 #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
751 #define IDirectSoundBuffer_Restore(p) (p)->Restore()
752 #endif
753
754
755 /*****************************************************************************
756 * IDirectSoundBuffer8 interface
757 */
758 #define INTERFACE IDirectSoundBuffer8
DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)759 DECLARE_INTERFACE_(IDirectSoundBuffer8,IUnknown)
760 {
761 /*** IUnknown methods ***/
762 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
763 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
764 STDMETHOD_(ULONG,Release)(THIS) PURE;
765 /*** IDirectSoundBuffer8 methods ***/
766 STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE;
767 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
768 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
769 STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE;
770 STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE;
771 STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
772 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
773 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPCDSBUFFERDESC lpcDSBufferDesc) PURE;
774 STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
775 STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE;
776 STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE;
777 STDMETHOD(SetFormat)(THIS_ LPCWAVEFORMATEX lpcfxFormat) PURE;
778 STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE;
779 STDMETHOD(SetPan)(THIS_ LONG lPan) PURE;
780 STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE;
781 STDMETHOD(Stop)(THIS) PURE;
782 STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
783 STDMETHOD(Restore)(THIS) PURE;
784 STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
785 STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
786 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
787 };
788 #undef INTERFACE
789
790 DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5);
791
792 #if !defined(__cplusplus) || defined(CINTERFACE)
793 /*** IUnknown methods ***/
794 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
795 #define IDirectSoundBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
796 #define IDirectSoundBuffer8_Release(p) (p)->lpVtbl->Release(p)
797 /*** IDirectSoundBuffer methods ***/
798 #define IDirectSoundBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
799 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
800 #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
801 #define IDirectSoundBuffer8_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
802 #define IDirectSoundBuffer8_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
803 #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
804 #define IDirectSoundBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
805 #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
806 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
807 #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
808 #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
809 #define IDirectSoundBuffer8_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
810 #define IDirectSoundBuffer8_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
811 #define IDirectSoundBuffer8_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
812 #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
813 #define IDirectSoundBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
814 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
815 #define IDirectSoundBuffer8_Restore(p) (p)->lpVtbl->Restore(p)
816 /*** IDirectSoundBuffer8 methods ***/
817 #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c)
818 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c)
819 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
820 #else
821 /*** IUnknown methods ***/
822 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
823 #define IDirectSoundBuffer8_AddRef(p) (p)->AddRef()
824 #define IDirectSoundBuffer8_Release(p) (p)->Release()
825 /*** IDirectSoundBuffer methods ***/
826 #define IDirectSoundBuffer8_GetCaps(p,a) (p)->GetCaps(a)
827 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
828 #define IDirectSoundBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
829 #define IDirectSoundBuffer8_GetVolume(p,a) (p)->GetVolume(a)
830 #define IDirectSoundBuffer8_GetPan(p,a) (p)->GetPan(a)
831 #define IDirectSoundBuffer8_GetFrequency(p,a) (p)->GetFrequency(a)
832 #define IDirectSoundBuffer8_GetStatus(p,a) (p)->GetStatus(a)
833 #define IDirectSoundBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
834 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
835 #define IDirectSoundBuffer8_Play(p,a,b,c) (p)->Play(a,b,c)
836 #define IDirectSoundBuffer8_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
837 #define IDirectSoundBuffer8_SetFormat(p,a) (p)->SetFormat(a)
838 #define IDirectSoundBuffer8_SetVolume(p,a) (p)->SetVolume(a)
839 #define IDirectSoundBuffer8_SetPan(p,a) (p)->SetPan(a)
840 #define IDirectSoundBuffer8_SetFrequency(p,a) (p)->SetFrequency(a)
841 #define IDirectSoundBuffer8_Stop(p) (p)->Stop()
842 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
843 #define IDirectSoundBuffer8_Restore(p) (p)->Restore()
844 /*** IDirectSoundBuffer8 methods ***/
845 #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
846 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
847 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
848 #endif
849
850
851 /*****************************************************************************
852 * IDirectSoundCapture interface
853 */
854 #define INTERFACE IDirectSoundCapture
DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)855 DECLARE_INTERFACE_(IDirectSoundCapture,IUnknown)
856 {
857 /*** IUnknown methods ***/
858 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
859 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
860 STDMETHOD_(ULONG,Release)(THIS) PURE;
861 /*** IDirectSoundCapture methods ***/
862 STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
863 STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE;
864 STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
865 };
866 #undef INTERFACE
867
868 #if !defined(__cplusplus) || defined(CINTERFACE)
869 /*** IUnknown methods ***/
870 #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
871 #define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
872 #define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
873 /*** IDirectSoundCapture methods ***/
874 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
875 #define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
876 #define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
877 #else
878 /*** IUnknown methods ***/
879 #define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
880 #define IDirectSoundCapture_AddRef(p) (p)->AddRef()
881 #define IDirectSoundCapture_Release(p) (p)->Release()
882 /*** IDirectSoundCapture methods ***/
883 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
884 #define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
885 #define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
886 #endif
887
888 /*****************************************************************************
889 * IDirectSoundCaptureBuffer interface
890 */
891 #define INTERFACE IDirectSoundCaptureBuffer
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)892 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer,IUnknown)
893 {
894 /*** IUnknown methods ***/
895 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
896 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
897 STDMETHOD_(ULONG,Release)(THIS) PURE;
898 /*** IDirectSoundCaptureBuffer methods ***/
899 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
900 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
901 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
902 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
903 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
904 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
905 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
906 STDMETHOD(Stop)(THIS) PURE;
907 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
908 };
909 #undef INTERFACE
910
911 #if !defined(__cplusplus) || defined(CINTERFACE)
912 /*** IUnknown methods ***/
913 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
914 #define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
915 #define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
916 /*** IDirectSoundCaptureBuffer methods ***/
917 #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
918 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
919 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
920 #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
921 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
922 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
923 #define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
924 #define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
925 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
926 #else
927 /*** IUnknown methods ***/
928 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
929 #define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
930 #define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
931 /*** IDirectSoundCaptureBuffer methods ***/
932 #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
933 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
934 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
935 #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
936 #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
937 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
938 #define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
939 #define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
940 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
941 #endif
942
943 /*****************************************************************************
944 * IDirectSoundCaptureBuffer8 interface
945 */
946 #define INTERFACE IDirectSoundCaptureBuffer8
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)947 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
948 {
949 /*** IUnknown methods ***/
950 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
951 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
952 STDMETHOD_(ULONG,Release)(THIS) PURE;
953 /*** IDirectSoundCaptureBuffer methods ***/
954 STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE;
955 STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE;
956 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
957 STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE;
958 STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE;
959 STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
960 STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE;
961 STDMETHOD(Stop)(THIS) PURE;
962 STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
963 /*** IDirectSoundCaptureBuffer8 methods ***/
964 STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
965 STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
966 };
967 #undef INTERFACE
968
969 #if !defined(__cplusplus) || defined(CINTERFACE)
970 /*** IUnknown methods ***/
971 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
972 #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p)
973 #define IDirectSoundCaptureBuffer8_Release(p) (p)->lpVtbl->Release(p)
974 /*** IDirectSoundCaptureBuffer methods ***/
975 #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
976 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
977 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
978 #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
979 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
980 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
981 #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->lpVtbl->Start(p,a)
982 #define IDirectSoundCaptureBuffer8_Stop(p) (p)->lpVtbl->Stop(p)
983 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
984 /*** IDirectSoundCaptureBuffer8 methods ***/
985 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
986 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b)
987 #else
988 /*** IUnknown methods ***/
989 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
990 #define IDirectSoundCaptureBuffer8_AddRef(p) (p)->AddRef()
991 #define IDirectSoundCaptureBuffer8_Release(p) (p)->Release()
992 /*** IDirectSoundCaptureBuffer methods ***/
993 #define IDirectSoundCaptureBuffer8_GetCaps(p,a) (p)->GetCaps(a)
994 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
995 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
996 #define IDirectSoundCaptureBuffer8_GetStatus(p,a) (p)->GetStatus(a)
997 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) (p)->Initialize(a,b)
998 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
999 #define IDirectSoundCaptureBuffer8_Start(p,a) (p)->Start(a)
1000 #define IDirectSoundCaptureBuffer8_Stop(p) (p)->Stop()
1001 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
1002 /*** IDirectSoundCaptureBuffer8 methods ***/
1003 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
1004 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
1005 #endif
1006
1007 /*****************************************************************************
1008 * IDirectSoundNotify interface
1009 */
1010 #define WINE_NOBUFFER 0x80000000
1011
1012 #define DSBPN_OFFSETSTOP -1
1013
1014 #define INTERFACE IDirectSoundNotify
DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)1015 DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
1016 {
1017 /*** IUnknown methods ***/
1018 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1019 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1020 STDMETHOD_(ULONG,Release)(THIS) PURE;
1021 /*** IDirectSoundNotify methods ***/
1022 STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
1023 };
1024 #undef INTERFACE
1025
1026 #if !defined(__cplusplus) || defined(CINTERFACE)
1027 /*** IUnknown methods ***/
1028 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1029 #define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
1030 #define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
1031 /*** IDirectSoundNotify methods ***/
1032 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
1033 #else
1034 /*** IUnknown methods ***/
1035 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1036 #define IDirectSoundNotify_AddRef(p) (p)->AddRef()
1037 #define IDirectSoundNotify_Release(p) (p)->Release()
1038 /*** IDirectSoundNotify methods ***/
1039 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
1040 #endif
1041
1042
1043 /*****************************************************************************
1044 * IDirectSound3DListener interface
1045 */
1046 #define DS3DMODE_NORMAL 0x00000000
1047 #define DS3DMODE_HEADRELATIVE 0x00000001
1048 #define DS3DMODE_DISABLE 0x00000002
1049
1050 #define DS3D_IMMEDIATE 0x00000000
1051 #define DS3D_DEFERRED 0x00000001
1052
1053 #define DS3D_MINDISTANCEFACTOR FLT_MIN
1054 #define DS3D_MAXDISTANCEFACTOR FLT_MAX
1055 #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
1056
1057 #define DS3D_MINROLLOFFFACTOR 0.0f
1058 #define DS3D_MAXROLLOFFFACTOR 10.0f
1059 #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
1060
1061 #define DS3D_MINDOPPLERFACTOR 0.0f
1062 #define DS3D_MAXDOPPLERFACTOR 10.0f
1063 #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
1064
1065 #define DS3D_DEFAULTMINDISTANCE 1.0f
1066 #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
1067
1068 #define DS3D_MINCONEANGLE 0
1069 #define DS3D_MAXCONEANGLE 360
1070 #define DS3D_DEFAULTCONEANGLE 360
1071
1072 #define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
1073
1074 typedef struct _DS3DLISTENER {
1075 DWORD dwSize;
1076 D3DVECTOR vPosition;
1077 D3DVECTOR vVelocity;
1078 D3DVECTOR vOrientFront;
1079 D3DVECTOR vOrientTop;
1080 D3DVALUE flDistanceFactor;
1081 D3DVALUE flRolloffFactor;
1082 D3DVALUE flDopplerFactor;
1083 } DS3DLISTENER, *LPDS3DLISTENER;
1084
1085 typedef const DS3DLISTENER *LPCDS3DLISTENER;
1086
1087 #define INTERFACE IDirectSound3DListener
DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)1088 DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
1089 {
1090 /*** IUnknown methods ***/
1091 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1092 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1093 STDMETHOD_(ULONG,Release)(THIS) PURE;
1094 /*** IDirectSound3DListener methods ***/
1095 STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE;
1096 STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE;
1097 STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE;
1098 STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE;
1099 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
1100 STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE;
1101 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
1102 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE;
1103 STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
1104 STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
1105 STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
1106 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1107 STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
1108 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1109 STDMETHOD(CommitDeferredSettings)(THIS) PURE;
1110 };
1111 #undef INTERFACE
1112
1113 #if !defined(__cplusplus) || defined(CINTERFACE)
1114 /*** IUnknown methods ***/
1115 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1116 #define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
1117 #define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
1118 /*** IDirectSound3DListener methods ***/
1119 #define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1120 #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
1121 #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
1122 #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
1123 #define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
1124 #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
1125 #define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
1126 #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
1127 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
1128 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
1129 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
1130 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
1131 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
1132 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
1133 #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
1134 #else
1135 /*** IUnknown methods ***/
1136 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1137 #define IDirectSound3DListener_AddRef(p) (p)->AddRef()
1138 #define IDirectSound3DListener_Release(p) (p)->Release()
1139 /*** IDirectSound3DListener methods ***/
1140 #define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
1141 #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
1142 #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
1143 #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
1144 #define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
1145 #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
1146 #define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
1147 #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1148 #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
1149 #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
1150 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
1151 #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1152 #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
1153 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
1154 #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
1155 #endif
1156 #define IDirectSound3DListener8 IDirectSound3DListener
1157
1158 /*****************************************************************************
1159 * IDirectSound3DBuffer interface
1160 */
1161 typedef struct _DS3DBUFFER {
1162 DWORD dwSize;
1163 D3DVECTOR vPosition;
1164 D3DVECTOR vVelocity;
1165 DWORD dwInsideConeAngle;
1166 DWORD dwOutsideConeAngle;
1167 D3DVECTOR vConeOrientation;
1168 LONG lConeOutsideVolume;
1169 D3DVALUE flMinDistance;
1170 D3DVALUE flMaxDistance;
1171 DWORD dwMode;
1172 } DS3DBUFFER, *LPDS3DBUFFER;
1173
1174 typedef const DS3DBUFFER *LPCDS3DBUFFER;
1175
1176 #define INTERFACE IDirectSound3DBuffer
DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)1177 DECLARE_INTERFACE_(IDirectSound3DBuffer,IUnknown)
1178 {
1179 /*** IUnknown methods ***/
1180 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1181 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1182 STDMETHOD_(ULONG,Release)(THIS) PURE;
1183 /*** IDirectSound3DBuffer methods ***/
1184 STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE;
1185 STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE;
1186 STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE;
1187 STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE;
1188 STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE;
1189 STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE;
1190 STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE;
1191 STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE;
1192 STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE;
1193 STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE;
1194 STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
1195 STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1196 STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
1197 STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
1198 STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
1199 STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE;
1200 STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1201 STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
1202 };
1203 #undef INTERFACE
1204
1205 #if !defined(__cplusplus) || defined(CINTERFACE)
1206 /*** IUnknown methods ***/
1207 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1208 #define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
1209 #define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
1210 /*** IDirectSound3DBuffer methods ***/
1211 #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1212 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
1213 #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
1214 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
1215 #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
1216 #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
1217 #define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
1218 #define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
1219 #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
1220 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
1221 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
1222 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
1223 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
1224 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
1225 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
1226 #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
1227 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
1228 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
1229 #else
1230 /*** IUnknown methods ***/
1231 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1232 #define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
1233 #define IDirectSound3DBuffer_Release(p) (p)->Release()
1234 /*** IDirectSound3DBuffer methods ***/
1235 #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
1236 #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
1237 #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
1238 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
1239 #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
1240 #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
1241 #define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
1242 #define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
1243 #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
1244 #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
1245 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
1246 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
1247 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
1248 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
1249 #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
1250 #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
1251 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
1252 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
1253 #endif
1254 #define IDirectSound3DBuffer8 IDirectSound3DBuffer
1255
1256 /*****************************************************************************
1257 * IKsPropertySet interface
1258 */
1259 #ifndef _IKsPropertySet_
1260 #define _IKsPropertySet_
1261
1262 typedef struct IKsPropertySet *LPKSPROPERTYSET;
1263
1264 DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
1265
1266 #define KSPROPERTY_SUPPORT_GET 1
1267 #define KSPROPERTY_SUPPORT_SET 2
1268
1269 #define INTERFACE IKsPropertySet
DECLARE_INTERFACE_(IKsPropertySet,IUnknown)1270 DECLARE_INTERFACE_(IKsPropertySet,IUnknown)
1271 {
1272 /*** IUnknown methods ***/
1273 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1274 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1275 STDMETHOD_(ULONG,Release)(THIS) PURE;
1276 /*** IKsPropertySet methods ***/
1277 STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;
1278 STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;
1279 STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
1280 };
1281 #undef INTERFACE
1282
1283 #if !defined(__cplusplus) || defined(CINTERFACE)
1284 /*** IUnknown methods ***/
1285 #define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1286 #define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
1287 #define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
1288 /*** IKsPropertySet methods ***/
1289 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
1290 #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
1291 #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
1292 #else
1293 /*** IUnknown methods ***/
1294 #define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1295 #define IKsPropertySet_AddRef(p) (p)->AddRef()
1296 #define IKsPropertySet_Release(p) (p)->Release()
1297 /*** IKsPropertySet methods ***/
1298 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
1299 #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
1300 #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
1301 #endif
1302
1303 #endif /* _IKsPropertySet_ */
1304
1305 /*****************************************************************************
1306 * IDirectSoundFullDuplex interface
1307 */
1308 #define INTERFACE IDirectSoundFullDuplex
DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)1309 DECLARE_INTERFACE_(IDirectSoundFullDuplex,IUnknown)
1310 {
1311 /*** IUnknown methods ***/
1312 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1313 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1314 STDMETHOD_(ULONG,Release)(THIS) PURE;
1315 /*** IDirectSoundFullDuplex methods ***/
1316 STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
1317 };
1318 #undef INTERFACE
1319
1320 #if !defined(__cplusplus) || defined(CINTERFACE)
1321 /*** IUnknown methods ***/
1322 #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1323 #define IDirectSoundFullDuplex_AddRef(p) (p)->lpVtbl->AddRef(p)
1324 #define IDirectSoundFullDuplex_Release(p) (p)->lpVtbl->Release(p)
1325 /*** IDirectSoundFullDuplex methods ***/
1326 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
1327 #else
1328 /*** IUnknown methods ***/
1329 #define IDirectSoundFullDuplex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1330 #define IDirectSoundFullDuplex_AddRef(p) (p)->AddRef()
1331 #define IDirectSoundFullDuplex_Release(p) (p)->Release()
1332 /*** IDirectSoundFullDuplex methods ***/
1333 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
1334 #endif
1335
1336
1337 /*****************************************************************************
1338 * IDirectSoundFXI3DL2Reverb interface
1339 */
1340 #define INTERFACE IDirectSoundFXI3DL2Reverb
DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb,IUnknown)1341 DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb,IUnknown)
1342 {
1343 /*** IUnknown methods ***/
1344 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1345 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1346 STDMETHOD_(ULONG,Release)(THIS) PURE;
1347
1348 /*** IDirectSoundFXI3DL2Reverb methods ***/
1349 STDMETHOD(SetAllParameters)(THIS_ LPCDSFXI3DL2Reverb reverb) PURE;
1350 STDMETHOD(GetAllParameters)(THIS_ LPDSFXI3DL2Reverb reverb) PURE;
1351 STDMETHOD(SetPreset)(THIS_ DWORD preset) PURE;
1352 STDMETHOD(GetPreset)(THIS_ DWORD *preset) PURE;
1353 STDMETHOD(SetQuality)(THIS_ LONG quality) PURE;
1354 STDMETHOD(GetQuality)(THIS_ LONG *quality) PURE;
1355 };
1356 #undef INTERFACE
1357
1358 #if !defined(__cplusplus) || defined(CINTERFACE)
1359 #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1360 #define IDirectSoundFXI3DL2Reverb_AddRef(p) (p)->lpVtbl->AddRef(p)
1361 #define IDirectSoundFXI3DL2Reverb_Release(p) (p)->lpVtbl->Release(p)
1362 #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1363 #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1364 #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->lpVtbl->SetPreset(p,a)
1365 #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->lpVtbl->GetPreset(p,a)
1366 #else
1367 #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1368 #define IDirectSoundFXI3DL2Reverb_AddRef(p) (p)->AddRef()
1369 #define IDirectSoundFXI3DL2Reverb_Release(p) (p)->Release()
1370 #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
1371 #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
1372 #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->SetPreset(a)
1373 #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->GetPreset(a)
1374 #endif
1375
1376 typedef struct _DSFXGargle
1377 {
1378 DWORD dwRateHz;
1379 DWORD dwWaveShape;
1380 } DSFXGargle, *LPDSFXGargle;
1381
1382 typedef const DSFXGargle *LPCDSFXGargle;
1383
1384 #define DSFXGARGLE_RATEHZ_MIN 1
1385 #define DSFXGARGLE_RATEHZ_MAX 1000
1386 #define DSFXGARGLE_WAVE_SQUARE 1
1387 #define DSFXGARGLE_WAVE_TRIANGLE 0
1388
1389 #define INTERFACE IDirectSoundFXGargle
DECLARE_INTERFACE_(IDirectSoundFXGargle,IUnknown)1390 DECLARE_INTERFACE_(IDirectSoundFXGargle,IUnknown)
1391 {
1392 /*** IUnknown methods ***/
1393 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1394 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1395 STDMETHOD_(ULONG,Release)(THIS) PURE;
1396
1397 /*** IDirectSoundFXGargle methods ***/
1398 STDMETHOD(SetAllParameters)(THIS_ const DSFXGargle *gargle) PURE;
1399 STDMETHOD(GetAllParameters)(THIS_ DSFXGargle *gargle) PURE;
1400 };
1401 #undef INTERFACE
1402
1403 #if !defined(__cplusplus) || defined(CINTERFACE)
1404 #define IDirectSoundFXGargle_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1405 #define IDirectSoundFXGargle_AddRef(p) (p)->lpVtbl->AddRef(p)
1406 #define IDirectSoundFXGargle_Release(p) (p)->lpVtbl->Release(p)
1407 #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1408 #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1409 #else
1410 #define IDirectSoundFXGargle_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1411 #define IDirectSoundFXGargle_AddRef(p) (p)->AddRef(p)
1412 #define IDirectSoundFXGargle_Release(p) (p)->Release(p)
1413 #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a)
1414 #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a)
1415 #endif
1416
1417 typedef struct _DSFXChorus
1418 {
1419 FLOAT fWetDryMix;
1420 FLOAT fDepth;
1421 FLOAT fFeedback;
1422 FLOAT fFrequency;
1423 LONG lWaveform;
1424 FLOAT fDelay;
1425 LONG lPhase;
1426 } DSFXChorus, *LPDSFXChorus;
1427
1428 typedef const DSFXChorus *LPCDSFXChorus;
1429
1430 #define DSFXCHORUS_DEPTH_MIN 0.0f
1431 #define DSFXCHORUS_DEPTH_MAX 100.0f
1432 #define DSFXCHORUS_DELAY_MIN 0.0f
1433 #define DSFXCHORUS_DELAY_MAX 20.0f
1434 #define DSFXCHORUS_FEEDBACK_MIN -99.0f
1435 #define DSFXCHORUS_FEEDBACK_MAX 99.0f
1436 #define DSFXCHORUS_FREQUENCY_MIN 0.0f
1437 #define DSFXCHORUS_FREQUENCY_MAX 10.0f
1438 #define DSFXCHORUS_PHASE_MIN 0
1439 #define DSFXCHORUS_PHASE_MAX 4
1440 #define DSFXCHORUS_PHASE_NEG_180 0
1441 #define DSFXCHORUS_PHASE_NEG_90 1
1442 #define DSFXCHORUS_PHASE_ZERO 2
1443 #define DSFXCHORUS_PHASE_90 3
1444 #define DSFXCHORUS_PHASE_180 4
1445 #define DSFXCHORUS_WAVE_TRIANGLE 0
1446 #define DSFXCHORUS_WAVE_SIN 1
1447 #define DSFXCHORUS_WETDRYMIX_MIN 0.0f
1448 #define DSFXCHORUS_WETDRYMIX_MAX 100.0f
1449
1450 #define INTERFACE IDirectSoundFXChorus
DECLARE_INTERFACE_(IDirectSoundFXChorus,IUnknown)1451 DECLARE_INTERFACE_(IDirectSoundFXChorus,IUnknown)
1452 {
1453 /*** IUnknown methods ***/
1454 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1455 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1456 STDMETHOD_(ULONG,Release)(THIS) PURE;
1457
1458 /*** IDirectSoundFXChorus methods ***/
1459 STDMETHOD(SetAllParameters)(THIS_ const DSFXChorus *chorus) PURE;
1460 STDMETHOD(GetAllParameters)(THIS_ DSFXChorus *chorus) PURE;
1461 };
1462 #undef INTERFACE
1463
1464 #if !defined(__cplusplus) || defined(CINTERFACE)
1465 #define IDirectSoundFXChorus_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1466 #define IDirectSoundFXChorus_AddRef(p) (p)->lpVtbl->AddRef(p)
1467 #define IDirectSoundFXChorus_Release(p) (p)->lpVtbl->Release(p)
1468 #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1469 #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1470 #else
1471 #define IDirectSoundFXChorus_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1472 #define IDirectSoundFXChorus_AddRef(p) (p)->AddRef(p)
1473 #define IDirectSoundFXChorus_Release(p) (p)->Release(p)
1474 #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a)
1475 #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a)
1476 #endif
1477
1478 typedef struct _DSFXFlanger
1479 {
1480 FLOAT fWetDryMix;
1481 FLOAT fDepth;
1482 FLOAT fFeedback;
1483 FLOAT fFrequency;
1484 LONG lWaveform;
1485 FLOAT fDelay;
1486 LONG lPhase;
1487 } DSFXFlanger, *LPDSFXFlanger;
1488
1489 typedef const DSFXFlanger *LPCDSFXFlanger;
1490
1491 #define DSFXFLANGER_DELAY_MIN 0.0f
1492 #define DSFXFLANGER_DELAY_MAX 4.0f
1493 #define DSFXFLANGER_DEPTH_MIN 0.0f
1494 #define DSFXFLANGER_DEPTH_MAX 100.0f
1495 #define DSFXFLANGER_FREQUENCY_MIN 0.0f
1496 #define DSFXFLANGER_FREQUENCY_MAX 10.0f
1497 #define DSFXFLANGER_FEEDBACK_MIN -99.0f
1498 #define DSFXFLANGER_FEEDBACK_MAX 99.0f
1499 #define DSFXFLANGER_PHASE_MIN 0
1500 #define DSFXFLANGER_PHASE_MAX 4
1501 #define DSFXFLANGER_PHASE_NEG_180 0
1502 #define DSFXFLANGER_PHASE_NEG_90 1
1503 #define DSFXFLANGER_PHASE_ZERO 2
1504 #define DSFXFLANGER_PHASE_90 3
1505 #define DSFXFLANGER_PHASE_180 4
1506 #define DSFXFLANGER_WAVE_SIN 1
1507 #define DSFXFLANGER_WAVE_TRIANGLE 0
1508 #define DSFXFLANGER_WETDRYMIX_MIN 0.0f
1509 #define DSFXFLANGER_WETDRYMIX_MAX 100.0f
1510
1511 #define INTERFACE IDirectSoundFXFlanger
DECLARE_INTERFACE_(IDirectSoundFXFlanger,IUnknown)1512 DECLARE_INTERFACE_(IDirectSoundFXFlanger,IUnknown)
1513 {
1514 /*** IUnknown methods ***/
1515 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1516 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1517 STDMETHOD_(ULONG,Release)(THIS) PURE;
1518
1519 /*** IDirectSoundFXFlanger methods ***/
1520 STDMETHOD(SetAllParameters)(THIS_ const DSFXFlanger *flanger) PURE;
1521 STDMETHOD(GetAllParameters)(THIS_ DSFXFlanger *flanger) PURE;
1522 };
1523 #undef INTERFACE
1524
1525 #if !defined(__cplusplus) || defined(CINTERFACE)
1526 #define IDirectSoundFXFlanger_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1527 #define IDirectSoundFXFlanger_AddRef(p) (p)->lpVtbl->AddRef(p)
1528 #define IDirectSoundFXFlanger_Release(p) (p)->lpVtbl->Release(p)
1529 #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1530 #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1531 #else
1532 #define IDirectSoundFXFlanger_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1533 #define IDirectSoundFXFlanger_AddRef(p) (p)->AddRef(p)
1534 #define IDirectSoundFXFlanger_Release(p) (p)->Release(p)
1535 #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a)
1536 #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a)
1537 #endif
1538
1539 typedef struct _DSFXEcho
1540 {
1541 FLOAT fWetDryMix;
1542 FLOAT fFeedback;
1543 FLOAT fLeftDelay;
1544 FLOAT fRightDelay;
1545 LONG lPanDelay;
1546 } DSFXEcho, *LPDSFXEcho;
1547
1548 typedef const DSFXEcho *LPCDSFXEcho;
1549
1550 #define DSFXECHO_FEEDBACK_MIN 0.0f
1551 #define DSFXECHO_FEEDBACK_MAX 100.0f
1552 #define DSFXECHO_LEFTDELAY_MIN 1.0f
1553 #define DSFXECHO_LEFTDELAY_MAX 2000.0f
1554 #define DSFXECHO_PANDELAY_MIN 0
1555 #define DSFXECHO_PANDELAY_MAX 1
1556 #define DSFXECHO_RIGHTDELAY_MIN 1.0f
1557 #define DSFXECHO_RIGHTDELAY_MAX 2000.0f
1558 #define DSFXECHO_WETDRYMIX_MIN 0.0f
1559 #define DSFXECHO_WETDRYMIX_MAX 100.0f
1560
1561 #define INTERFACE IDirectSoundFXEcho
DECLARE_INTERFACE_(IDirectSoundFXEcho,IUnknown)1562 DECLARE_INTERFACE_(IDirectSoundFXEcho,IUnknown)
1563 {
1564 /*** IUnknown methods ***/
1565 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1566 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1567 STDMETHOD_(ULONG,Release)(THIS) PURE;
1568
1569 /*** IDirectSoundFXEcho methods ***/
1570 STDMETHOD(SetAllParameters)(THIS_ const DSFXEcho *echo) PURE;
1571 STDMETHOD(GetAllParameters)(THIS_ DSFXEcho *echo) PURE;
1572 };
1573 #undef INTERFACE
1574
1575 #if !defined(__cplusplus) || defined(CINTERFACE)
1576 #define IDirectSoundFXEcho_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1577 #define IDirectSoundFXEcho_AddRef(p) (p)->lpVtbl->AddRef(p)
1578 #define IDirectSoundFXEcho_Release(p) (p)->lpVtbl->Release(p)
1579 #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1580 #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1581 #else
1582 #define IDirectSoundFXEcho_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1583 #define IDirectSoundFXEcho_AddRef(p) (p)->AddRef(p)
1584 #define IDirectSoundFXEcho_Release(p) (p)->Release(p)
1585 #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a)
1586 #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a)
1587 #endif
1588
1589 typedef struct _DSFXDistortion
1590 {
1591 FLOAT fGain;
1592 FLOAT fEdge;
1593 FLOAT fPostEQCenterFrequency;
1594 FLOAT fPostEQBandwidth;
1595 FLOAT fPreLowpassCutoff;
1596 } DSFXDistortion, *LPDSFXDistortion;
1597
1598 typedef const DSFXDistortion *LPCDSFXDistortion;
1599
1600 #define DSFXDISTORTION_EDGE_MIN 0.0f
1601 #define DSFXDISTORTION_EDGE_MAX 100.0f
1602 #define DSFXDISTORTION_GAIN_MIN -60.0f
1603 #define DSFXDISTORTION_GAIN_MAX 0.0f
1604 #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN 100.0f
1605 #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f
1606 #define DSFXDISTORTION_POSTEQBANDWIDTH_MIN 100.0f
1607 #define DSFXDISTORTION_POSTEQBANDWIDTH_MAX 8000.0f
1608 #define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN 100.0f
1609 #define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX 8000.0f
1610
1611 #define INTERFACE IDirectSoundFXDistortion
DECLARE_INTERFACE_(IDirectSoundFXDistortion,IUnknown)1612 DECLARE_INTERFACE_(IDirectSoundFXDistortion,IUnknown)
1613 {
1614 /*** IUnknown methods ***/
1615 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1616 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1617 STDMETHOD_(ULONG,Release)(THIS) PURE;
1618
1619 /*** IDirectSoundFXDistortion methods ***/
1620 STDMETHOD(SetAllParameters)(THIS_ const DSFXDistortion *distortion) PURE;
1621 STDMETHOD(GetAllParameters)(THIS_ DSFXDistortion *distortion) PURE;
1622 };
1623 #undef INTERFACE
1624
1625 #if !defined(__cplusplus) || defined(CINTERFACE)
1626 #define IDirectSoundFXDistortion_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1627 #define IDirectSoundFXDistortion_AddRef(p) (p)->lpVtbl->AddRef(p)
1628 #define IDirectSoundFXDistortion_Release(p) (p)->lpVtbl->Release(p)
1629 #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1630 #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1631 #else
1632 #define IDirectSoundFXDistortion_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1633 #define IDirectSoundFXDistortion_AddRef(p) (p)->AddRef(p)
1634 #define IDirectSoundFXDistortion_Release(p) (p)->Release(p)
1635 #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a)
1636 #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a)
1637 #endif
1638
1639 typedef struct _DSFXCompressor
1640 {
1641 FLOAT fGain;
1642 FLOAT fAttack;
1643 FLOAT fRelease;
1644 FLOAT fThreshold;
1645 FLOAT fRatio;
1646 FLOAT fPredelay;
1647 } DSFXCompressor, *LPDSFXCompressor;
1648
1649 typedef const DSFXCompressor *LPCDSFXCompressor;
1650
1651 #define DSFXCOMPRESSOR_ATTACK_MIN 0.01f
1652 #define DSFXCOMPRESSOR_ATTACK_MAX 500.0f
1653 #define DSFXCOMPRESSOR_GAIN_MIN -60.0f
1654 #define DSFXCOMPRESSOR_GAIN_MAX 60.0f
1655 #define DSFXCOMPRESSOR_PREDELAY_MIN 0.0f
1656 #define DSFXCOMPRESSOR_PREDELAY_MAX 4.0f
1657 #define DSFXCOMPRESSOR_RATIO_MIN 1.0f
1658 #define DSFXCOMPRESSOR_RATIO_MAX 100.0f
1659 #define DSFXCOMPRESSOR_RELEASE_MIN 50.0f
1660 #define DSFXCOMPRESSOR_RELEASE_MAX 3000.0f
1661 #define DSFXCOMPRESSOR_THRESHOLD_MIN -60.0f
1662 #define DSFXCOMPRESSOR_THRESHOLD_MAX 0.0f
1663
1664 #define INTERFACE IDirectSoundFXCompressor
DECLARE_INTERFACE_(IDirectSoundFXCompressor,IUnknown)1665 DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown)
1666 {
1667 /*** IUnknown methods ***/
1668 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1669 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1670 STDMETHOD_(ULONG,Release)(THIS) PURE;
1671
1672 /*** IDirectSoundFXCompressor methods ***/
1673 STDMETHOD(SetAllParameters)(THIS_ const DSFXCompressor *compressor) PURE;
1674 STDMETHOD(GetAllParameters)(THIS_ DSFXCompressor *compressor) PURE;
1675 };
1676 #undef INTERFACE
1677
1678 #if !defined(__cplusplus) || defined(CINTERFACE)
1679 #define IDirectSoundFXCompressor_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1680 #define IDirectSoundFXCompressor_AddRef(p) (p)->lpVtbl->AddRef(p)
1681 #define IDirectSoundFXCompressor_Release(p) (p)->lpVtbl->Release(p)
1682 #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1683 #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1684 #else
1685 #define IDirectSoundFXCompressor_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1686 #define IDirectSoundFXCompressor_AddRef(p) (p)->AddRef(p)
1687 #define IDirectSoundFXCompressor_Release(p) (p)->Release(p)
1688 #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a)
1689 #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a)
1690 #endif
1691
1692 typedef struct _DSFXParamEq
1693 {
1694 FLOAT fCenter;
1695 FLOAT fBandwidth;
1696 FLOAT fGain;
1697 } DSFXParamEq, *LPDSFXParamEq;
1698
1699 typedef const DSFXParamEq *LPCDSFXParamEq;
1700
1701 #define DSFXPARAMEQ_BANDWIDTH_MIN 1.0f
1702 #define DSFXPARAMEQ_BANDWIDTH_MAX 36.0f
1703 #define DSFXPARAMEQ_CENTER_MIN 80.0f
1704 #define DSFXPARAMEQ_CENTER_MAX 16000.0f
1705 #define DSFXPARAMEQ_GAIN_MIN -15.0f
1706 #define DSFXPARAMEQ_GAIN_MAX 15.0f
1707
1708 #define INTERFACE IDirectSoundFXParamEq
DECLARE_INTERFACE_(IDirectSoundFXParamEq,IUnknown)1709 DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown)
1710 {
1711 /*** IUnknown methods ***/
1712 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1713 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1714 STDMETHOD_(ULONG,Release)(THIS) PURE;
1715
1716 /*** IDirectSoundFXParamEq methods ***/
1717 STDMETHOD(SetAllParameters)(THIS_ const DSFXParamEq *param) PURE;
1718 STDMETHOD(GetAllParameters)(THIS_ DSFXParamEq *param) PURE;
1719 };
1720 #undef INTERFACE
1721
1722 #if !defined(__cplusplus) || defined(CINTERFACE)
1723 #define IDirectSoundFXParamEq_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1724 #define IDirectSoundFXParamEq_AddRef(p) (p)->lpVtbl->AddRef(p)
1725 #define IDirectSoundFXParamEq_Release(p) (p)->lpVtbl->Release(p)
1726 #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1727 #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1728 #else
1729 #define IDirectSoundFXParamEq_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1730 #define IDirectSoundFXParamEq_AddRef(p) (p)->AddRef(p)
1731 #define IDirectSoundFXParamEq_Release(p) (p)->Release(p)
1732 #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a)
1733 #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a)
1734 #endif
1735
1736 typedef struct _DSFXWavesReverb
1737 {
1738 FLOAT fInGain;
1739 FLOAT fReverbMix;
1740 FLOAT fReverbTime;
1741 FLOAT fHighFreqRTRatio;
1742 } DSFXWavesReverb, *LPDSFXWavesReverb;
1743
1744 typedef const DSFXWavesReverb *LPCDSFXWavesReverb;
1745
1746 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN 0.001f
1747 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX 0.999f
1748 #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT 0.001f
1749 #define DSFX_WAVESREVERB_INGAIN_MIN -96.0f
1750 #define DSFX_WAVESREVERB_INGAIN_MAX 0.0f
1751 #define DSFX_WAVESREVERB_INGAIN_DEFAULT 0.0f
1752 #define DSFX_WAVESREVERB_REVERBMIX_MIN -96.0f
1753 #define DSFX_WAVESREVERB_REVERBMIX_MAX 0.0f
1754 #define DSFX_WAVESREVERB_REVERBMIX_DEFAULT 0.0f
1755 #define DSFX_WAVESREVERB_REVERBTIME_MIN 0.001f
1756 #define DSFX_WAVESREVERB_REVERBTIME_MAX 3000.0f
1757 #define DSFX_WAVESREVERB_REVERBTIME_DEFAULT 1000.0f
1758
1759 #define INTERFACE IDirectSoundFXWavesReverb
DECLARE_INTERFACE_(IDirectSoundFXWavesReverb,IUnknown)1760 DECLARE_INTERFACE_(IDirectSoundFXWavesReverb,IUnknown)
1761 {
1762 /*** IUnknown methods ***/
1763 STDMETHOD(QueryInterface)(THIS_ REFIID, void**) PURE;
1764 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1765 STDMETHOD_(ULONG,Release)(THIS) PURE;
1766
1767 /*** IDirectSoundFXWavesReverb methods ***/
1768 STDMETHOD(SetAllParameters)(THIS_ const DSFXWavesReverb *reverb) PURE;
1769 STDMETHOD(GetAllParameters)(THIS_ DSFXWavesReverb *reverb) PURE;
1770 };
1771 #undef INTERFACE
1772
1773 #if !defined(__cplusplus) || defined(CINTERFACE)
1774 #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1775 #define IDirectSoundFXWavesReverb_AddRef(p) (p)->lpVtbl->AddRef(p)
1776 #define IDirectSoundFXWavesReverb_Release(p) (p)->lpVtbl->Release(p)
1777 #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
1778 #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
1779 #else
1780 #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
1781 #define IDirectSoundFXWavesReverb_AddRef(p) (p)->AddRef(p)
1782 #define IDirectSoundFXWavesReverb_Release(p) (p)->Release(p)
1783 #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
1784 #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
1785 #endif
1786
1787 enum
1788 {
1789 DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW,
1790 DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW,
1791 DSFX_I3DL2_MATERIAL_PRESET_THINDOOR,
1792 DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR,
1793 DSFX_I3DL2_MATERIAL_PRESET_WOODWALL,
1794 DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL,
1795 DSFX_I3DL2_MATERIAL_PRESET_STONEWALL,
1796 DSFX_I3DL2_MATERIAL_PRESET_CURTAIN
1797 };
1798
1799 #define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
1800 #define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
1801 #define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f
1802 #define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f
1803 #define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f
1804 #define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f
1805 #define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f
1806 #define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f
1807
1808 enum
1809 {
1810 DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT,
1811 DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC,
1812 DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL,
1813 DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM,
1814 DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM,
1815 DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM,
1816 DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM,
1817 DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM,
1818 DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL,
1819 DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE,
1820 DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA,
1821 DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR,
1822 DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY,
1823 DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY,
1824 DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR,
1825 DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY,
1826 DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST,
1827 DSFX_I3DL2_ENVIRONMENT_PRESET_CITY,
1828 DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS,
1829 DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY,
1830 DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN,
1831 DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT,
1832 DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE,
1833 DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER,
1834 DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM,
1835 DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM,
1836 DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM,
1837 DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL,
1838 DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL,
1839 DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE
1840 };
1841
1842 #define I3DL2_ENVIRONMENT_PRESET_DEFAULT -1000,-100,0.0f,1.49f,0.83f,-2602,0.007f,200,0.011f,100.0f,100.0f,5000.0f
1843 #define I3DL2_ENVIRONMENT_PRESET_GENERIC -1000,-100,0.0f,1.49f,0.83f,-2602,0.007f,200,0.011f,100.0f,100.0f,5000.0f
1844 #define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL -1000,-6000,0.0f,0.17f,0.10f,-1204,0.001f,207,0.002f,100.0f,100.0f,5000.0f
1845 #define I3DL2_ENVIRONMENT_PRESET_ROOM -1000,-454,0.0f,0.40f,0.83f,-1646,0.002f,53,0.003f,100.0f,100.0f,5000.0f
1846 #define I3DL2_ENVIRONMENT_PRESET_BATHROOM -1000,-1200,0.0f,1.49f,0.54f,-370,0.007f,1030,0.011f,100.0f,60.0f,5000.0f
1847 #define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM -1000,-6000,0.0f,0.50f,0.10f,-1376,0.003f,-1104,0.004f,100.0f,100.0f,5000.0f
1848 #define I3DL2_ENVIRONMENT_PRESET_STONEROOM -1000,-300,0.0f,2.31f,0.64f,-711,0.012f,83,0.017f,100.0f,100.0f,5000.0f
1849 #define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM -1000,-476,0.0f,4.32f,0.59f,-789,0.020f,-289,0.030f,100.0f,100.0f,5000.0f
1850 #define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL -1000,-500,0.0f,3.92f,0.70f,-1230,0.020f,-2,0.029f,100.0f,100.0f,5000.0f
1851 #define I3DL2_ENVIRONMENT_PRESET_CAVE -1000,0,0.0f,2.91f,1.30f,-602,0.015f,-302,0.022f,100.0f,100.0f,5000.0f
1852 #define I3DL2_ENVIRONMENT_PRESET_ARENA -1000,-698,0.0f,7.24f,0.33f,-1166,0.020f,16,0.030f,100.0f,100.0f,5000.0f
1853 #define I3DL2_ENVIRONMENT_PRESET_HANGAR -1000,-1000,0.0f,10.05f,0.23f,-602,0.020f,198,0.030f,100.0f,100.0f,5000.0f
1854 #define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000,0.0f,0.30f,0.10f,-1831,0.002f,-1630,0.030f,100.0f,100.0f,5000.0f
1855 #define I3DL2_ENVIRONMENT_PRESET_HALLWAY -1000,-300,0.0f,1.49f,0.59f,-1219,0.007f,441,0.011f,100.0f,100.0f,5000.0f
1856 #define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR -1000,-237,0.0f,2.70f,0.79f,-1214,0.013f,395,0.020f,100.0f,100.0f,5000.0f
1857 #define I3DL2_ENVIRONMENT_PRESET_ALLEY -1000,-270,0.0f,1.49f,0.86f,-1204,0.007f,-4,0.011f,100.0f,100.0f,5000.0f
1858 #define I3DL2_ENVIRONMENT_PRESET_FOREST -1000,-3300,0.0f,1.49f,0.54f,-2560,0.162f,-613,0.088f,79.0f,100.0f,5000.0f
1859 #define I3DL2_ENVIRONMENT_PRESET_CITY -1000,-800,0.0f,1.49f,0.67f,-2273,0.007f,2217,0.011f,50.0f,100.0f,5000.0f
1860 #define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS -1000,-2500,0.0f,1.49f,0.21f,-2780,0.300f,-2014,0.100f,27.0f,100.0f,5000.0f
1861 #define I3DL2_ENVIRONMENT_PRESET_QUARRY -1000,-1000,0.0f,1.49f,0.83f,-10000,0.061f,500,0.025f,100.0f,100.0f,5000.0f
1862 #define I3DL2_ENVIRONMENT_PRESET_PLAIN -1000,-2000,0.0f,1.49f,0.50f,-2466,0.179f,-2514,0.100f,21.0f,100.0f,5000.0f
1863 #define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT -1000,0,0.0f,1.65f,1.50f,-1363,0.008f,-1153,0.012f,100.0f,100.0f,5000.0f
1864 #define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE -1000,-1000,0.0f,2.81f,0.14f,429,0.014f,648,0.011f,80.0f,60.0f,5000.0f
1865 #define I3DL2_ENVIRONMENT_PRESET_UNDERWATER -1000,-4000,0.0f,1.49f,0.10f,-449,0.007f,1700,0.011f,100.0f,100.0f,5000.0f
1866 #define I3DL2_ENVIRONMENT_PRESET_SMALLROOM -1000,-600,0.0f,1.10f,0.83f,-400,0.005f,500,0.010f,100.0f,100.0f,5000.0f
1867 #define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM -1000,-600,0.0f,1.30f,0.83f,-1000,0.010f,-200,0.020f,100.0f,100.0f,5000.0f
1868 #define I3DL2_ENVIRONMENT_PRESET_LARGEROOM -1000,-600,0.0f,1.50f,0.83f,-1600,0.020f,-1000,0.040f,100.0f,100.0f,5000.0f
1869 #define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL -1000,-600,0.0f,1.80f,0.70f,-1300,0.015f,-800,0.030f,100.0f,100.0f,5000.0f
1870 #define I3DL2_ENVIRONMENT_PRESET_LARGEHALL -1000,-600,0.0f,1.80f,0.70f,-2000,0.030f,-1400,0.060f,100.0f,100.0f,5000.0f
1871 #define I3DL2_ENVIRONMENT_PRESET_PLATE -1000,-200,0.0f,1.30f,0.90f,0,0.002f,0,0.010f,100.0f,75.0f,5000.0f
1872
1873 #ifdef __cplusplus
1874 } /* extern "C" */
1875 #endif /* defined(__cplusplus) */
1876
1877 #endif /* __DSOUND_INCLUDED__ */
1878