Fixed prototypes of CreateStatusWindowA/W, ImageList_Copy,
[wine] / include / dsound.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_DSOUND_H
20 #define __WINE_DSOUND_H
21
22 #ifndef DIRECTSOUND_VERSION
23 #define DIRECTSOUND_VERSION 0x0800
24 #endif
25
26 #include "mmsystem.h"
27 #include "d3dtypes.h"
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* defined(__cplusplus) */
32
33 /*****************************************************************************
34  * Predeclare the interfaces
35  */
36 DEFINE_GUID(CLSID_DirectSound,          0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
37 DEFINE_GUID(CLSID_DirectSound8,         0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
38 DEFINE_GUID(CLSID_DirectSoundCapture,   0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
39 DEFINE_GUID(CLSID_DirectSoundCapture8,  0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
40 DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
41
42 DEFINE_GUID(IID_IDirectSound,           0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
43 typedef struct IDirectSound IDirectSound,*LPDIRECTSOUND;
44
45 DEFINE_GUID(IID_IDirectSound8,          0xC50A7E93,0xF395,0x4834,0x9E,0xF6,0x7F,0xA9,0x9D,0xE5,0x09,0x66);
46 typedef struct IDirectSound8 IDirectSound8,*LPDIRECTSOUND8;
47
48 DEFINE_GUID(IID_IDirectSoundBuffer,     0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
49 typedef struct IDirectSoundBuffer IDirectSoundBuffer,*LPDIRECTSOUNDBUFFER,**LPLPDIRECTSOUNDBUFFER;
50
51 DEFINE_GUID(IID_IDirectSoundBuffer8,    0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
52 typedef struct IDirectSoundBuffer8 IDirectSoundBuffer8,*LPDIRECTSOUNDBUFFER8,**LPLPDIRECTSOUNDBUFFER8;
53
54 DEFINE_GUID(IID_IDirectSoundNotify,     0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
55 typedef struct IDirectSoundNotify IDirectSoundNotify,*LPDIRECTSOUNDNOTIFY;
56 #define IID_IDirectSoundNotify8         IID_IDirectSoundNotify
57
58 DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
59 typedef struct IDirectSound3DListener IDirectSound3DListener,*LPDIRECTSOUND3DLISTENER;
60
61 DEFINE_GUID(IID_IDirectSound3DBuffer,   0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
62 typedef struct IDirectSound3DBuffer IDirectSound3DBuffer,*LPDIRECTSOUND3DBUFFER;
63
64 DEFINE_GUID(IID_IDirectSoundCapture,    0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
65 typedef struct IDirectSoundCapture IDirectSoundCapture,*LPDIRECTSOUNDCAPTURE;
66 #define IID_IDirectSoundCapture8        IID_IDirectSoundCapture
67 typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8;
68
69 DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
70 typedef struct IDirectSoundCaptureBuffer IDirectSoundCaptureBuffer,*LPDIRECTSOUNDCAPTUREBUFFER;
71
72 DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
73 typedef struct IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8,*LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
74
75 DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
76 typedef struct IDirectSoundFullDuplex IDirectSoundFullDuplex,*LPDIRECTSOUNDFULLDUPLEX;
77 #define IID_IDirectSoundFullDuplex8     IID_IDirectSoundFullDuplex
78
79 DEFINE_GUID(DSDEVID_DefaultPlayback,     0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
80 DEFINE_GUID(DSDEVID_DefaultCapture,      0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
81 DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
82 DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
83
84 DEFINE_GUID(DSDEVID_WinePlayback,        0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
85
86 #define _FACDS          0x878
87 #define MAKE_DSHRESULT(code)            MAKE_HRESULT(1,_FACDS,code)
88
89 #define DS_OK                           0
90 #define DSERR_ALLOCATED                 MAKE_DSHRESULT(10)
91 #define DSERR_CONTROLUNAVAIL            MAKE_DSHRESULT(30)
92 #define DSERR_INVALIDPARAM              E_INVALIDARG
93 #define DSERR_INVALIDCALL               MAKE_DSHRESULT(50)
94 #define DSERR_GENERIC                   E_FAIL
95 #define DSERR_PRIOLEVELNEEDED           MAKE_DSHRESULT(70)
96 #define DSERR_OUTOFMEMORY               E_OUTOFMEMORY
97 #define DSERR_BADFORMAT                 MAKE_DSHRESULT(100)
98 #define DSERR_UNSUPPORTED               E_NOTIMPL
99 #define DSERR_NODRIVER                  MAKE_DSHRESULT(120)
100 #define DSERR_ALREADYINITIALIZED        MAKE_DSHRESULT(130)
101 #define DSERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
102 #define DSERR_BUFFERLOST                MAKE_DSHRESULT(150)
103 #define DSERR_OTHERAPPHASPRIO           MAKE_DSHRESULT(160)
104 #define DSERR_UNINITIALIZED             MAKE_DSHRESULT(170)
105
106 #define DSCAPS_PRIMARYMONO          0x00000001
107 #define DSCAPS_PRIMARYSTEREO        0x00000002
108 #define DSCAPS_PRIMARY8BIT          0x00000004
109 #define DSCAPS_PRIMARY16BIT         0x00000008
110 #define DSCAPS_CONTINUOUSRATE       0x00000010
111 #define DSCAPS_EMULDRIVER           0x00000020
112 #define DSCAPS_CERTIFIED            0x00000040
113 #define DSCAPS_SECONDARYMONO        0x00000100
114 #define DSCAPS_SECONDARYSTEREO      0x00000200
115 #define DSCAPS_SECONDARY8BIT        0x00000400
116 #define DSCAPS_SECONDARY16BIT       0x00000800
117
118 #define DSSCL_NORMAL            1
119 #define DSSCL_PRIORITY          2
120 #define DSSCL_EXCLUSIVE         3
121 #define DSSCL_WRITEPRIMARY      4
122
123 typedef struct _DSCAPS
124 {
125     DWORD       dwSize;
126     DWORD       dwFlags;
127     DWORD       dwMinSecondarySampleRate;
128     DWORD       dwMaxSecondarySampleRate;
129     DWORD       dwPrimaryBuffers;
130     DWORD       dwMaxHwMixingAllBuffers;
131     DWORD       dwMaxHwMixingStaticBuffers;
132     DWORD       dwMaxHwMixingStreamingBuffers;
133     DWORD       dwFreeHwMixingAllBuffers;
134     DWORD       dwFreeHwMixingStaticBuffers;
135     DWORD       dwFreeHwMixingStreamingBuffers;
136     DWORD       dwMaxHw3DAllBuffers;
137     DWORD       dwMaxHw3DStaticBuffers;
138     DWORD       dwMaxHw3DStreamingBuffers;
139     DWORD       dwFreeHw3DAllBuffers;
140     DWORD       dwFreeHw3DStaticBuffers;
141     DWORD       dwFreeHw3DStreamingBuffers;
142     DWORD       dwTotalHwMemBytes;
143     DWORD       dwFreeHwMemBytes;
144     DWORD       dwMaxContigFreeHwMemBytes;
145     DWORD       dwUnlockTransferRateHwBuffers;
146     DWORD       dwPlayCpuOverheadSwBuffers;
147     DWORD       dwReserved1;
148     DWORD       dwReserved2;
149 } DSCAPS,*LPDSCAPS;
150
151 #define DSBPLAY_LOOPING         0x00000001
152
153 #define DSBSTATUS_PLAYING           0x00000001
154 #define DSBSTATUS_BUFFERLOST        0x00000002
155 #define DSBSTATUS_LOOPING           0x00000004
156
157
158 #define DSBLOCK_FROMWRITECURSOR     0x00000001
159 #define DSBLOCK_ENTIREBUFFER        0x00000002
160
161 #define DSBCAPS_PRIMARYBUFFER       0x00000001
162 #define DSBCAPS_STATIC              0x00000002
163 #define DSBCAPS_LOCHARDWARE         0x00000004
164 #define DSBCAPS_LOCSOFTWARE         0x00000008
165 #define DSBCAPS_CTRL3D              0x00000010
166 #define DSBCAPS_CTRLFREQUENCY       0x00000020
167 #define DSBCAPS_CTRLPAN             0x00000040
168 #define DSBCAPS_CTRLVOLUME          0x00000080
169 #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100
170 #define DSBCAPS_CTRLDEFAULT         0x000000E0  /* Pan + volume + frequency. */
171 #define DSBCAPS_CTRLALL             0x000001F0  /* All control capabilities */
172 #define DSBCAPS_STICKYFOCUS         0x00004000
173 #define DSBCAPS_GLOBALFOCUS         0x00008000
174 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000  /* More accurate play cursor under emulation*/
175 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
176
177 #define DSBSIZE_MIN                 4
178 #define DSBSIZE_MAX                 0xFFFFFFF
179 #define DSBPAN_LEFT                 -10000
180 #define DSBPAN_RIGHT                 10000
181 #define DSBVOLUME_MAX                    0
182 #define DSBVOLUME_MIN               -10000
183 #define DSBFREQUENCY_MIN            100
184 #define DSBFREQUENCY_MAX            100000
185 #define DSBFREQUENCY_ORIGINAL       0
186
187 typedef struct _DSBCAPS
188 {
189     DWORD       dwSize;
190     DWORD       dwFlags;
191     DWORD       dwBufferBytes;
192     DWORD       dwUnlockTransferRate;
193     DWORD       dwPlayCpuOverhead;
194 } DSBCAPS,*LPDSBCAPS;
195
196 #define DSSCL_NORMAL                1
197 #define DSSCL_PRIORITY              2
198 #define DSSCL_EXCLUSIVE             3
199 #define DSSCL_WRITEPRIMARY          4
200
201 typedef struct _DSEFFECTDESC
202 {
203     DWORD       dwSize;
204     DWORD       dwFlags;
205     GUID        guidDSFXClass;
206     DWORD_PTR   dwReserved1;
207     DWORD_PTR   dwReserved2;
208 } DSEFFECTDESC,*LPDSEFFECTDESC;
209 typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
210
211 #define DSFX_LOCHARDWARE    0x00000001
212 #define DSFX_LOCSOFTWARE    0x00000002
213
214 enum
215 {
216     DSFXR_PRESENT,
217     DSFXR_LOCHARDWARE,
218     DSFXR_LOCSOFTWARE,
219     DSFXR_UNALLOCATED,
220     DSFXR_FAILED,
221     DSFXR_UNKNOWN,
222     DSFXR_SENDLOOP
223 };
224
225 typedef struct _DSBUFFERDESC
226 {
227     DWORD               dwSize;
228     DWORD               dwFlags;
229     DWORD               dwBufferBytes;
230     DWORD               dwReserved;
231     LPWAVEFORMATEX      lpwfxFormat;
232 #if DIRECTSOUND_VERSION >= 0x0700
233     GUID                guid3DAlgorithm;
234 #endif
235 } DSBUFFERDESC,*LPDSBUFFERDESC;
236 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
237
238 typedef struct _DSBPOSITIONNOTIFY
239 {
240     DWORD       dwOffset;
241     HANDLE      hEventNotify;
242 } DSBPOSITIONNOTIFY,*LPDSBPOSITIONNOTIFY;
243 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
244
245 #define DSSPEAKER_HEADPHONE     1
246 #define DSSPEAKER_MONO          2
247 #define DSSPEAKER_QUAD          3
248 #define DSSPEAKER_STEREO        4
249 #define DSSPEAKER_SURROUND      5
250
251 #define DSSPEAKER_GEOMETRY_MIN      0x00000005  /* 5 degrees */
252 #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  /* 10 degrees */
253 #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  /* 20 degrees */
254 #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  /* 180 degrees */
255
256 #define DS_CERTIFIED                0x00000000
257 #define DS_UNCERTIFIED              0x00000001
258
259 typedef struct _DSCBUFFERDESC
260 {
261   DWORD          dwSize;
262   DWORD          dwFlags;
263   DWORD          dwBufferBytes;
264   DWORD          dwReserved;
265   LPWAVEFORMATEX lpwfxFormat;
266 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
267 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
268
269 typedef struct _DSCCAPS
270 {
271   DWORD dwSize;
272   DWORD dwFlags;
273   DWORD dwFormats;
274   DWORD dwChannels;
275 } DSCCAPS, *LPDSCCAPS;
276 typedef const DSCCAPS *LPCDSCCAPS;
277
278 typedef struct _DSCBCAPS
279 {
280   DWORD dwSize;
281   DWORD dwFlags;
282   DWORD dwBufferBytes;
283   DWORD dwReserved;
284 } DSCBCAPS, *LPDSCBCAPS;
285 typedef const DSCBCAPS *LPCDSCBCAPS;
286
287 #define DSCCAPS_EMULDRIVER          DSCAPS_EMULDRIVER
288 #define DSCCAPS_CERTIFIED           DSCAPS_CERTIFIED
289
290 #define DSCBCAPS_WAVEMAPPED         0x80000000
291 #define DSCBCAPS_CTRLFX             0x00000200
292
293 #define DSCBLOCL_ENTIREBUFFER       0x00000001
294 #define DSCBSTART_LOOPING           0x00000001
295 #define DSCBPN_OFFSET_STOP          0xffffffff
296
297 #define DSCBSTATUS_CAPTURING        0x00000001
298 #define DSCBSTATUS_LOOPING          0x00000002
299
300 #ifndef __LPCGUID_DEFINED__
301 #define __LPCGUID_DEFINED__
302 typedef const GUID *LPCGUID;
303 #endif
304
305 typedef LPVOID* LPLPVOID;
306
307 typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPCWSTR,LPCWSTR,LPVOID);
308 typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPCSTR,LPCSTR,LPVOID);
309
310 extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND *ppDS,LPUNKNOWN pUnkOuter);
311 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
312 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
313
314 extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
315 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
316 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
317
318 extern HRESULT WINAPI DirectSoundCreate8(LPCGUID lpGUID,LPDIRECTSOUND8 *ppDS8,LPUNKNOWN pUnkOuter);
319 extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC8, LPUNKNOWN pUnkOuter);
320 extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice, 
321     LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, DWORD dwLevel, 
322     LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter); 
323 #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
324 extern HRESULT WINAPI GetDeviceID(LPCGUID lpGuidSrc, LPGUID lpGuidDest);
325
326
327 /*****************************************************************************
328  * IDirectSound interface
329  */
330 #define INTERFACE IDirectSound
331 #define IDirectSound_METHODS \
332     IUnknown_METHODS \
333     STDMETHOD(CreateSoundBuffer)(THIS_ LPDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE; \
334     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE; \
335     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE; \
336     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE; \
337     STDMETHOD(Compact)(THIS) PURE; \
338     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE; \
339     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE; \
340     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE;
341 ICOM_DEFINE(IDirectSound,IUnknown)
342 #undef INTERFACE
343
344 #ifdef COBJMACROS
345     /*** IUnknown methods ***/
346 #define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
347 #define IDirectSound_AddRef(p)             (p)->lpVtbl->AddRef(p)
348 #define IDirectSound_Release(p)            (p)->lpVtbl->Release(p)
349     /*** IDirectSound methods ***/
350 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
351 #define IDirectSound_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
352 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
353 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
354 #define IDirectSound_Compact(p)                  (p)->lpVtbl->Compact(p)
355 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
356 #define IDirectSound_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
357 #define IDirectSound_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
358 #endif
359
360
361 /*****************************************************************************
362  * IDirectSound8 interface
363  */
364 #define INTERFACE IDirectSound8
365 #define IDirectSound8_METHODS \
366     IUnknown_METHODS \
367     STDMETHOD(CreateSoundBuffer)(THIS_ LPDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE; \
368     STDMETHOD(GetCaps)(THIS_ LPDSCAPS lpDSCaps) PURE; \
369     STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER8 lpDsbOriginal, LPLPDIRECTSOUNDBUFFER8 lplpDsbDuplicate) PURE; \
370     STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwLevel) PURE; \
371     STDMETHOD(Compact)(THIS) PURE; \
372     STDMETHOD(GetSpeakerConfig)(THIS_ LPDWORD lpdwSpeakerConfig) PURE; \
373     STDMETHOD(SetSpeakerConfig)(THIS_ DWORD dwSpeakerConfig) PURE; \
374     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGuid) PURE; \
375     STDMETHOD(VerifyCertification)(THIS_ LPDWORD pdwCertified) PURE;
376 ICOM_DEFINE(IDirectSound8,IUnknown)
377 #undef INTERFACE
378
379 #ifdef COBJMACROS
380     /*** IUnknown methods ***/
381 #define IDirectSound8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
382 #define IDirectSound8_AddRef(p)             (p)->lpVtbl->AddRef(p)
383 #define IDirectSound8_Release(p)            (p)->lpVtbl->Release(p)
384     /*** IDirectSound methods ***/
385 #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
386 #define IDirectSound8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
387 #define IDirectSound8_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
388 #define IDirectSound8_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
389 #define IDirectSound8_Compact(p)                  (p)->lpVtbl->Compact(p)
390 #define IDirectSound8_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
391 #define IDirectSound8_SetSpeakerConfig(p,a)       (p)->lpVtbl->SetSpeakerConfig(p,a)
392 #define IDirectSound8_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
393     /*** IDirectSound8 methods ***/
394 #define IDirectSound8_VerifyCertification(p,a)    (p)->lpVtbl->VerifyCertification(p,a)
395 #endif
396
397
398 /*****************************************************************************
399  * IDirectSoundBuffer interface
400  */
401 #define INTERFACE IDirectSoundBuffer
402 #define IDirectSoundBuffer_METHODS \
403     IUnknown_METHODS \
404     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE; \
405     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE; \
406     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; \
407     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE; \
408     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE; \
409     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; \
410     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; \
411     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND lpDirectSound, LPDSBUFFERDESC lpcDSBufferDesc) PURE; \
412     STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE; \
413     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE; \
414     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE; \
415     STDMETHOD(SetFormat)(THIS_ LPWAVEFORMATEX lpcfxFormat) PURE; \
416     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE; \
417     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE; \
418     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE; \
419     STDMETHOD(Stop)(THIS) PURE; \
420     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE; \
421     STDMETHOD(Restore)(THIS) PURE;
422 ICOM_DEFINE(IDirectSoundBuffer,IUnknown)
423 #undef INTERFACE
424
425 #ifdef COBJMACROS
426     /*** IUnknown methods ***/
427 #define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
428 #define IDirectSoundBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
429 #define IDirectSoundBuffer_Release(p)            (p)->lpVtbl->Release(p)
430     /*** IDirectSoundBuffer methods ***/
431 #define IDirectSoundBuffer_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
432 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
433 #define IDirectSoundBuffer_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
434 #define IDirectSoundBuffer_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
435 #define IDirectSoundBuffer_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
436 #define IDirectSoundBuffer_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
437 #define IDirectSoundBuffer_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
438 #define IDirectSoundBuffer_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
439 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
440 #define IDirectSoundBuffer_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
441 #define IDirectSoundBuffer_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
442 #define IDirectSoundBuffer_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
443 #define IDirectSoundBuffer_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
444 #define IDirectSoundBuffer_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
445 #define IDirectSoundBuffer_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
446 #define IDirectSoundBuffer_Stop(p)                     (p)->lpVtbl->Stop(p)
447 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
448 #define IDirectSoundBuffer_Restore(p)                  (p)->lpVtbl->Restore(p)
449 #endif
450
451
452 /*****************************************************************************
453  * IDirectSoundBuffer8 interface
454  */
455 #define INTERFACE IDirectSoundBuffer8
456 #define IDirectSoundBuffer8_METHODS \
457     IUnknown_METHODS \
458     STDMETHOD(GetCaps)(THIS_ LPDSBCAPS lpDSBufferCaps) PURE; \
459     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE; \
460     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; \
461     STDMETHOD(GetVolume)(THIS_ LPLONG lplVolume) PURE; \
462     STDMETHOD(GetPan)(THIS_ LPLONG lplpan) PURE; \
463     STDMETHOD(GetFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; \
464     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; \
465     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUND8 lpDirectSound, LPDSBUFFERDESC lpcDSBufferDesc) PURE; \
466     STDMETHOD(Lock)(THIS_ DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOID lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE; \
467     STDMETHOD(Play)(THIS_ DWORD dwReserved1, DWORD dwReserved2, DWORD dwFlags) PURE; \
468     STDMETHOD(SetCurrentPosition)(THIS_ DWORD dwNewPosition) PURE; \
469     STDMETHOD(SetFormat)(THIS_ LPWAVEFORMATEX lpcfxFormat) PURE; \
470     STDMETHOD(SetVolume)(THIS_ LONG lVolume) PURE; \
471     STDMETHOD(SetPan)(THIS_ LONG lPan) PURE; \
472     STDMETHOD(SetFrequency)(THIS_ DWORD dwFrequency) PURE; \
473     STDMETHOD(Stop)(THIS) PURE; \
474     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioPtr2) PURE; \
475     STDMETHOD(Restore)(THIS) PURE; \
476     STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE; \
477     STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE; \
478     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
479 ICOM_DEFINE(IDirectSoundBuffer8,IUnknown)
480 #undef INTERFACE
481
482 #ifdef COBJMACROS
483     /*** IUnknown methods ***/
484 #define IDirectSoundBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
485 #define IDirectSoundBuffer8_AddRef(p)             (p)->lpVtbl->AddRef(p)
486 #define IDirectSoundBuffer8_Release(p)            (p)->lpVtbl->Release(p)
487     /*** IDirectSoundBuffer methods ***/
488 #define IDirectSoundBuffer8_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
489 #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)   (p)->lpVtbl->GetCurrentPosition(p,a,b)
490 #define IDirectSoundBuffer8_GetFormat(p,a,b,c)          (p)->lpVtbl->GetFormat(p,a,b,c)
491 #define IDirectSoundBuffer8_GetVolume(p,a)              (p)->lpVtbl->GetVolume(p,a)
492 #define IDirectSoundBuffer8_GetPan(p,a)                 (p)->lpVtbl->GetPan(p,a)
493 #define IDirectSoundBuffer8_GetFrequency(p,a)           (p)->lpVtbl->GetFrequency(p,a)
494 #define IDirectSoundBuffer8_GetStatus(p,a)              (p)->lpVtbl->GetStatus(p,a)
495 #define IDirectSoundBuffer8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
496 #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)       (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
497 #define IDirectSoundBuffer8_Play(p,a,b,c)               (p)->lpVtbl->Play(p,a,b,c)
498 #define IDirectSoundBuffer8_SetCurrentPosition(p,a)     (p)->lpVtbl->SetCurrentPosition(p,a)
499 #define IDirectSoundBuffer8_SetFormat(p,a)              (p)->lpVtbl->SetFormat(p,a)
500 #define IDirectSoundBuffer8_SetVolume(p,a)              (p)->lpVtbl->SetVolume(p,a)
501 #define IDirectSoundBuffer8_SetPan(p,a)                 (p)->lpVtbl->SetPan(p,a)
502 #define IDirectSoundBuffer8_SetFrequency(p,a)           (p)->lpVtbl->SetFrequency(p,a)
503 #define IDirectSoundBuffer8_Stop(p)                     (p)->lpVtbl->Stop(p)
504 #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)           (p)->lpVtbl->Unlock(p,a,b,c,d)
505 #define IDirectSoundBuffer8_Restore(p)                  (p)->lpVtbl->Restore(p)
506     /*** IDirectSoundBuffer8 methods ***/
507 #define IDirectSoundBuffer8_SetFX(p,a,b,c)              (p)->lpVtbl->SetFX(p,a,b,c)
508 #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)   (p)->lpVtbl->AcquireResources(p,a,b,c)
509 #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c)    (p)->lpVtbl->GetObjectInPath(p,a,b,c)
510 #endif
511
512
513 /*****************************************************************************
514  * IDirectSoundCapture interface
515  */
516 #define INTERFACE IDirectSoundCapture
517 #define IDirectSoundCapture_METHODS \
518     IUnknown_METHODS \
519     STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE; \
520     STDMETHOD(GetCaps)(THIS_ LPDSCCAPS lpDSCCaps) PURE; \
521     STDMETHOD(Initialize)(THIS_ LPCGUID lpcGUID) PURE;
522 ICOM_DEFINE(IDirectSoundCapture,IUnknown)
523 #undef INTERFACE
524
525 #ifdef COBJMACROS
526 #define IDirectSoundCapture_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
527 #define IDirectSoundCapture_AddRef(p)                    (p)->lpVtbl->AddRef(p)
528 #define IDirectSoundCapture_Release(p)                   (p)->lpVtbl->Release(p)
529 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
530 #define IDirectSoundCapture_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
531 #define IDirectSoundCapture_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
532 #endif
533
534 /*****************************************************************************
535  * IDirectSoundCaptureBuffer interface
536  */
537 #define INTERFACE IDirectSoundCaptureBuffer
538 #define IDirectSoundCaptureBuffer_METHODS \
539     IUnknown_METHODS \
540     STDMETHOD(GetCaps)(THIS_ LPDSCBCAPS lpDSCBCaps) PURE; \
541     STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCapturePosition,LPDWORD lpdwReadPosition) PURE; \
542     STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE; \
543     STDMETHOD(GetStatus)(THIS_ LPDWORD lpdwStatus) PURE; \
544     STDMETHOD(Initialize)(THIS_ LPDIRECTSOUNDCAPTURE lpDSC, LPCDSCBUFFERDESC lpcDSCBDesc) PURE; \
545     STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE; \
546     STDMETHOD(Start)(THIS_ DWORD dwFlags) PURE; \
547     STDMETHOD(Stop)(THIS) PURE; \
548     STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
549 ICOM_DEFINE(IDirectSoundCaptureBuffer,IUnknown)
550 #undef INTERFACE
551
552 #ifdef COBJMACROS
553 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
554 #define IDirectSoundCaptureBuffer_AddRef(p)                 (p)->lpVtbl->AddRef(p)
555 #define IDirectSoundCaptureBuffer_Release(p)                (p)->lpVtbl->Release(p)
556 #define IDirectSoundCaptureBuffer_GetCaps(p,a)              (p)->lpVtbl->GetCaps(p,a)
557 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
558 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)        (p)->lpVtbl->GetFormat(p,a,b,c)
559 #define IDirectSoundCaptureBuffer_GetStatus(p,a)            (p)->lpVtbl->GetStatus(p,a)
560 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)         (p)->lpVtbl->Initialize(p,a,b)
561 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
562 #define IDirectSoundCaptureBuffer_Start(p,a)                (p)->lpVtbl->Start(p,a)
563 #define IDirectSoundCaptureBuffer_Stop(p)                   (p)->lpVtbl->Stop(p)
564 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)         (p)->lpVtbl->Unlock(p,a,b,c,d)
565 #endif
566
567 /*****************************************************************************
568  * IDirectSoundCaptureBuffer8 interface
569  */
570 #define INTERFACE IDirectSoundCaptureBuffer8
571 #define IDirectSoundCaptureBuffer8_METHODS \
572     IDirectSoundCaptureBuffer_METHODS \
573     STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE; \
574     STDMETHOD(GetFXStatus)(THIS_ DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
575 ICOM_DEFINE(IDirectSoundCaptureBuffer8,IDirectSoundCaptureBuffer)
576 #undef INTERFACE
577
578 #ifdef COBJMACROS
579 #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
580 #define IDirectSoundCaptureBuffer8_AddRef(p)                  (p)->lpVtbl->AddRef(p)
581 #define IDirectSoundCaptureBuffer8_Release(p)                 (p)->lpVtbl->Release(p)
582 #define IDirectSoundCaptureBuffer8_GetCaps(p,a)               (p)->lpVtbl->GetCaps(p,a)
583 #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)  (p)->lpVtbl->GetCurrentPosition(p,a,b)
584 #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)         (p)->lpVtbl->GetFormat(p,a,b,c)
585 #define IDirectSoundCaptureBuffer8_GetStatus(p,a)             (p)->lpVtbl->GetStatus(p,a)
586 #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)          (p)->lpVtbl->Initialize(p,a,b)
587 #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)      (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
588 #define IDirectSoundCaptureBuffer8_Start(p,a)                 (p)->lpVtbl->Start(p,a)
589 #define IDirectSoundCaptureBuffer8_Stop(p)                    (p)->lpVtbl->Stop(p)
590 #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)          (p)->lpVtbl->Unlock(p,a,b,c,d)
591 #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
592 #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)         (p)->lpVtbl->GetFXStatus(p,a,b)
593 #endif
594
595 /*****************************************************************************
596  * IDirectSoundNotify interface
597  */
598 #define WINE_NOBUFFER                   0x80000000
599
600 #define DSBPN_OFFSETSTOP                -1
601
602 #define INTERFACE IDirectSoundNotify
603 #define IDirectSoundNotify_METHODS \
604     IUnknown_METHODS \
605     STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
606 ICOM_DEFINE(IDirectSoundNotify,IUnknown)
607 #undef INTERFACE
608
609 #ifdef COBJMACROS
610 /*** IUnknown methods ***/
611 #define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
612 #define IDirectSoundNotify_AddRef(p)             (p)->lpVtbl->AddRef(p)
613 #define IDirectSoundNotify_Release(p)            (p)->lpVtbl->Release(p)
614 /*** IDirectSoundNotify methods ***/
615 #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
616 #endif
617
618
619 /*****************************************************************************
620  * IDirectSound3DListener interface
621  */
622 #define DS3DMODE_NORMAL             0x00000000
623 #define DS3DMODE_HEADRELATIVE       0x00000001
624 #define DS3DMODE_DISABLE            0x00000002
625
626 #define DS3D_IMMEDIATE              0x00000000
627 #define DS3D_DEFERRED               0x00000001
628
629 #define DS3D_MINDISTANCEFACTOR      0.0f
630 #define DS3D_MAXDISTANCEFACTOR      10.0f
631 #define DS3D_DEFAULTDISTANCEFACTOR  1.0f
632
633 #define DS3D_MINROLLOFFFACTOR       0.0f
634 #define DS3D_MAXROLLOFFFACTOR       10.0f
635 #define DS3D_DEFAULTROLLOFFFACTOR   1.0f
636
637 #define DS3D_MINDOPPLERFACTOR       0.0f
638 #define DS3D_MAXDOPPLERFACTOR       10.0f
639 #define DS3D_DEFAULTDOPPLERFACTOR   1.0f
640
641 #define DS3D_DEFAULTMINDISTANCE     1.0f
642 #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f
643
644 #define DS3D_MINCONEANGLE           0
645 #define DS3D_MAXCONEANGLE           360
646 #define DS3D_DEFAULTCONEANGLE       360
647
648 #define DS3D_DEFAULTCONEOUTSIDEVOLUME   0
649
650 typedef struct _DS3DLISTENER {
651         DWORD                           dwSize;
652         D3DVECTOR                       vPosition;
653         D3DVECTOR                       vVelocity;
654         D3DVECTOR                       vOrientFront;
655         D3DVECTOR                       vOrientTop;
656         D3DVALUE                        flDistanceFactor;
657         D3DVALUE                        flRolloffFactor;
658         D3DVALUE                        flDopplerFactor;
659 } DS3DLISTENER, *LPDS3DLISTENER;
660
661 typedef const DS3DLISTENER *LPCDS3DLISTENER;
662
663 #define INTERFACE IDirectSound3DListener
664 #define IDirectSound3DListener_METHODS \
665     IUnknown_METHODS \
666     STDMETHOD(GetAllParameters)(THIS_ LPDS3DLISTENER lpListener) PURE; \
667     STDMETHOD(GetDistanceFactor)(THIS_ LPD3DVALUE lpflDistanceFactor) PURE; \
668     STDMETHOD(GetDopplerFactor)(THIS_ LPD3DVALUE lpflDopplerFactor) PURE; \
669     STDMETHOD(GetOrientation)(THIS_ LPD3DVECTOR lpvOrientFront, LPD3DVECTOR lpvOrientTop) PURE; \
670     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE; \
671     STDMETHOD(GetRolloffFactor)(THIS_ LPD3DVALUE lpflRolloffFactor) PURE; \
672     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE; \
673     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DLISTENER lpcListener, DWORD dwApply) PURE; \
674     STDMETHOD(SetDistanceFactor)(THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE; \
675     STDMETHOD(SetDopplerFactor)(THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE; \
676     STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE; \
677     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; \
678     STDMETHOD(SetRolloffFactor)(THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE; \
679     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; \
680     STDMETHOD(CommitDeferredSettings)(THIS) PURE;
681 ICOM_DEFINE(IDirectSound3DListener,IUnknown)
682 #undef INTERFACE
683
684 #ifdef COBJMACROS
685 /*** IUnknown methods ***/
686 #define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
687 #define IDirectSound3DListener_AddRef(p)             (p)->lpVtbl->AddRef(p)
688 #define IDirectSound3DListener_Release(p)            (p)->lpVtbl->Release(p)
689 /*** IDirectSound3DListener methods ***/
690 #define IDirectSound3DListener_GetAllParameters(p,a)           (p)->lpVtbl->GetAllParameters(p,a)
691 #define IDirectSound3DListener_GetDistanceFactor(p,a)          (p)->lpVtbl->GetDistanceFactor(p,a)
692 #define IDirectSound3DListener_GetDopplerFactor(p,a)           (p)->lpVtbl->GetDopplerFactor(p,a)
693 #define IDirectSound3DListener_GetOrientation(p,a,b)           (p)->lpVtbl->GetOrientation(p,a,b)
694 #define IDirectSound3DListener_GetPosition(p,a)                (p)->lpVtbl->GetPosition(p,a)
695 #define IDirectSound3DListener_GetRolloffFactor(p,a)           (p)->lpVtbl->GetRolloffFactor(p,a)
696 #define IDirectSound3DListener_GetVelocity(p,a)                (p)->lpVtbl->GetVelocity(p,a)
697 #define IDirectSound3DListener_SetAllParameters(p,a,b)         (p)->lpVtbl->SetAllParameters(p,a,b)
698 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)        (p)->lpVtbl->SetDistanceFactor(p,a,b)
699 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)         (p)->lpVtbl->SetDopplerFactor(p,a,b)
700 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
701 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)          (p)->lpVtbl->SetPosition(p,a,b,c,d)
702 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)         (p)->lpVtbl->SetRolloffFactor(p,a,b)
703 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)          (p)->lpVtbl->SetVelocity(p,a,b,c,d)
704 #define IDirectSound3DListener_CommitDeferredSettings(p)       (p)->lpVtbl->CommitDeferredSettings(p)
705 #endif
706
707
708 /*****************************************************************************
709  * IDirectSound3DBuffer interface
710  */
711 typedef struct  _DS3DBUFFER {
712         DWORD                           dwSize;
713         D3DVECTOR                       vPosition;
714         D3DVECTOR                       vVelocity;
715         DWORD                           dwInsideConeAngle;
716         DWORD                           dwOutsideConeAngle;
717         D3DVECTOR                       vConeOrientation;
718         LONG                            lConeOutsideVolume;
719         D3DVALUE                        flMinDistance;
720         D3DVALUE                        flMaxDistance;
721         DWORD                           dwMode;
722 } DS3DBUFFER, *LPDS3DBUFFER;
723
724 typedef const DS3DBUFFER *LPCDS3DBUFFER;
725
726 #define INTERFACE IDirectSound3DBuffer
727 #define IDirectSound3DBuffer_METHODS \
728     IUnknown_METHODS \
729     STDMETHOD(GetAllParameters)(THIS_ LPDS3DBUFFER lpDs3dBuffer) PURE; \
730     STDMETHOD(GetConeAngles)(THIS_ LPDWORD lpdwInsideConeAngle, LPDWORD lpdwOutsideConeAngle) PURE; \
731     STDMETHOD(GetConeOrientation)(THIS_ LPD3DVECTOR lpvOrientation) PURE; \
732     STDMETHOD(GetConeOutsideVolume)(THIS_ LPLONG lplConeOutsideVolume) PURE; \
733     STDMETHOD(GetMaxDistance)(THIS_ LPD3DVALUE lpflMaxDistance) PURE; \
734     STDMETHOD(GetMinDistance)(THIS_ LPD3DVALUE lpflMinDistance) PURE; \
735     STDMETHOD(GetMode)(THIS_ LPDWORD lpwdMode) PURE; \
736     STDMETHOD(GetPosition)(THIS_ LPD3DVECTOR lpvPosition) PURE; \
737     STDMETHOD(GetVelocity)(THIS_ LPD3DVECTOR lpvVelocity) PURE; \
738     STDMETHOD(SetAllParameters)(THIS_ LPCDS3DBUFFER lpcDs3dBuffer, DWORD dwApply) PURE; \
739     STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE; \
740     STDMETHOD(SetConeOrientation)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; \
741     STDMETHOD(SetConeOutsideVolume)(THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE; \
742     STDMETHOD(SetMaxDistance)(THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE; \
743     STDMETHOD(SetMinDistance)(THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE; \
744     STDMETHOD(SetMode)(THIS_ DWORD dwMode, DWORD dwApply) PURE; \
745     STDMETHOD(SetPosition)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; \
746     STDMETHOD(SetVelocity)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
747 ICOM_DEFINE(IDirectSound3DBuffer,IUnknown)
748 #undef INTERFACE
749
750 #ifdef COBJMACROS
751 /*** IUnknown methods ***/
752 #define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
753 #define IDirectSound3DBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
754 #define IDirectSound3DBuffer_Release(p)            (p)->lpVtbl->Release(p)
755 /*** IDirectSound3DBuffer methods ***/
756 #define IDirectSound3DBuffer_GetAllParameters(p,a)         (p)->lpVtbl->GetAllParameters(p,a)
757 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)          (p)->lpVtbl->GetConeAngles(p,a,b)
758 #define IDirectSound3DBuffer_GetConeOrientation(p,a)       (p)->lpVtbl->GetConeOrientation(p,a)
759 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)     (p)->lpVtbl->GetConeOutsideVolume(p,a)
760 #define IDirectSound3DBuffer_GetMaxDistance(p,a)           (p)->lpVtbl->GetMaxDistance(p,a)
761 #define IDirectSound3DBuffer_GetMinDistance(p,a)           (p)->lpVtbl->GetMinDistance(p,a)
762 #define IDirectSound3DBuffer_GetMode(p,a)                  (p)->lpVtbl->GetMode(p,a)
763 #define IDirectSound3DBuffer_GetPosition(p,a)              (p)->lpVtbl->GetPosition(p,a)
764 #define IDirectSound3DBuffer_GetVelocity(p,a)              (p)->lpVtbl->GetVelocity(p,a)
765 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)       (p)->lpVtbl->SetAllParameters(p,a,b)
766 #define IDirectSound3DBuffer_SetConeAngles(p,a,b)          (p)->lpVtbl->SetConeAngles(p,a,b)
767 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
768 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)   (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
769 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)         (p)->lpVtbl->SetMaxDistance(p,a,b)
770 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)         (p)->lpVtbl->SetMinDistance(p,a,b)
771 #define IDirectSound3DBuffer_SetMode(p,a,b)                (p)->lpVtbl->SetMode(p,a,b)
772 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)        (p)->lpVtbl->SetPosition(p,a,b,c,d)
773 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)        (p)->lpVtbl->SetVelocity(p,a,b,c,d)
774 #endif
775
776 /*****************************************************************************
777  * IKsPropertySet interface
778  */
779 #ifndef _IKsPropertySet_
780 #define _IKsPropertySet_
781
782 typedef struct IKsPropertySet IKsPropertySet,*LPKSPROPERTYSET;
783
784 DEFINE_GUID(IID_IKsPropertySet,0x31EFAC30,0x515C,0x11D0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93);
785
786 #define KSPROPERTY_SUPPORT_GET  1
787 #define KSPROPERTY_SUPPORT_SET  2
788
789 #define INTERFACE IKsPropertySet
790 #define IKsPropertySet_METHODS \
791     IUnknown_METHODS \
792     STDMETHOD(Get)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3,ULONG *px4) PURE;\
793     STDMETHOD(Set)(THIS_ REFGUID rgid,ULONG x1,LPVOID p1,ULONG x2,LPVOID p2,ULONG x3) PURE;\
794     STDMETHOD(QuerySupport)(THIS_ REFGUID rgid,ULONG x1,ULONG *px2) PURE;
795 ICOM_DEFINE(IKsPropertySet,IUnknown)
796 #undef INTERFACE
797
798 #ifdef COBJMACROS
799 #define IKsPropertySet_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
800 #define IKsPropertySet_AddRef(p)                (p)->lpVtbl->AddRef(p)
801 #define IKsPropertySet_Release(p)               (p)->lpVtbl->Release(p)
802 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)     (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
803 #define IKsPropertySet_Set(p,a,b,c,d,e,f)       (p)->lpVtbl->Set(p,a,b,c,d,e,f)
804 #define IKsPropertySet_QuerySupport(p,a,b,c)    (p)->lpVtbl->QuerySupport(p,a,b,c)
805 #endif
806
807 #endif /* _IKsPropertySet_ */
808
809 /*****************************************************************************
810  * IDirectSoundFullDuplex interface
811  */
812 #define INTERFACE IDirectSoundFullDuplex
813 #define IDirectSoundFullDuplex_METHODS \
814     IUnknown_METHODS \
815     STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
816 ICOM_DEFINE(IDirectSoundFullDuplex,IUnknown)
817 #undef INTERFACE
818
819 #ifdef COBJMACROS
820 #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
821 #define IDirectSoundFullDuplex_AddRef(p)                (p)->lpVtbl->AddRef(p)
822 #define IDirectSoundFullDuplex_Release(p)               (p)->lpVtbl->Release(p)
823 #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)    (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
824 #endif
825
826 #ifdef __cplusplus
827 } /* extern "C" */
828 #endif /* defined(__cplusplus) */
829
830 #endif /* __WINE_DSOUND_H */