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