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