Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

935 lines
40 KiB

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