]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/builddeps/dp.win64/include/dsound.h
Merge branch 'master' into divVerent/crypto2
[xonotic/xonotic.git] / misc / builddeps / dp.win64 / include / dsound.h
1 /*==========================================================================;
2  *
3  *  Copyright (C) 1995,1996 Microsoft Corporation.  All Rights Reserved.
4  *
5  *  File:       dsound.h
6  *  Content:    DirectSound include file
7  *
8  **************************************************************************/
9
10 #ifndef __DSOUND_INCLUDED__
11 #define __DSOUND_INCLUDED__
12
13 #include <d3dtypes.h>
14
15 #define COM_NO_WINDOWS_H
16 #include <objbase.h>
17
18 #define _FACDS  0x878
19 #define MAKE_DSHRESULT(code)  MAKE_HRESULT(1, _FACDS, code)
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif // __cplusplus
24
25 // Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
26 DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
27
28 // DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
29 DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
30
31 //
32 // Structures
33 // 
34
35 #ifdef __cplusplus
36 // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
37 struct IDirectSound;
38 struct IDirectSoundBuffer;
39 struct IDirectSound3DListener;
40 struct IDirectSound3DBuffer;
41 struct IDirectSoundCapture;
42 struct IDirectSoundCaptureBuffer;
43 struct IDirectSoundNotify;
44 #endif // __cplusplus
45
46 typedef struct IDirectSound *LPDIRECTSOUND;
47 typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
48 typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
49 typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
50 typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
51 typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
52 typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
53
54 typedef struct _DSCAPS
55 {
56     DWORD           dwSize;
57     DWORD           dwFlags;
58     DWORD           dwMinSecondarySampleRate;
59     DWORD           dwMaxSecondarySampleRate;
60     DWORD           dwPrimaryBuffers;
61     DWORD           dwMaxHwMixingAllBuffers;
62     DWORD           dwMaxHwMixingStaticBuffers;
63     DWORD           dwMaxHwMixingStreamingBuffers;
64     DWORD           dwFreeHwMixingAllBuffers;
65     DWORD           dwFreeHwMixingStaticBuffers;
66     DWORD           dwFreeHwMixingStreamingBuffers;
67     DWORD           dwMaxHw3DAllBuffers;
68     DWORD           dwMaxHw3DStaticBuffers;
69     DWORD           dwMaxHw3DStreamingBuffers;
70     DWORD           dwFreeHw3DAllBuffers;
71     DWORD           dwFreeHw3DStaticBuffers;
72     DWORD           dwFreeHw3DStreamingBuffers;
73     DWORD           dwTotalHwMemBytes;
74     DWORD           dwFreeHwMemBytes;
75     DWORD           dwMaxContigFreeHwMemBytes;
76     DWORD           dwUnlockTransferRateHwBuffers;
77     DWORD           dwPlayCpuOverheadSwBuffers;
78     DWORD           dwReserved1;
79     DWORD           dwReserved2;
80 } DSCAPS, *LPDSCAPS;
81
82 typedef const DSCAPS *LPCDSCAPS;
83
84 typedef struct _DSBCAPS
85 {
86     DWORD           dwSize;
87     DWORD           dwFlags;
88     DWORD           dwBufferBytes;
89     DWORD           dwUnlockTransferRate;
90     DWORD           dwPlayCpuOverhead;
91 } DSBCAPS, *LPDSBCAPS;
92
93 typedef const DSBCAPS *LPCDSBCAPS;
94
95 typedef struct _DSBUFFERDESC
96 {
97     DWORD           dwSize;
98     DWORD           dwFlags;
99     DWORD           dwBufferBytes;
100     DWORD           dwReserved;
101     LPWAVEFORMATEX  lpwfxFormat;
102 } DSBUFFERDESC, *LPDSBUFFERDESC;
103
104 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
105
106 typedef struct _DS3DBUFFER
107 {
108     DWORD           dwSize;
109     D3DVECTOR       vPosition;
110     D3DVECTOR       vVelocity;
111     DWORD           dwInsideConeAngle;
112     DWORD           dwOutsideConeAngle;
113     D3DVECTOR       vConeOrientation;
114     LONG            lConeOutsideVolume;
115     D3DVALUE        flMinDistance;
116     D3DVALUE        flMaxDistance;
117     DWORD           dwMode;
118 } DS3DBUFFER, *LPDS3DBUFFER;
119
120 typedef const DS3DBUFFER *LPCDS3DBUFFER;
121
122 typedef struct _DS3DLISTENER
123 {
124     DWORD           dwSize;
125     D3DVECTOR       vPosition;
126     D3DVECTOR       vVelocity;
127     D3DVECTOR       vOrientFront;
128     D3DVECTOR       vOrientTop;
129     D3DVALUE        flDistanceFactor;
130     D3DVALUE        flRolloffFactor;
131     D3DVALUE        flDopplerFactor;
132 } DS3DLISTENER, *LPDS3DLISTENER;
133
134 typedef const DS3DLISTENER *LPCDS3DLISTENER;
135
136 typedef struct _DSCCAPS
137 {
138     DWORD           dwSize;
139     DWORD           dwFlags;
140     DWORD           dwFormats;
141     DWORD           dwChannels;
142 } DSCCAPS, *LPDSCCAPS;
143
144 typedef const DSCCAPS *LPCDSCCAPS;
145
146 typedef struct _DSCBUFFERDESC
147 {
148     DWORD           dwSize;
149     DWORD           dwFlags;
150     DWORD           dwBufferBytes;
151     DWORD           dwReserved;
152     LPWAVEFORMATEX  lpwfxFormat;
153 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
154
155 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
156
157 typedef struct _DSCBCAPS 
158 {
159     DWORD           dwSize;
160     DWORD           dwFlags;
161     DWORD           dwBufferBytes;
162     DWORD           dwReserved;
163 } DSCBCAPS, *LPDSCBCAPS;
164
165 typedef const DSCBCAPS *LPCDSCBCAPS;
166
167 typedef struct _DSBPOSITIONNOTIFY
168 {
169     DWORD           dwOffset;
170     HANDLE          hEventNotify;
171 } DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
172
173 typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
174
175 //
176 // Compatibility typedefs
177 //
178
179 typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
180 typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
181 typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
182 typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
183 typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
184 typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
185 typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
186 typedef LPVOID *LPLPVOID;
187 //typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
188
189 //
190 // DirectSound API
191 //
192
193 typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
194 typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
195
196 extern HRESULT WINAPI DirectSoundCreate(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
197 extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
198 extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
199
200 extern HRESULT WINAPI DirectSoundCaptureCreate(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
201 extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
202 extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
203
204 #ifdef UNICODE
205 #define LPDSENUMCALLBACK            LPDSENUMCALLBACKW
206 #define DirectSoundEnumerate        DirectSoundEnumerateW
207 #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
208 #else // UNICODE
209 #define LPDSENUMCALLBACK            LPDSENUMCALLBACKA
210 #define DirectSoundEnumerate        DirectSoundEnumerateA
211 #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
212 #endif // UNICODE
213
214 //
215 // IDirectSound
216 //
217
218 DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
219
220 #undef INTERFACE
221 #define INTERFACE IDirectSound
222
223 DECLARE_INTERFACE_(IDirectSound, IUnknown)
224 {
225     // IUnknown methods
226     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
227     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
228     STDMETHOD_(ULONG,Release)       (THIS) PURE;
229     
230     // IDirectSound methods
231     STDMETHOD(CreateSoundBuffer)    (THIS_ LPCDSBUFFERDESC, LPDIRECTSOUNDBUFFER *, LPUNKNOWN) PURE;
232     STDMETHOD(GetCaps)              (THIS_ LPDSCAPS) PURE;
233     STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER, LPDIRECTSOUNDBUFFER *) PURE;
234     STDMETHOD(SetCooperativeLevel)  (THIS_ HWND, DWORD) PURE;
235     STDMETHOD(Compact)              (THIS) PURE;
236     STDMETHOD(GetSpeakerConfig)     (THIS_ LPDWORD) PURE;
237     STDMETHOD(SetSpeakerConfig)     (THIS_ DWORD) PURE;
238     STDMETHOD(Initialize)           (THIS_ LPGUID) PURE;
239 };
240
241 #if !defined(__cplusplus) || defined(CINTERFACE)
242 #define IDirectSound_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
243 #define IDirectSound_AddRef(p)                   (p)->lpVtbl->AddRef(p)
244 #define IDirectSound_Release(p)                  (p)->lpVtbl->Release(p)
245 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
246 #define IDirectSound_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
247 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
248 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
249 #define IDirectSound_Compact(p)                  (p)->lpVtbl->Compact(p)
250 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
251 #define IDirectSound_SetSpeakerConfig(p,b)       (p)->lpVtbl->SetSpeakerConfig(p,b)
252 #define IDirectSound_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
253 #else // !defined(__cplusplus) || defined(CINTERFACE)
254 #define IDirectSound_QueryInterface(p,a,b)       (p)->QueryInterface(a,b)
255 #define IDirectSound_AddRef(p)                   (p)->AddRef()
256 #define IDirectSound_Release(p)                  (p)->Release()
257 #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
258 #define IDirectSound_GetCaps(p,a)                (p)->GetCaps(a)
259 #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
260 #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
261 #define IDirectSound_Compact(p)                  (p)->Compact()
262 #define IDirectSound_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
263 #define IDirectSound_SetSpeakerConfig(p,b)       (p)->SetSpeakerConfig(b)
264 #define IDirectSound_Initialize(p,a)             (p)->Initialize(a)
265 #endif // !defined(__cplusplus) || defined(CINTERFACE)
266
267 //
268 // IDirectSoundBuffer
269 //
270
271 DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
272
273 #undef INTERFACE
274 #define INTERFACE IDirectSoundBuffer
275
276 DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
277 {
278     // IUnknown methods
279     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *) PURE;
280     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
281     STDMETHOD_(ULONG,Release)       (THIS) PURE;
282     
283     // IDirectSoundBuffer methods
284     STDMETHOD(GetCaps)              (THIS_ LPDSBCAPS) PURE;
285     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD, LPDWORD) PURE;
286     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
287     STDMETHOD(GetVolume)            (THIS_ LPLONG) PURE;
288     STDMETHOD(GetPan)               (THIS_ LPLONG) PURE;
289     STDMETHOD(GetFrequency)         (THIS_ LPDWORD) PURE;
290     STDMETHOD(GetStatus)            (THIS_ LPDWORD) PURE;
291     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUND, LPCDSBUFFERDESC) PURE;
292     STDMETHOD(Lock)                 (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
293     STDMETHOD(Play)                 (THIS_ DWORD, DWORD, DWORD) PURE;
294     STDMETHOD(SetCurrentPosition)   (THIS_ DWORD) PURE;
295     STDMETHOD(SetFormat)            (THIS_ LPCWAVEFORMATEX) PURE;
296     STDMETHOD(SetVolume)            (THIS_ LONG) PURE;
297     STDMETHOD(SetPan)               (THIS_ LONG) PURE;
298     STDMETHOD(SetFrequency)         (THIS_ DWORD) PURE;
299     STDMETHOD(Stop)                 (THIS) PURE;
300     STDMETHOD(Unlock)               (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
301     STDMETHOD(Restore)              (THIS) PURE;
302 };
303
304 #if !defined(__cplusplus) || defined(CINTERFACE)
305 #define IDirectSoundBuffer_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
306 #define IDirectSoundBuffer_AddRef(p)                    (p)->lpVtbl->AddRef(p)
307 #define IDirectSoundBuffer_Release(p)                   (p)->lpVtbl->Release(p)
308 #define IDirectSoundBuffer_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
309 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)    (p)->lpVtbl->GetCurrentPosition(p,a,b)
310 #define IDirectSoundBuffer_GetFormat(p,a,b,c)           (p)->lpVtbl->GetFormat(p,a,b,c)
311 #define IDirectSoundBuffer_GetVolume(p,a)               (p)->lpVtbl->GetVolume(p,a)
312 #define IDirectSoundBuffer_GetPan(p,a)                  (p)->lpVtbl->GetPan(p,a)
313 #define IDirectSoundBuffer_GetFrequency(p,a)            (p)->lpVtbl->GetFrequency(p,a)
314 #define IDirectSoundBuffer_GetStatus(p,a)               (p)->lpVtbl->GetStatus(p,a)
315 #define IDirectSoundBuffer_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
316 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
317 #define IDirectSoundBuffer_Play(p,a,b,c)                (p)->lpVtbl->Play(p,a,b,c)
318 #define IDirectSoundBuffer_SetCurrentPosition(p,a)      (p)->lpVtbl->SetCurrentPosition(p,a)
319 #define IDirectSoundBuffer_SetFormat(p,a)               (p)->lpVtbl->SetFormat(p,a)
320 #define IDirectSoundBuffer_SetVolume(p,a)               (p)->lpVtbl->SetVolume(p,a)
321 #define IDirectSoundBuffer_SetPan(p,a)                  (p)->lpVtbl->SetPan(p,a)
322 #define IDirectSoundBuffer_SetFrequency(p,a)            (p)->lpVtbl->SetFrequency(p,a)
323 #define IDirectSoundBuffer_Stop(p)                      (p)->lpVtbl->Stop(p)
324 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)            (p)->lpVtbl->Unlock(p,a,b,c,d)
325 #define IDirectSoundBuffer_Restore(p)                   (p)->lpVtbl->Restore(p)
326 #else // !defined(__cplusplus) || defined(CINTERFACE)
327 #define IDirectSoundBuffer_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
328 #define IDirectSoundBuffer_AddRef(p)                    (p)->AddRef()
329 #define IDirectSoundBuffer_Release(p)                   (p)->Release()
330 #define IDirectSoundBuffer_GetCaps(p,a)                 (p)->GetCaps(a)
331 #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)    (p)->GetCurrentPosition(a,b)
332 #define IDirectSoundBuffer_GetFormat(p,a,b,c)           (p)->GetFormat(a,b,c)
333 #define IDirectSoundBuffer_GetVolume(p,a)               (p)->GetVolume(a)
334 #define IDirectSoundBuffer_GetPan(p,a)                  (p)->GetPan(a)
335 #define IDirectSoundBuffer_GetFrequency(p,a)            (p)->GetFrequency(a)
336 #define IDirectSoundBuffer_GetStatus(p,a)               (p)->GetStatus(a)
337 #define IDirectSoundBuffer_Initialize(p,a,b)            (p)->Initialize(a,b)
338 #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->Lock(a,b,c,d,e,f,g)
339 #define IDirectSoundBuffer_Play(p,a,b,c)                (p)->Play(a,b,c)
340 #define IDirectSoundBuffer_SetCurrentPosition(p,a)      (p)->SetCurrentPosition(a)
341 #define IDirectSoundBuffer_SetFormat(p,a)               (p)->SetFormat(a)
342 #define IDirectSoundBuffer_SetVolume(p,a)               (p)->SetVolume(a)
343 #define IDirectSoundBuffer_SetPan(p,a)                  (p)->SetPan(a)
344 #define IDirectSoundBuffer_SetFrequency(p,a)            (p)->SetFrequency(a)
345 #define IDirectSoundBuffer_Stop(p)                      (p)->Stop()
346 #define IDirectSoundBuffer_Unlock(p,a,b,c,d)            (p)->Unlock(a,b,c,d)
347 #define IDirectSoundBuffer_Restore(p)                   (p)->Restore()
348 #endif // !defined(__cplusplus) || defined(CINTERFACE)
349
350 //
351 // IDirectSound3DListener
352 //
353
354 DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
355
356 #undef INTERFACE
357 #define INTERFACE IDirectSound3DListener
358
359 DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
360 {
361     // IUnknown methods
362     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID FAR *) PURE;
363     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
364     STDMETHOD_(ULONG,Release)           (THIS) PURE;
365
366     // IDirectSound3D methods
367     STDMETHOD(GetAllParameters)         (THIS_ LPDS3DLISTENER) PURE;
368     STDMETHOD(GetDistanceFactor)        (THIS_ LPD3DVALUE) PURE;
369     STDMETHOD(GetDopplerFactor)         (THIS_ LPD3DVALUE) PURE;
370     STDMETHOD(GetOrientation)           (THIS_ LPD3DVECTOR, LPD3DVECTOR) PURE;
371     STDMETHOD(GetPosition)              (THIS_ LPD3DVECTOR) PURE;
372     STDMETHOD(GetRolloffFactor)         (THIS_ LPD3DVALUE) PURE;
373     STDMETHOD(GetVelocity)              (THIS_ LPD3DVECTOR) PURE;
374     STDMETHOD(SetAllParameters)         (THIS_ LPCDS3DLISTENER, DWORD) PURE;
375     STDMETHOD(SetDistanceFactor)        (THIS_ D3DVALUE, DWORD) PURE;
376     STDMETHOD(SetDopplerFactor)         (THIS_ D3DVALUE, DWORD) PURE;
377     STDMETHOD(SetOrientation)           (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
378     STDMETHOD(SetPosition)              (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
379     STDMETHOD(SetRolloffFactor)         (THIS_ D3DVALUE, DWORD) PURE;
380     STDMETHOD(SetVelocity)              (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
381     STDMETHOD(CommitDeferredSettings)   (THIS) PURE;
382 };
383
384 #if !defined(__cplusplus) || defined(CINTERFACE)
385 #define IDirectSound3DListener_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
386 #define IDirectSound3DListener_AddRef(p)                        (p)->lpVtbl->AddRef(p)
387 #define IDirectSound3DListener_Release(p)                       (p)->lpVtbl->Release(p)
388 #define IDirectSound3DListener_GetAllParameters(p,a)            (p)->lpVtbl->GetAllParameters(p,a)
389 #define IDirectSound3DListener_GetDistanceFactor(p,a)           (p)->lpVtbl->GetDistanceFactor(p,a)
390 #define IDirectSound3DListener_GetDopplerFactor(p,a)            (p)->lpVtbl->GetDopplerFactor(p,a)
391 #define IDirectSound3DListener_GetOrientation(p,a,b)            (p)->lpVtbl->GetOrientation(p,a,b)
392 #define IDirectSound3DListener_GetPosition(p,a)                 (p)->lpVtbl->GetPosition(p,a)
393 #define IDirectSound3DListener_GetRolloffFactor(p,a)            (p)->lpVtbl->GetRolloffFactor(p,a)
394 #define IDirectSound3DListener_GetVelocity(p,a)                 (p)->lpVtbl->GetVelocity(p,a)
395 #define IDirectSound3DListener_SetAllParameters(p,a,b)          (p)->lpVtbl->SetAllParameters(p,a,b)
396 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)         (p)->lpVtbl->SetDistanceFactor(p,a,b)
397 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)          (p)->lpVtbl->SetDopplerFactor(p,a,b)
398 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g)  (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
399 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)           (p)->lpVtbl->SetPosition(p,a,b,c,d)
400 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)          (p)->lpVtbl->SetRolloffFactor(p,a,b)
401 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)           (p)->lpVtbl->SetVelocity(p,a,b,c,d)
402 #define IDirectSound3DListener_CommitDeferredSettings(p)        (p)->lpVtbl->CommitDeferredSettings(p)
403 #else // !defined(__cplusplus) || defined(CINTERFACE)
404 #define IDirectSound3DListener_QueryInterface(p,a,b)            (p)->QueryInterface(a,b)
405 #define IDirectSound3DListener_AddRef(p)                        (p)->AddRef()
406 #define IDirectSound3DListener_Release(p)                       (p)->Release()
407 #define IDirectSound3DListener_GetAllParameters(p,a)            (p)->GetAllParameters(a)
408 #define IDirectSound3DListener_GetDistanceFactor(p,a)           (p)->GetDistanceFactor(a)
409 #define IDirectSound3DListener_GetDopplerFactor(p,a)            (p)->GetDopplerFactor(a)
410 #define IDirectSound3DListener_GetOrientation(p,a,b)            (p)->GetOrientation(a,b)
411 #define IDirectSound3DListener_GetPosition(p,a)                 (p)->GetPosition(a)
412 #define IDirectSound3DListener_GetRolloffFactor(p,a)            (p)->GetRolloffFactor(a)
413 #define IDirectSound3DListener_GetVelocity(p,a)                 (p)->GetVelocity(a)
414 #define IDirectSound3DListener_SetAllParameters(p,a,b)          (p)->SetAllParameters(a,b)
415 #define IDirectSound3DListener_SetDistanceFactor(p,a,b)         (p)->SetDistanceFactor(a,b)
416 #define IDirectSound3DListener_SetDopplerFactor(p,a,b)          (p)->SetDopplerFactor(a,b)
417 #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g)  (p)->SetOrientation(a,b,c,d,e,f,g)
418 #define IDirectSound3DListener_SetPosition(p,a,b,c,d)           (p)->SetPosition(a,b,c,d)
419 #define IDirectSound3DListener_SetRolloffFactor(p,a,b)          (p)->SetRolloffFactor(a,b)
420 #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)           (p)->SetVelocity(a,b,c,d)
421 #define IDirectSound3DListener_CommitDeferredSettings(p)        (p)->CommitDeferredSettings()
422 #endif // !defined(__cplusplus) || defined(CINTERFACE)
423
424 //
425 // IDirectSound3DBuffer
426 //
427
428 DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
429
430 #undef INTERFACE
431 #define INTERFACE IDirectSound3DBuffer
432
433 DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
434 {
435     // IUnknown methods
436     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
437     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
438     STDMETHOD_(ULONG,Release)       (THIS) PURE;
439
440     // IDirectSoundBuffer3D methods
441     STDMETHOD(GetAllParameters)     (THIS_ LPDS3DBUFFER) PURE;
442     STDMETHOD(GetConeAngles)        (THIS_ LPDWORD, LPDWORD) PURE;
443     STDMETHOD(GetConeOrientation)   (THIS_ LPD3DVECTOR) PURE;
444     STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG) PURE;
445     STDMETHOD(GetMaxDistance)       (THIS_ LPD3DVALUE) PURE;
446     STDMETHOD(GetMinDistance)       (THIS_ LPD3DVALUE) PURE;
447     STDMETHOD(GetMode)              (THIS_ LPDWORD) PURE;
448     STDMETHOD(GetPosition)          (THIS_ LPD3DVECTOR) PURE;
449     STDMETHOD(GetVelocity)          (THIS_ LPD3DVECTOR) PURE;
450     STDMETHOD(SetAllParameters)     (THIS_ LPCDS3DBUFFER, DWORD) PURE;
451     STDMETHOD(SetConeAngles)        (THIS_ DWORD, DWORD, DWORD) PURE;
452     STDMETHOD(SetConeOrientation)   (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
453     STDMETHOD(SetConeOutsideVolume) (THIS_ LONG, DWORD) PURE;
454     STDMETHOD(SetMaxDistance)       (THIS_ D3DVALUE, DWORD) PURE;
455     STDMETHOD(SetMinDistance)       (THIS_ D3DVALUE, DWORD) PURE;
456     STDMETHOD(SetMode)              (THIS_ DWORD, DWORD) PURE;
457     STDMETHOD(SetPosition)          (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
458     STDMETHOD(SetVelocity)          (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
459 };
460
461 #if !defined(__cplusplus) || defined(CINTERFACE)
462 #define IDirectSound3DBuffer_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
463 #define IDirectSound3DBuffer_AddRef(p)                  (p)->lpVtbl->AddRef(p)
464 #define IDirectSound3DBuffer_Release(p)                 (p)->lpVtbl->Release(p)
465 #define IDirectSound3DBuffer_GetAllParameters(p,a)      (p)->lpVtbl->GetAllParameters(p,a)
466 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)       (p)->lpVtbl->GetConeAngles(p,a,b)
467 #define IDirectSound3DBuffer_GetConeOrientation(p,a)    (p)->lpVtbl->GetConeOrientation(p,a)
468 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)  (p)->lpVtbl->GetConeOutsideVolume(p,a)
469 #define IDirectSound3DBuffer_GetPosition(p,a)           (p)->lpVtbl->GetPosition(p,a)
470 #define IDirectSound3DBuffer_GetMinDistance(p,a)        (p)->lpVtbl->GetMinDistance(p,a)
471 #define IDirectSound3DBuffer_GetMaxDistance(p,a)        (p)->lpVtbl->GetMaxDistance(p,a)
472 #define IDirectSound3DBuffer_GetMode(p,a)               (p)->lpVtbl->GetMode(p,a)
473 #define IDirectSound3DBuffer_GetVelocity(p,a)           (p)->lpVtbl->GetVelocity(p,a)
474 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)    (p)->lpVtbl->SetAllParameters(p,a,b)
475 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)     (p)->lpVtbl->SetConeAngles(p,a,b,c)
476 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
477 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->lpVtbl->SetConeOutsideVolume(p,a,b)
478 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)     (p)->lpVtbl->SetPosition(p,a,b,c,d)
479 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)      (p)->lpVtbl->SetMinDistance(p,a,b)
480 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)      (p)->lpVtbl->SetMaxDistance(p,a,b)
481 #define IDirectSound3DBuffer_SetMode(p,a,b)             (p)->lpVtbl->SetMode(p,a,b)
482 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)     (p)->lpVtbl->SetVelocity(p,a,b,c,d)
483 #else // !defined(__cplusplus) || defined(CINTERFACE)
484 #define IDirectSound3DBuffer_QueryInterface(p,a,b)      (p)->QueryInterface(a,b)
485 #define IDirectSound3DBuffer_AddRef(p)                  (p)->AddRef()
486 #define IDirectSound3DBuffer_Release(p)                 (p)->Release()
487 #define IDirectSound3DBuffer_GetAllParameters(p,a)      (p)->GetAllParameters(a)
488 #define IDirectSound3DBuffer_GetConeAngles(p,a,b)       (p)->GetConeAngles(a,b)
489 #define IDirectSound3DBuffer_GetConeOrientation(p,a)    (p)->GetConeOrientation(a)
490 #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)  (p)->GetConeOutsideVolume(a)
491 #define IDirectSound3DBuffer_GetPosition(p,a)           (p)->GetPosition(a)
492 #define IDirectSound3DBuffer_GetMinDistance(p,a)        (p)->GetMinDistance(a)
493 #define IDirectSound3DBuffer_GetMaxDistance(p,a)        (p)->GetMaxDistance(a)
494 #define IDirectSound3DBuffer_GetMode(p,a)               (p)->GetMode(a)
495 #define IDirectSound3DBuffer_GetVelocity(p,a)           (p)->GetVelocity(a)
496 #define IDirectSound3DBuffer_SetAllParameters(p,a,b)    (p)->SetAllParameters(a,b)
497 #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)     (p)->SetConeAngles(a,b,c)
498 #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
499 #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->SetConeOutsideVolume(a,b)
500 #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)     (p)->SetPosition(a,b,c,d)
501 #define IDirectSound3DBuffer_SetMinDistance(p,a,b)      (p)->SetMinDistance(a,b)
502 #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)      (p)->SetMaxDistance(a,b)
503 #define IDirectSound3DBuffer_SetMode(p,a,b)             (p)->SetMode(a,b)
504 #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)     (p)->SetVelocity(a,b,c,d)
505 #endif // !defined(__cplusplus) || defined(CINTERFACE)
506
507 //
508 // IDirectSoundCapture
509 //
510
511 DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
512
513 #undef INTERFACE
514 #define INTERFACE IDirectSoundCapture
515
516 DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
517 {
518     // IUnknown methods
519     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
520     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
521     STDMETHOD_(ULONG,Release)       (THIS) PURE;
522
523     // IDirectSoundCapture methods
524     STDMETHOD(CreateCaptureBuffer)  (THIS_ LPCDSCBUFFERDESC, LPDIRECTSOUNDCAPTUREBUFFER *, LPUNKNOWN) PURE;
525     STDMETHOD(GetCaps)              (THIS_ LPDSCCAPS ) PURE;
526     STDMETHOD(Initialize)           (THIS_ LPGUID) PURE;
527 };
528
529 #if !defined(__cplusplus) || defined(CINTERFACE)
530 #define IDirectSoundCapture_QueryInterface(p,a,b)           (p)->lpVtbl->QueryInterface(p,a,b)
531 #define IDirectSoundCapture_AddRef(p)                       (p)->lpVtbl->AddRef(p)
532 #define IDirectSoundCapture_Release(p)                      (p)->lpVtbl->Release(p)
533 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c)    (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
534 #define IDirectSoundCapture_GetCaps(p,a)                    (p)->lpVtbl->GetCaps(p,a)
535 #define IDirectSoundCapture_Initialize(p,a)                 (p)->lpVtbl->Initialize(p,a)
536 #else // !defined(__cplusplus) || defined(CINTERFACE)
537 #define IDirectSoundCapture_QueryInterface(p,a,b)           (p)->QueryInterface(a,b)
538 #define IDirectSoundCapture_AddRef(p)                       (p)->AddRef()
539 #define IDirectSoundCapture_Release(p)                      (p)->Release()
540 #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c)    (p)->CreateCaptureBuffer(a,b,c)
541 #define IDirectSoundCapture_GetCaps(p,a)                    (p)->GetCaps(a)
542 #define IDirectSoundCapture_Initialize(p,a)                 (p)->Initialize(a)
543 #endif // !defined(__cplusplus) || defined(CINTERFACE)
544
545 //
546 // IDirectSoundCaptureBuffer
547 //
548
549 DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
550
551 #undef INTERFACE
552 #define INTERFACE IDirectSoundCaptureBuffer
553
554 DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
555 {
556     // IUnknown methods
557     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
558     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
559     STDMETHOD_(ULONG,Release)       (THIS) PURE;
560
561     // IDirectSoundCaptureBuffer methods
562     STDMETHOD(GetCaps)              (THIS_ LPDSCBCAPS ) PURE;
563     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD, LPDWORD ) PURE;
564     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) PURE;
565     STDMETHOD(GetStatus)            (THIS_ LPDWORD ) PURE;
566     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUNDCAPTURE, LPCDSCBUFFERDESC) PURE;
567     STDMETHOD(Lock)                 (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
568     STDMETHOD(Start)                (THIS_ DWORD) PURE;
569     STDMETHOD(Stop)                 (THIS) PURE;
570     STDMETHOD(Unlock)               (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
571 };
572
573 #if !defined(__cplusplus) || defined(CINTERFACE)
574 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
575 #define IDirectSoundCaptureBuffer_AddRef(p)                    (p)->lpVtbl->AddRef(p)
576 #define IDirectSoundCaptureBuffer_Release(p)                   (p)->lpVtbl->Release(p)
577 #define IDirectSoundCaptureBuffer_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
578 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)    (p)->lpVtbl->GetCurrentPosition(p,a,b)
579 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)           (p)->lpVtbl->GetFormat(p,a,b,c)
580 #define IDirectSoundCaptureBuffer_GetStatus(p,a)               (p)->lpVtbl->GetStatus(p,a)
581 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
582 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
583 #define IDirectSoundCaptureBuffer_Start(p,a)                   (p)->lpVtbl->Start(p,a)
584 #define IDirectSoundCaptureBuffer_Stop(p)                      (p)->lpVtbl->Stop(p)
585 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)            (p)->lpVtbl->Unlock(p,a,b,c,d)
586 #else // !defined(__cplusplus) || defined(CINTERFACE)
587 #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
588 #define IDirectSoundCaptureBuffer_AddRef(p)                    (p)->AddRef()
589 #define IDirectSoundCaptureBuffer_Release(p)                   (p)->Release()
590 #define IDirectSoundCaptureBuffer_GetCaps(p,a)                 (p)->GetCaps(a)
591 #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)    (p)->GetCurrentPosition(a,b)
592 #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)           (p)->GetFormat(a,b,c)
593 #define IDirectSoundCaptureBuffer_GetStatus(p,a)               (p)->GetStatus(a)
594 #define IDirectSoundCaptureBuffer_Initialize(p,a,b)            (p)->Initialize(a,b)
595 #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->Lock(a,b,c,d,e,f,g)
596 #define IDirectSoundCaptureBuffer_Start(p,a)                   (p)->Start(a)
597 #define IDirectSoundCaptureBuffer_Stop(p)                      (p)->Stop()
598 #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)            (p)->Unlock(a,b,c,d)
599 #endif // !defined(__cplusplus) || defined(CINTERFACE)
600
601 //
602 // IDirectSoundNotify
603 //
604
605 DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
606
607 #undef INTERFACE
608 #define INTERFACE IDirectSoundNotify
609
610 DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
611 {
612     // IUnknown methods
613     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID *) PURE;
614     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
615     STDMETHOD_(ULONG,Release)           (THIS) PURE;
616
617     // IDirectSoundNotify methods
618     STDMETHOD(SetNotificationPositions) (THIS_ DWORD, LPCDSBPOSITIONNOTIFY) PURE;
619 };
620
621 #if !defined(__cplusplus) || defined(CINTERFACE)
622 #define IDirectSoundNotify_QueryInterface(p,a,b)            (p)->lpVtbl->QueryInterface(p,a,b)
623 #define IDirectSoundNotify_AddRef(p)                        (p)->lpVtbl->AddRef(p)
624 #define IDirectSoundNotify_Release(p)                       (p)->lpVtbl->Release(p)
625 #define IDirectSoundNotify_SetNotificationPositions(p,a,b)  (p)->lpVtbl->SetNotificationPositions(p,a,b)
626 #else // !defined(__cplusplus) || defined(CINTERFACE)
627 #define IDirectSoundNotify_QueryInterface(p,a,b)            (p)->QueryInterface(a,b)
628 #define IDirectSoundNotify_AddRef(p)                        (p)->AddRef()
629 #define IDirectSoundNotify_Release(p)                       (p)->Release()
630 #define IDirectSoundNotify_SetNotificationPositions(p,a,b)  (p)->SetNotificationPositions(a,b)
631 #endif // !defined(__cplusplus) || defined(CINTERFACE)
632
633 //
634 // IKsPropertySet
635 //
636
637 #ifndef _IKsPropertySet_
638 #define _IKsPropertySet_
639
640 #ifdef __cplusplus
641 // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
642 struct IKsPropertySet;
643 #endif // __cplusplus
644
645 typedef struct IKsPropertySet *LPKSPROPERTYSET;
646
647 #define KSPROPERTY_SUPPORT_GET  0x00000001
648 #define KSPROPERTY_SUPPORT_SET  0x00000002
649
650 DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
651
652 #undef INTERFACE
653 #define INTERFACE IKsPropertySet
654
655 DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
656 {
657     // IUnknown methods
658     STDMETHOD(QueryInterface)   (THIS_ REFIID, LPVOID *) PURE;
659     STDMETHOD_(ULONG,AddRef)    (THIS) PURE;
660     STDMETHOD_(ULONG,Release)   (THIS) PURE;
661
662     // IKsPropertySet methods
663     STDMETHOD(Get)              (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG, PULONG) PURE;
664     STDMETHOD(Set)              (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG) PURE;
665     STDMETHOD(QuerySupport)     (THIS_ REFGUID, ULONG, PULONG) PURE;
666 };
667
668 #if !defined(__cplusplus) || defined(CINTERFACE)
669 #define IKsPropertySet_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
670 #define IKsPropertySet_AddRef(p)                   (p)->lpVtbl->AddRef(p)
671 #define IKsPropertySet_Release(p)                  (p)->lpVtbl->Release(p)
672 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)        (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
673 #define IKsPropertySet_Set(p,a,b,c,d,e,f)          (p)->lpVtbl->Set(p,a,b,c,d,e,f)
674 #define IKsPropertySet_QuerySupport(p,a,b,c)       (p)->lpVtbl->QuerySupport(p,a,b,c)
675 #else // !defined(__cplusplus) || defined(CINTERFACE)
676 #define IKsPropertySet_QueryInterface(p,a,b)       (p)->QueryInterface(a,b)
677 #define IKsPropertySet_AddRef(p)                   (p)->AddRef()
678 #define IKsPropertySet_Release(p)                  (p)->Release()
679 #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)        (p)->Get(a,b,c,d,e,f,g)
680 #define IKsPropertySet_Set(p,a,b,c,d,e,f)          (p)->Set(a,b,c,d,e,f)
681 #define IKsPropertySet_QuerySupport(p,a,b,c)       (p)->QuerySupport(a,b,c)
682 #endif // !defined(__cplusplus) || defined(CINTERFACE)
683
684 #endif // _IKsPropertySet_
685
686 //
687 // Return Codes
688 //
689
690 #define DS_OK                           0
691
692 // The call failed because resources (such as a priority level)
693 // were already being used by another caller.
694 #define DSERR_ALLOCATED                 MAKE_DSHRESULT(10)
695
696 // The control (vol,pan,etc.) requested by the caller is not available.
697 #define DSERR_CONTROLUNAVAIL            MAKE_DSHRESULT(30)
698
699 // An invalid parameter was passed to the returning function
700 #define DSERR_INVALIDPARAM              E_INVALIDARG
701
702 // This call is not valid for the current state of this object
703 #define DSERR_INVALIDCALL               MAKE_DSHRESULT(50)
704
705 // An undetermined error occured inside the DirectSound subsystem
706 #define DSERR_GENERIC                   E_FAIL
707
708 // The caller does not have the priority level required for the function to
709 // succeed.
710 #define DSERR_PRIOLEVELNEEDED           MAKE_DSHRESULT(70)
711
712 // Not enough free memory is available to complete the operation
713 #define DSERR_OUTOFMEMORY               E_OUTOFMEMORY
714
715 // The specified WAVE format is not supported
716 #define DSERR_BADFORMAT                 MAKE_DSHRESULT(100)
717
718 // The function called is not supported at this time
719 #define DSERR_UNSUPPORTED               E_NOTIMPL
720
721 // No sound driver is available for use
722 #define DSERR_NODRIVER                  MAKE_DSHRESULT(120)
723
724 // This object is already initialized
725 #define DSERR_ALREADYINITIALIZED        MAKE_DSHRESULT(130)
726
727 // This object does not support aggregation
728 #define DSERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
729
730 // The buffer memory has been lost, and must be restored.
731 #define DSERR_BUFFERLOST                MAKE_DSHRESULT(150)
732
733 // Another app has a higher priority level, preventing this call from
734 // succeeding.
735 #define DSERR_OTHERAPPHASPRIO           MAKE_DSHRESULT(160)
736
737 // This object has not been initialized
738 #define DSERR_UNINITIALIZED             MAKE_DSHRESULT(170)
739
740 // The requested COM interface is not available
741 #define DSERR_NOINTERFACE               E_NOINTERFACE
742
743 //
744 // Flags
745 //
746
747 #define DSCAPS_PRIMARYMONO          0x00000001
748 #define DSCAPS_PRIMARYSTEREO        0x00000002
749 #define DSCAPS_PRIMARY8BIT          0x00000004
750 #define DSCAPS_PRIMARY16BIT         0x00000008
751 #define DSCAPS_CONTINUOUSRATE       0x00000010
752 #define DSCAPS_EMULDRIVER           0x00000020
753 #define DSCAPS_CERTIFIED            0x00000040
754 #define DSCAPS_SECONDARYMONO        0x00000100
755 #define DSCAPS_SECONDARYSTEREO      0x00000200
756 #define DSCAPS_SECONDARY8BIT        0x00000400
757 #define DSCAPS_SECONDARY16BIT       0x00000800
758
759 #define DSBPLAY_LOOPING             0x00000001
760       
761 #define DSBSTATUS_PLAYING           0x00000001
762 #define DSBSTATUS_BUFFERLOST        0x00000002
763 #define DSBSTATUS_LOOPING           0x00000004
764
765 #define DSBLOCK_FROMWRITECURSOR     0x00000001
766 #define DSBLOCK_ENTIREBUFFER        0x00000002
767
768 #define DSSCL_NORMAL                0x00000001
769 #define DSSCL_PRIORITY              0x00000002
770 #define DSSCL_EXCLUSIVE             0x00000003
771 #define DSSCL_WRITEPRIMARY          0x00000004
772
773 #define DS3DMODE_NORMAL             0x00000000
774 #define DS3DMODE_HEADRELATIVE       0x00000001
775 #define DS3DMODE_DISABLE            0x00000002
776
777 #define DS3D_IMMEDIATE              0x00000000
778 #define DS3D_DEFERRED               0x00000001
779
780 #define DS3D_MINDISTANCEFACTOR      0.0f
781 #define DS3D_MAXDISTANCEFACTOR      10.0f
782 #define DS3D_DEFAULTDISTANCEFACTOR  1.0f
783
784 #define DS3D_MINROLLOFFFACTOR       0.0f
785 #define DS3D_MAXROLLOFFFACTOR       10.0f
786 #define DS3D_DEFAULTROLLOFFFACTOR   1.0f
787
788 #define DS3D_MINDOPPLERFACTOR       0.0f
789 #define DS3D_MAXDOPPLERFACTOR       10.0f
790 #define DS3D_DEFAULTDOPPLERFACTOR   1.0f
791
792 #define DS3D_DEFAULTMINDISTANCE     1.0f
793 #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f
794
795 #define DS3D_MINCONEANGLE           0
796 #define DS3D_MAXCONEANGLE           360
797 #define DS3D_DEFAULTCONEANGLE       360
798
799 #define DS3D_DEFAULTCONEOUTSIDEVOLUME   0
800
801 #define DSBCAPS_PRIMARYBUFFER       0x00000001
802 #define DSBCAPS_STATIC              0x00000002
803 #define DSBCAPS_LOCHARDWARE         0x00000004
804 #define DSBCAPS_LOCSOFTWARE         0x00000008
805 #define DSBCAPS_CTRL3D              0x00000010
806 #define DSBCAPS_CTRLFREQUENCY       0x00000020
807 #define DSBCAPS_CTRLPAN             0x00000040
808 #define DSBCAPS_CTRLVOLUME          0x00000080
809 #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100
810 #define DSBCAPS_CTRLDEFAULT         0x000000E0
811 #define DSBCAPS_CTRLALL             0x000001F0
812 #define DSBCAPS_STICKYFOCUS         0x00004000
813 #define DSBCAPS_GLOBALFOCUS         0x00008000 
814 #define DSBCAPS_GETCURRENTPOSITION2 0x00010000
815 #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
816
817 #define DSCBCAPS_WAVEMAPPED         0x80000000
818
819 #define DSSPEAKER_HEADPHONE         0x00000001
820 #define DSSPEAKER_MONO              0x00000002
821 #define DSSPEAKER_QUAD              0x00000003
822 #define DSSPEAKER_STEREO            0x00000004
823 #define DSSPEAKER_SURROUND          0x00000005
824
825 #define DSSPEAKER_GEOMETRY_MIN      0x00000005  //   5 degrees
826 #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  //  10 degrees
827 #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  //  20 degrees
828 #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  // 180 degrees
829
830 #define DSSPEAKER_COMBINED(c, g)    ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
831 #define DSSPEAKER_CONFIG(a)         ((BYTE)(a))
832 #define DSSPEAKER_GEOMETRY(a)       ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
833
834 #define DSCCAPS_EMULDRIVER          0x00000020
835
836 #define DSCBLOCK_ENTIREBUFFER       0x00000001
837
838 #define DSCBSTATUS_CAPTURING        0x00000001
839 #define DSCBSTATUS_LOOPING          0x00000002
840
841 #define DSCBSTART_LOOPING           0x00000001
842
843 #define DSBFREQUENCY_MIN            100
844 #define DSBFREQUENCY_MAX            100000
845 #define DSBFREQUENCY_ORIGINAL       0
846
847 #define DSBPAN_LEFT                 -10000
848 #define DSBPAN_CENTER               0
849 #define DSBPAN_RIGHT                10000
850
851 #define DSBVOLUME_MIN               -10000
852 #define DSBVOLUME_MAX               0
853
854 #define DSBSIZE_MIN                 4
855 #define DSBSIZE_MAX                 0x0FFFFFFF
856
857 #define DSBPN_OFFSETSTOP            0xFFFFFFFF
858
859 #ifdef __cplusplus
860 };
861 #endif // __cplusplus
862
863 #endif  // __DSOUND_INCLUDED__