ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dsound.h
Revision: 1166
Committed: Tue Oct 26 14:22:36 2021 UTC (4 years ago) by rossy
Content type: text/x-chdr
File size: 93746 byte(s)
Log Message:
Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File Contents

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