Leaked source code of windows server 2003
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.

3528 lines
164 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-2001 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dsound.h
  6. * Content: DirectSound include file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 2/10/96 angusm Added CLSID for DirectSound
  12. * 2/11/96 angusm Added DSERR_UNINITIALIZED
  13. * 2/12/96 angusm Added DSSCL_UNINITIALIZED
  14. * 3/5/96 angusm Removed DSSCL_UNINITIALIZED
  15. * 1/29/97 dereks Added boundaries, LPC* and REFGUIDs
  16. * 4/10/97 dereks Added IDirectSoundCapture
  17. * 4/11/97 dereks Added IKsPropertySet
  18. * 4/25/97 johnnyl Added DSCCREATE_WAVEMAPPED flag
  19. * 5/7/97 johnnyl Added DirectSoundCaptureBuffer::Initialize method
  20. * 5/8/97 dereks Backed out REFGUIDs
  21. * 5/9/97 johnnyl Changed DSCCREATE_WAVEMAPPED to DSCBCAPS_WAVEMAPPED
  22. * Added DSCBLOCK_ENTIREBUFFER flag
  23. * 5/29/97 dereks IDirectSoundPropertySet => IKsPropertySet
  24. * 7/10/98 dereks Added DirectX 6.1 features
  25. * 8/19/98 dereks Moved private object to dsprv.h
  26. * 9/15/98 dereks Added DirectX 7.0 features
  27. * 7/6/99 duganp Added DirectX 8.0 features
  28. * 10/29/99 duganp Added DirectX 7.1 features (sic)
  29. * 06/06/00 alanlu Cleaned up DSFX_I3DL2* constants
  30. *@@END_MSINTERNAL
  31. *
  32. **************************************************************************/
  33. #define COM_NO_WINDOWS_H
  34. #include <objbase.h>
  35. #include <float.h>
  36. #ifndef DIRECTSOUND_VERSION
  37. #define DIRECTSOUND_VERSION 0x0800 /* Version 8.0 */
  38. #endif
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif // __cplusplus
  42. #ifndef __DSOUND_INCLUDED__
  43. #define __DSOUND_INCLUDED__
  44. /* Type definitions shared with Direct3D */
  45. #ifndef DX_SHARED_DEFINES
  46. typedef float D3DVALUE, *LPD3DVALUE;
  47. #ifndef D3DCOLOR_DEFINED
  48. typedef DWORD D3DCOLOR;
  49. #define D3DCOLOR_DEFINED
  50. #endif
  51. #ifndef LPD3DCOLOR_DEFINED
  52. typedef DWORD *LPD3DCOLOR;
  53. #define LPD3DCOLOR_DEFINED
  54. #endif
  55. #ifndef D3DVECTOR_DEFINED
  56. typedef struct _D3DVECTOR {
  57. float x;
  58. float y;
  59. float z;
  60. } D3DVECTOR;
  61. #define D3DVECTOR_DEFINED
  62. #endif
  63. #ifndef LPD3DVECTOR_DEFINED
  64. typedef D3DVECTOR *LPD3DVECTOR;
  65. #define LPD3DVECTOR_DEFINED
  66. #endif
  67. #define DX_SHARED_DEFINES
  68. #endif // DX_SHARED_DEFINES
  69. #define _FACDS 0x878 /* DirectSound's facility code */
  70. #define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
  71. // DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000}
  72. DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  73. // DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
  74. DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
  75. // DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16}
  76. DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  77. // DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
  78. DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
  79. // DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D}
  80. DEFINE_GUID(CLSID_DirectSoundFullDuplex, 0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
  81. //@@BEGIN_MSINTERNAL
  82. // DirectSound Buffer Descriptor GUID {B2F586D4-5558-49D1-A07B3249DBBB33C2}
  83. DEFINE_GUID(CLSID_DirectSoundBufferConfig, 0xb2f586d4, 0x5558, 0x49d1, 0xa0, 0x7b, 0x32, 0x49, 0xdb, 0xbb, 0x33, 0xc2);
  84. //@@END_MSINTERNAL
  85. //@@BEGIN_MSINTERNAL
  86. // Magic private DirectSound buffer descriptor GUID {74A794F9-FDD2-4684-88831CB3CA6E6DA6}
  87. DEFINE_GUID(CLSID_PRIVATE_CDirectSoundBufferConfig, 0x74a794f9, 0xfdd2, 0x4684, 0x88, 0x83, 0x1c, 0xb3, 0xca, 0x6e, 0x6d, 0xa6);
  88. //@@END_MSINTERNAL
  89. // DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03}
  90. DEFINE_GUID(DSDEVID_DefaultPlayback, 0xdef00000, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  91. // DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03}
  92. DEFINE_GUID(DSDEVID_DefaultCapture, 0xdef00001, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  93. // DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03}
  94. DEFINE_GUID(DSDEVID_DefaultVoicePlayback, 0xdef00002, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  95. // DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03}
  96. DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xdef00003, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  97. //
  98. // Forward declarations for interfaces.
  99. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  100. //
  101. #ifdef __cplusplus
  102. struct IDirectSound;
  103. struct IDirectSoundBuffer;
  104. struct IDirectSound3DListener;
  105. struct IDirectSound3DBuffer;
  106. struct IDirectSoundCapture;
  107. struct IDirectSoundCaptureBuffer;
  108. struct IDirectSoundNotify;
  109. #endif // __cplusplus
  110. //@@BEGIN_MSINTERNAL
  111. //
  112. // DirectSound 7.1 (Windows ME) interface.
  113. //
  114. #if DIRECTSOUND_VERSION >= 0x0701
  115. #ifdef __cplusplus
  116. struct IDirectSoundCaptureBuffer7_1;
  117. #endif
  118. #endif
  119. //@@END_MSINTERNAL
  120. //
  121. // DirectSound 8.0 interfaces.
  122. //
  123. #if DIRECTSOUND_VERSION >= 0x0800
  124. #ifdef __cplusplus
  125. struct IDirectSound8;
  126. struct IDirectSoundBuffer8;
  127. struct IDirectSoundCaptureBuffer8;
  128. //@@BEGIN_MSINTERNAL
  129. struct IDirectSoundFXSend;
  130. //@@END_MSINTERNAL
  131. struct IDirectSoundFXGargle;
  132. struct IDirectSoundFXChorus;
  133. struct IDirectSoundFXFlanger;
  134. struct IDirectSoundFXEcho;
  135. struct IDirectSoundFXDistortion;
  136. struct IDirectSoundFXCompressor;
  137. struct IDirectSoundFXParamEq;
  138. struct IDirectSoundFXWavesReverb;
  139. //@@BEGIN_MSINTERNAL
  140. ///struct IDirectSoundFXI3DL2Source;
  141. //@@END_MSINTERNAL
  142. struct IDirectSoundFXI3DL2Reverb;
  143. struct IDirectSoundCaptureFXAec;
  144. struct IDirectSoundCaptureFXNoiseSuppress;
  145. //@@BEGIN_MSINTERNAL
  146. struct IDirectSoundCaptureFXAgc;
  147. struct IDirectSoundCaptureFXMicArray;
  148. struct IDirectSoundDMOProxy;
  149. struct IDirectSoundFXI3DL2SourceEnv;
  150. struct IDirectSound3DBufferPrivate;
  151. //@@END_MSINTERNAL
  152. struct IDirectSoundFullDuplex;
  153. #endif // __cplusplus
  154. // IDirectSound8, IDirectSoundBuffer8 and IDirectSoundCaptureBuffer8 are the
  155. // only DirectSound 7.0 interfaces with changed functionality in version 8.0.
  156. // The other level 8 interfaces as equivalent to their level 7 counterparts:
  157. #define IDirectSoundCapture8 IDirectSoundCapture
  158. #define IDirectSound3DListener8 IDirectSound3DListener
  159. #define IDirectSound3DBuffer8 IDirectSound3DBuffer
  160. #define IDirectSoundNotify8 IDirectSoundNotify
  161. //@@BEGIN_MSINTERNAL
  162. #define IDirectSoundFXSend8 IDirectSoundFXSend
  163. //@@END_MSINTERNAL
  164. #define IDirectSoundFXGargle8 IDirectSoundFXGargle
  165. #define IDirectSoundFXChorus8 IDirectSoundFXChorus
  166. #define IDirectSoundFXFlanger8 IDirectSoundFXFlanger
  167. #define IDirectSoundFXEcho8 IDirectSoundFXEcho
  168. #define IDirectSoundFXDistortion8 IDirectSoundFXDistortion
  169. #define IDirectSoundFXCompressor8 IDirectSoundFXCompressor
  170. #define IDirectSoundFXParamEq8 IDirectSoundFXParamEq
  171. #define IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb
  172. //@@BEGIN_MSINTERNAL
  173. ///#define IDirectSoundFXI3DL2Source8 IDirectSoundFXI3DL2Source
  174. //@@END_MSINTERNAL
  175. #define IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb
  176. #define IDirectSoundCaptureFXAec8 IDirectSoundCaptureFXAec
  177. #define IDirectSoundCaptureFXNoiseSuppress8 IDirectSoundCaptureFXNoiseSuppress
  178. //@@BEGIN_MSINTERNAL
  179. #define IDirectSoundCaptureFXAgc8 IDirectSoundCaptureFXAgc
  180. #define IDirectSoundCaptureFXMicArray8 IDirectSoundCaptureFXMicArray
  181. #define IDirectSoundDMOProxy8 IDirectSoundDMOProxy
  182. #define IDirectSoundFXI3DL2SourceEnv8 IDirectSoundFXI3DL2SourceEnv
  183. #define IDirectSound3DBufferPrivate8 IDirectSound3DBufferPrivate
  184. //@@END_MSINTERNAL
  185. #define IDirectSoundFullDuplex8 IDirectSoundFullDuplex
  186. #endif // DIRECTSOUND_VERSION >= 0x0800
  187. typedef struct IDirectSound *LPDIRECTSOUND;
  188. typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
  189. typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
  190. typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
  191. typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
  192. typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
  193. typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
  194. //@@BEGIN_MSINTERNAL
  195. #if DIRECTSOUND_VERSION >= 0x0701
  196. typedef struct IDirectSoundCaptureBuffer7_1 *LPDIRECTSOUNDCAPTUREBUFFER7_1;
  197. #endif
  198. //@@END_MSINTERNAL
  199. #if DIRECTSOUND_VERSION >= 0x0800
  200. //@@BEGIN_MSINTERNAL
  201. typedef struct IDirectSoundFXSend *LPDIRECTSOUNDFXSEND;
  202. //@@END_MSINTERNAL
  203. typedef struct IDirectSoundFXGargle *LPDIRECTSOUNDFXGARGLE;
  204. typedef struct IDirectSoundFXChorus *LPDIRECTSOUNDFXCHORUS;
  205. typedef struct IDirectSoundFXFlanger *LPDIRECTSOUNDFXFLANGER;
  206. typedef struct IDirectSoundFXEcho *LPDIRECTSOUNDFXECHO;
  207. typedef struct IDirectSoundFXDistortion *LPDIRECTSOUNDFXDISTORTION;
  208. typedef struct IDirectSoundFXCompressor *LPDIRECTSOUNDFXCOMPRESSOR;
  209. typedef struct IDirectSoundFXParamEq *LPDIRECTSOUNDFXPARAMEQ;
  210. typedef struct IDirectSoundFXWavesReverb *LPDIRECTSOUNDFXWAVESREVERB;
  211. //@@BEGIN_MSINTERNAL
  212. ///typedef struct IDirectSoundFXI3DL2Source *LPDIRECTSOUNDFXI3DL2SOURCE;
  213. //@@END_MSINTERNAL
  214. typedef struct IDirectSoundFXI3DL2Reverb *LPDIRECTSOUNDFXI3DL2REVERB;
  215. typedef struct IDirectSoundCaptureFXAec *LPDIRECTSOUNDCAPTUREFXAEC;
  216. typedef struct IDirectSoundCaptureFXNoiseSuppress *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS;
  217. //@@BEGIN_MSINTERNAL
  218. typedef struct IDirectSoundCaptureFXAgc *LPDIRECTSOUNDCAPTUREFXAGC;
  219. typedef struct IDirectSoundCaptureFXMicArray *LPDIRECTSOUNDCAPTUREFXMICARRAY;
  220. typedef struct IDirectSoundDMOProxy *LPDIRECTSOUNDDMOPROXY;
  221. typedef struct IDirectSoundFXI3DL2SourceEnv *LPDIRECTSOUNDFXI3DL2SOURCEENV;
  222. typedef struct IDirectSound3DBufferPrivate *LPDIRECTSOUND3DBUFFERPRIVATE;
  223. //@@END_MSINTERNAL
  224. typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
  225. typedef struct IDirectSound8 *LPDIRECTSOUND8;
  226. typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8;
  227. typedef struct IDirectSound3DListener8 *LPDIRECTSOUND3DLISTENER8;
  228. typedef struct IDirectSound3DBuffer8 *LPDIRECTSOUND3DBUFFER8;
  229. typedef struct IDirectSoundCapture8 *LPDIRECTSOUNDCAPTURE8;
  230. typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8;
  231. typedef struct IDirectSoundNotify8 *LPDIRECTSOUNDNOTIFY8;
  232. //@@BEGIN_MSINTERNAL
  233. typedef struct IDirectSoundFXSend8 *LPDIRECTSOUNDFXSEND8;
  234. //@@END_MSINTERNAL
  235. typedef struct IDirectSoundFXGargle8 *LPDIRECTSOUNDFXGARGLE8;
  236. typedef struct IDirectSoundFXChorus8 *LPDIRECTSOUNDFXCHORUS8;
  237. typedef struct IDirectSoundFXFlanger8 *LPDIRECTSOUNDFXFLANGER8;
  238. typedef struct IDirectSoundFXEcho8 *LPDIRECTSOUNDFXECHO8;
  239. typedef struct IDirectSoundFXDistortion8 *LPDIRECTSOUNDFXDISTORTION8;
  240. typedef struct IDirectSoundFXCompressor8 *LPDIRECTSOUNDFXCOMPRESSOR8;
  241. typedef struct IDirectSoundFXParamEq8 *LPDIRECTSOUNDFXPARAMEQ8;
  242. typedef struct IDirectSoundFXWavesReverb8 *LPDIRECTSOUNDFXWAVESREVERB8;
  243. //@@BEGIN_MSINTERNAL
  244. ///typedef struct IDirectSoundFXI3DL2Source8 *LPDIRECTSOUNDFXI3DL2SOURCE8;
  245. //@@END_MSINTERNAL
  246. typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8;
  247. typedef struct IDirectSoundCaptureFXAec8 *LPDIRECTSOUNDCAPTUREFXAEC8;
  248. typedef struct IDirectSoundCaptureFXNoiseSuppress8 *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8;
  249. //@@BEGIN_MSINTERNAL
  250. typedef struct IDirectSoundCaptureFXAgc8 *LPDIRECTSOUNDCAPTUREFXAGC8;
  251. typedef struct IDirectSoundCaptureFXMicArray8 *LPDIRECTSOUNDCAPTUREFXMICARRAY8;
  252. typedef struct IDirectSoundDMOProxy8 *LPDIRECTSOUNDDMOPROXY8;
  253. typedef struct IDirectSoundFXI3DL2SourceEnv8 *LPDIRECTSOUNDFXI3DL2SOURCEENV8;
  254. typedef struct IDirectSound3DBufferPrivate8 *LPDIRECTSOUND3DBUFFERPRIVATE8;
  255. //@@END_MSINTERNAL
  256. typedef struct IDirectSoundFullDuplex8 *LPDIRECTSOUNDFULLDUPLEX8;
  257. #endif // DIRECTSOUND_VERSION >= 0x0800
  258. //
  259. // IID definitions for the unchanged DirectSound 8.0 interfaces
  260. //
  261. #if DIRECTSOUND_VERSION >= 0x0800
  262. #define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
  263. #define IID_IDirectSound3DListener8 IID_IDirectSound3DListener
  264. #define IID_IDirectSound3DBuffer8 IID_IDirectSound3DBuffer
  265. #define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
  266. //@@BEGIN_MSINTERNAL
  267. #define IID_IDirectSoundFXSend8 IID_IDirectSoundFXSend
  268. //@@END_MSINTERNAL
  269. #define IID_IDirectSoundFXGargle8 IID_IDirectSoundFXGargle
  270. #define IID_IDirectSoundFXChorus8 IID_IDirectSoundFXChorus
  271. #define IID_IDirectSoundFXFlanger8 IID_IDirectSoundFXFlanger
  272. #define IID_IDirectSoundFXEcho8 IID_IDirectSoundFXEcho
  273. #define IID_IDirectSoundFXDistortion8 IID_IDirectSoundFXDistortion
  274. #define IID_IDirectSoundFXCompressor8 IID_IDirectSoundFXCompressor
  275. #define IID_IDirectSoundFXParamEq8 IID_IDirectSoundFXParamEq
  276. #define IID_IDirectSoundFXWavesReverb8 IID_IDirectSoundFXWavesReverb
  277. //@@BEGIN_MSINTERNAL
  278. ///#define IID_IDirectSoundFXI3DL2Source8 IID_IDirectSoundFXI3DL2Source
  279. //@@END_MSINTERNAL
  280. #define IID_IDirectSoundFXI3DL2Reverb8 IID_IDirectSoundFXI3DL2Reverb
  281. #define IID_IDirectSoundCaptureFXAec8 IID_IDirectSoundCaptureFXAec
  282. #define IID_IDirectSoundCaptureFXNoiseSuppress8 IID_IDirectSoundCaptureFXNoiseSuppress
  283. //@@BEGIN_MSINTERNAL
  284. #define IID_IDirectSoundCaptureFXAgc8 IID_IDirectSoundCaptureFXAgc
  285. #define IID_IDirectSoundCaptureFXMicArray8 IID_IDirectSoundCaptureFXMicArray
  286. #define IID_IDirectSoundDMOProxy8 IID_IDirectSoundDMOProxy
  287. #define IID_IDirectSoundFXI3DL2SourceEnv8 IID_IDirectSoundFXI3DL2SourceEnv
  288. #define IID_IDirectSound3DBufferPrivate8 IID_IDirectSound3DBufferPrivate
  289. //@@END_MSINTERNAL
  290. #define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
  291. #endif // DIRECTSOUND_VERSION >= 0x0800
  292. //
  293. // Compatibility typedefs
  294. //
  295. #ifndef _LPCWAVEFORMATEX_DEFINED
  296. #define _LPCWAVEFORMATEX_DEFINED
  297. typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
  298. #endif // _LPCWAVEFORMATEX_DEFINED
  299. #ifndef __LPCGUID_DEFINED__
  300. #define __LPCGUID_DEFINED__
  301. typedef const GUID *LPCGUID;
  302. #endif // __LPCGUID_DEFINED__
  303. typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
  304. typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
  305. typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
  306. typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
  307. typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
  308. typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
  309. typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
  310. #if DIRECTSOUND_VERSION >= 0x0800
  311. typedef LPDIRECTSOUND8 *LPLPDIRECTSOUND8;
  312. typedef LPDIRECTSOUNDBUFFER8 *LPLPDIRECTSOUNDBUFFER8;
  313. typedef LPDIRECTSOUNDCAPTURE8 *LPLPDIRECTSOUNDCAPTURE8;
  314. typedef LPDIRECTSOUNDCAPTUREBUFFER8 *LPLPDIRECTSOUNDCAPTUREBUFFER8;
  315. #endif // DIRECTSOUND_VERSION >= 0x0800
  316. //
  317. // Structures
  318. //
  319. typedef struct _DSCAPS
  320. {
  321. DWORD dwSize;
  322. DWORD dwFlags;
  323. DWORD dwMinSecondarySampleRate;
  324. DWORD dwMaxSecondarySampleRate;
  325. DWORD dwPrimaryBuffers;
  326. DWORD dwMaxHwMixingAllBuffers;
  327. DWORD dwMaxHwMixingStaticBuffers;
  328. DWORD dwMaxHwMixingStreamingBuffers;
  329. DWORD dwFreeHwMixingAllBuffers;
  330. DWORD dwFreeHwMixingStaticBuffers;
  331. DWORD dwFreeHwMixingStreamingBuffers;
  332. DWORD dwMaxHw3DAllBuffers;
  333. DWORD dwMaxHw3DStaticBuffers;
  334. DWORD dwMaxHw3DStreamingBuffers;
  335. DWORD dwFreeHw3DAllBuffers;
  336. DWORD dwFreeHw3DStaticBuffers;
  337. DWORD dwFreeHw3DStreamingBuffers;
  338. DWORD dwTotalHwMemBytes;
  339. DWORD dwFreeHwMemBytes;
  340. DWORD dwMaxContigFreeHwMemBytes;
  341. DWORD dwUnlockTransferRateHwBuffers;
  342. DWORD dwPlayCpuOverheadSwBuffers;
  343. //@@BEGIN_MSINTERNAL
  344. // dwReserved1 == minor ver number, dwReserved2 == major ver number.
  345. //@@END_MSINTERNAL
  346. DWORD dwReserved1;
  347. DWORD dwReserved2;
  348. } DSCAPS, *LPDSCAPS;
  349. typedef const DSCAPS *LPCDSCAPS;
  350. typedef struct _DSBCAPS
  351. {
  352. DWORD dwSize;
  353. DWORD dwFlags;
  354. DWORD dwBufferBytes;
  355. DWORD dwUnlockTransferRate;
  356. DWORD dwPlayCpuOverhead;
  357. } DSBCAPS, *LPDSBCAPS;
  358. typedef const DSBCAPS *LPCDSBCAPS;
  359. #if DIRECTSOUND_VERSION >= 0x0800
  360. typedef struct _DSEFFECTDESC
  361. {
  362. DWORD dwSize;
  363. DWORD dwFlags;
  364. GUID guidDSFXClass;
  365. DWORD_PTR dwReserved1;
  366. DWORD_PTR dwReserved2;
  367. } DSEFFECTDESC, *LPDSEFFECTDESC;
  368. typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
  369. #define DSFX_LOCHARDWARE 0x00000001
  370. #define DSFX_LOCSOFTWARE 0x00000002
  371. //@@BEGIN_MSINTERNAL
  372. #define DSFX_OPTIONAL 0x00000004
  373. #define DSFX_VALIDFLAGS (DSFX_LOCHARDWARE | DSFX_LOCSOFTWARE)
  374. //@@END_MSINTERNAL
  375. enum
  376. {
  377. DSFXR_PRESENT, // 0
  378. DSFXR_LOCHARDWARE, // 1
  379. DSFXR_LOCSOFTWARE, // 2
  380. DSFXR_UNALLOCATED, // 3
  381. DSFXR_FAILED, // 4
  382. DSFXR_UNKNOWN, // 5
  383. DSFXR_SENDLOOP // 6
  384. };
  385. typedef struct _DSCEFFECTDESC
  386. {
  387. DWORD dwSize;
  388. DWORD dwFlags;
  389. GUID guidDSCFXClass;
  390. GUID guidDSCFXInstance;
  391. DWORD dwReserved1;
  392. DWORD dwReserved2;
  393. } DSCEFFECTDESC, *LPDSCEFFECTDESC;
  394. typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
  395. #define DSCFX_LOCHARDWARE 0x00000001
  396. #define DSCFX_LOCSOFTWARE 0x00000002
  397. //@@BEGIN_MSINTERNAL
  398. #define DSCFX_RESERVED 0x00000020
  399. //@@END_MSINTERNAL
  400. //@@BEGIN_MSINTERNAL
  401. #define DSCFX_LOCMASK (DSCFX_LOCHARDWARE | DSCFX_LOCSOFTWARE )
  402. #define DSCFX_VALIDFLAGS (DSCFX_LOCMASK)
  403. //@@END_MSINTERNAL
  404. #define DSCFXR_LOCHARDWARE 0x00000010
  405. #define DSCFXR_LOCSOFTWARE 0x00000020
  406. //@@BEGIN_MSINTERNAL
  407. // Since we don't support LOCDEFER-style voice management on capture,
  408. // and we don't have a DSCFX_OPTIONAL flag at the moment, none of the
  409. // flags below can ever be returned. So they're private for now.
  410. #define DSCFXR_UNALLOCATED 0x00000040
  411. #define DSCFXR_FAILED 0x00000080
  412. #define DSCFXR_UNKNOWN 0x00000100
  413. //@@END_MSINTERNAL
  414. #endif // DIRECTSOUND_VERSION >= 0x0800
  415. typedef struct _DSBUFFERDESC
  416. {
  417. DWORD dwSize;
  418. DWORD dwFlags;
  419. DWORD dwBufferBytes;
  420. DWORD dwReserved;
  421. LPWAVEFORMATEX lpwfxFormat;
  422. #if DIRECTSOUND_VERSION >= 0x0700
  423. GUID guid3DAlgorithm;
  424. #endif
  425. } DSBUFFERDESC, *LPDSBUFFERDESC;
  426. typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
  427. // Older version of this structure:
  428. typedef struct _DSBUFFERDESC1
  429. {
  430. DWORD dwSize;
  431. DWORD dwFlags;
  432. DWORD dwBufferBytes;
  433. DWORD dwReserved;
  434. LPWAVEFORMATEX lpwfxFormat;
  435. } DSBUFFERDESC1, *LPDSBUFFERDESC1;
  436. typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
  437. typedef struct _DS3DBUFFER
  438. {
  439. DWORD dwSize;
  440. D3DVECTOR vPosition;
  441. D3DVECTOR vVelocity;
  442. DWORD dwInsideConeAngle;
  443. DWORD dwOutsideConeAngle;
  444. D3DVECTOR vConeOrientation;
  445. LONG lConeOutsideVolume;
  446. D3DVALUE flMinDistance;
  447. D3DVALUE flMaxDistance;
  448. DWORD dwMode;
  449. } DS3DBUFFER, *LPDS3DBUFFER;
  450. typedef const DS3DBUFFER *LPCDS3DBUFFER;
  451. typedef struct _DS3DLISTENER
  452. {
  453. DWORD dwSize;
  454. D3DVECTOR vPosition;
  455. D3DVECTOR vVelocity;
  456. D3DVECTOR vOrientFront;
  457. D3DVECTOR vOrientTop;
  458. D3DVALUE flDistanceFactor;
  459. D3DVALUE flRolloffFactor;
  460. D3DVALUE flDopplerFactor;
  461. } DS3DLISTENER, *LPDS3DLISTENER;
  462. typedef const DS3DLISTENER *LPCDS3DLISTENER;
  463. typedef struct _DSCCAPS
  464. {
  465. DWORD dwSize;
  466. DWORD dwFlags;
  467. DWORD dwFormats;
  468. DWORD dwChannels;
  469. } DSCCAPS, *LPDSCCAPS;
  470. typedef const DSCCAPS *LPCDSCCAPS;
  471. typedef struct _DSCBUFFERDESC1
  472. {
  473. DWORD dwSize;
  474. DWORD dwFlags;
  475. DWORD dwBufferBytes;
  476. DWORD dwReserved;
  477. LPWAVEFORMATEX lpwfxFormat;
  478. } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
  479. typedef struct _DSCBUFFERDESC
  480. {
  481. DWORD dwSize;
  482. DWORD dwFlags;
  483. DWORD dwBufferBytes;
  484. DWORD dwReserved;
  485. LPWAVEFORMATEX lpwfxFormat;
  486. #if DIRECTSOUND_VERSION >= 0x0800
  487. DWORD dwFXCount;
  488. LPDSCEFFECTDESC lpDSCFXDesc;
  489. #endif
  490. } DSCBUFFERDESC, *LPDSCBUFFERDESC;
  491. typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
  492. typedef struct _DSCBCAPS
  493. {
  494. DWORD dwSize;
  495. DWORD dwFlags;
  496. DWORD dwBufferBytes;
  497. DWORD dwReserved;
  498. } DSCBCAPS, *LPDSCBCAPS;
  499. typedef const DSCBCAPS *LPCDSCBCAPS;
  500. typedef struct _DSBPOSITIONNOTIFY
  501. {
  502. DWORD dwOffset;
  503. HANDLE hEventNotify;
  504. } DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
  505. typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
  506. //
  507. // DirectSound API
  508. //
  509. typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
  510. typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
  511. extern HRESULT WINAPI DirectSoundCreate(LPCGUID pcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter);
  512. extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
  513. extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
  514. extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
  515. extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
  516. extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
  517. #if DIRECTSOUND_VERSION >= 0x0800
  518. extern HRESULT WINAPI DirectSoundCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUND8 *ppDS8, LPUNKNOWN pUnkOuter);
  519. extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
  520. extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
  521. LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd,
  522. DWORD dwLevel, LPDIRECTSOUNDFULLDUPLEX* ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8,
  523. LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
  524. #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
  525. extern HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest);
  526. #endif // DIRECTSOUND_VERSION >= 0x0800
  527. #ifdef UNICODE
  528. #define LPDSENUMCALLBACK LPDSENUMCALLBACKW
  529. #define DirectSoundEnumerate DirectSoundEnumerateW
  530. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
  531. #else // UNICODE
  532. #define LPDSENUMCALLBACK LPDSENUMCALLBACKA
  533. #define DirectSoundEnumerate DirectSoundEnumerateA
  534. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
  535. #endif // UNICODE
  536. //
  537. // IUnknown
  538. //
  539. #if !defined(__cplusplus) || defined(CINTERFACE)
  540. #ifndef IUnknown_QueryInterface
  541. #define IUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  542. #endif // IUnknown_QueryInterface
  543. #ifndef IUnknown_AddRef
  544. #define IUnknown_AddRef(p) (p)->lpVtbl->AddRef(p)
  545. #endif // IUnknown_AddRef
  546. #ifndef IUnknown_Release
  547. #define IUnknown_Release(p) (p)->lpVtbl->Release(p)
  548. #endif // IUnknown_Release
  549. #else // !defined(__cplusplus) || defined(CINTERFACE)
  550. #ifndef IUnknown_QueryInterface
  551. #define IUnknown_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  552. #endif // IUnknown_QueryInterface
  553. #ifndef IUnknown_AddRef
  554. #define IUnknown_AddRef(p) (p)->AddRef()
  555. #endif // IUnknown_AddRef
  556. #ifndef IUnknown_Release
  557. #define IUnknown_Release(p) (p)->Release()
  558. #endif // IUnknown_Release
  559. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  560. #ifndef __IReferenceClock_INTERFACE_DEFINED__
  561. #define __IReferenceClock_INTERFACE_DEFINED__
  562. typedef LONGLONG REFERENCE_TIME;
  563. typedef REFERENCE_TIME *LPREFERENCE_TIME;
  564. DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70);
  565. #undef INTERFACE
  566. #define INTERFACE IReferenceClock
  567. DECLARE_INTERFACE_(IReferenceClock, IUnknown)
  568. {
  569. // IUnknown methods
  570. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  571. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  572. STDMETHOD_(ULONG,Release) (THIS) PURE;
  573. // IReferenceClock methods
  574. STDMETHOD(GetTime) (THIS_ REFERENCE_TIME *pTime) PURE;
  575. STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME rtBaseTime, REFERENCE_TIME rtStreamTime,
  576. HANDLE hEvent, LPDWORD pdwAdviseCookie) PURE;
  577. STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME rtStartTime, REFERENCE_TIME rtPeriodTime,
  578. HANDLE hSemaphore, LPDWORD pdwAdviseCookie) PURE;
  579. STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE;
  580. };
  581. #endif // __IReferenceClock_INTERFACE_DEFINED__
  582. #ifndef IReferenceClock_QueryInterface
  583. #define IReferenceClock_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  584. #define IReferenceClock_AddRef(p) IUnknown_AddRef(p)
  585. #define IReferenceClock_Release(p) IUnknown_Release(p)
  586. #if !defined(__cplusplus) || defined(CINTERFACE)
  587. #define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a)
  588. #define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d)
  589. #define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d)
  590. #define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
  591. #else // !defined(__cplusplus) || defined(CINTERFACE)
  592. #define IReferenceClock_GetTime(p,a) (p)->GetTime(a)
  593. #define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->AdviseTime(a,b,c,d)
  594. #define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->AdvisePeriodic(a,b,c,d)
  595. #define IReferenceClock_Unadvise(p,a) (p)->Unadvise(a)
  596. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  597. #endif // IReferenceClock_QueryInterface
  598. //
  599. // IDirectSound
  600. //
  601. DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  602. #undef INTERFACE
  603. #define INTERFACE IDirectSound
  604. DECLARE_INTERFACE_(IDirectSound, IUnknown)
  605. {
  606. // IUnknown methods
  607. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  608. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  609. STDMETHOD_(ULONG,Release) (THIS) PURE;
  610. // IDirectSound methods
  611. STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE;
  612. STDMETHOD(GetCaps) (THIS_ LPDSCAPS pDSCaps) PURE;
  613. STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
  614. STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE;
  615. STDMETHOD(Compact) (THIS) PURE;
  616. STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD pdwSpeakerConfig) PURE;
  617. STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE;
  618. STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE;
  619. };
  620. #define IDirectSound_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  621. #define IDirectSound_AddRef(p) IUnknown_AddRef(p)
  622. #define IDirectSound_Release(p) IUnknown_Release(p)
  623. #if !defined(__cplusplus) || defined(CINTERFACE)
  624. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
  625. #define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  626. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
  627. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  628. #define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
  629. #define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
  630. #define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b)
  631. #define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  632. #else // !defined(__cplusplus) || defined(CINTERFACE)
  633. #define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
  634. #define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
  635. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
  636. #define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  637. #define IDirectSound_Compact(p) (p)->Compact()
  638. #define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
  639. #define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b)
  640. #define IDirectSound_Initialize(p,a) (p)->Initialize(a)
  641. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  642. #if DIRECTSOUND_VERSION >= 0x0800
  643. //
  644. // IDirectSound8
  645. //
  646. DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66);
  647. #undef INTERFACE
  648. #define INTERFACE IDirectSound8
  649. DECLARE_INTERFACE_(IDirectSound8, IDirectSound)
  650. {
  651. // IUnknown methods
  652. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  653. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  654. STDMETHOD_(ULONG,Release) (THIS) PURE;
  655. // IDirectSound methods
  656. STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE;
  657. STDMETHOD(GetCaps) (THIS_ LPDSCAPS pDSCaps) PURE;
  658. STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
  659. STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE;
  660. STDMETHOD(Compact) (THIS) PURE;
  661. STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD pdwSpeakerConfig) PURE;
  662. STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE;
  663. STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE;
  664. // IDirectSound8 methods
  665. STDMETHOD(VerifyCertification) (THIS_ LPDWORD pdwCertified) PURE;
  666. //@@BEGIN_MSINTERNAL
  667. #ifdef FUTURE_WAVE_SUPPORT
  668. STDMETHOD(CreateSoundBufferFromWave) (THIS_ LPUNKNOWN pDSWave, DWORD dwFlags, LPDIRECTSOUNDBUFFER *ppDSBuffer) PURE;
  669. #endif
  670. //@@END_MSINTERNAL
  671. };
  672. #define IDirectSound8_QueryInterface(p,a,b) IDirectSound_QueryInterface(p,a,b)
  673. #define IDirectSound8_AddRef(p) IDirectSound_AddRef(p)
  674. #define IDirectSound8_Release(p) IDirectSound_Release(p)
  675. #define IDirectSound8_CreateSoundBuffer(p,a,b,c) IDirectSound_CreateSoundBuffer(p,a,b,c)
  676. #define IDirectSound8_GetCaps(p,a) IDirectSound_GetCaps(p,a)
  677. #define IDirectSound8_DuplicateSoundBuffer(p,a,b) IDirectSound_DuplicateSoundBuffer(p,a,b)
  678. #define IDirectSound8_SetCooperativeLevel(p,a,b) IDirectSound_SetCooperativeLevel(p,a,b)
  679. #define IDirectSound8_Compact(p) IDirectSound_Compact(p)
  680. #define IDirectSound8_GetSpeakerConfig(p,a) IDirectSound_GetSpeakerConfig(p,a)
  681. #define IDirectSound8_SetSpeakerConfig(p,a) IDirectSound_SetSpeakerConfig(p,a)
  682. #define IDirectSound8_Initialize(p,a) IDirectSound_Initialize(p,a)
  683. #if !defined(__cplusplus) || defined(CINTERFACE)
  684. #define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a)
  685. //@@BEGIN_MSINTERNAL
  686. #ifdef FUTURE_WAVE_SUPPORT
  687. #define IDirectSound8_CreateSoundBufferFromWave(p,a,b,c) (p)->lpVtbl->CreateSoundBufferFromWave(p,a,b,c)
  688. #endif
  689. //@@END_MSINTERNAL
  690. #else // !defined(__cplusplus) || defined(CINTERFACE)
  691. #define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
  692. //@@BEGIN_MSINTERNAL
  693. #ifdef FUTURE_WAVE_SUPPORT
  694. #define IDirectSound8_CreateSoundBufferFromWave(p,a,b,c) (p)->CreateSoundBufferFromWave(a,b,c)
  695. #endif
  696. //@@END_MSINTERNAL
  697. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  698. #endif // DIRECTSOUND_VERSION >= 0x0800
  699. //
  700. // IDirectSoundBuffer
  701. //
  702. DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  703. #undef INTERFACE
  704. #define INTERFACE IDirectSoundBuffer
  705. DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
  706. {
  707. // IUnknown methods
  708. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  709. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  710. STDMETHOD_(ULONG,Release) (THIS) PURE;
  711. // IDirectSoundBuffer methods
  712. STDMETHOD(GetCaps) (THIS_ LPDSBCAPS pDSBufferCaps) PURE;
  713. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE;
  714. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  715. STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE;
  716. STDMETHOD(GetPan) (THIS_ LPLONG plPan) PURE;
  717. STDMETHOD(GetFrequency) (THIS_ LPDWORD pdwFrequency) PURE;
  718. STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE;
  719. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE;
  720. STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  721. LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  722. STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
  723. STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE;
  724. STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE;
  725. STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE;
  726. STDMETHOD(SetPan) (THIS_ LONG lPan) PURE;
  727. STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE;
  728. STDMETHOD(Stop) (THIS) PURE;
  729. STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  730. STDMETHOD(Restore) (THIS) PURE;
  731. };
  732. #define IDirectSoundBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  733. #define IDirectSoundBuffer_AddRef(p) IUnknown_AddRef(p)
  734. #define IDirectSoundBuffer_Release(p) IUnknown_Release(p)
  735. #if !defined(__cplusplus) || defined(CINTERFACE)
  736. #define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  737. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  738. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  739. #define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
  740. #define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
  741. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
  742. #define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  743. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  744. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  745. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
  746. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
  747. #define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
  748. #define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
  749. #define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
  750. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
  751. #define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  752. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  753. #define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
  754. #else // !defined(__cplusplus) || defined(CINTERFACE)
  755. #define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
  756. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  757. #define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  758. #define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
  759. #define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
  760. #define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
  761. #define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
  762. #define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  763. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  764. #define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
  765. #define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
  766. #define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
  767. #define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
  768. #define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
  769. #define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
  770. #define IDirectSoundBuffer_Stop(p) (p)->Stop()
  771. #define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  772. #define IDirectSoundBuffer_Restore(p) (p)->Restore()
  773. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  774. #if DIRECTSOUND_VERSION >= 0x0800
  775. //
  776. // IDirectSoundBuffer8
  777. //
  778. DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825a449, 0x7524, 0x4d82, 0x92, 0x0f, 0x50, 0xe3, 0x6a, 0xb3, 0xab, 0x1e);
  779. #undef INTERFACE
  780. #define INTERFACE IDirectSoundBuffer8
  781. DECLARE_INTERFACE_(IDirectSoundBuffer8, IDirectSoundBuffer)
  782. {
  783. // IUnknown methods
  784. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  785. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  786. STDMETHOD_(ULONG,Release) (THIS) PURE;
  787. // IDirectSoundBuffer methods
  788. STDMETHOD(GetCaps) (THIS_ LPDSBCAPS pDSBufferCaps) PURE;
  789. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE;
  790. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  791. STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE;
  792. STDMETHOD(GetPan) (THIS_ LPLONG plPan) PURE;
  793. STDMETHOD(GetFrequency) (THIS_ LPDWORD pdwFrequency) PURE;
  794. STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE;
  795. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE;
  796. STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  797. LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  798. STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
  799. STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE;
  800. STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE;
  801. STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE;
  802. STDMETHOD(SetPan) (THIS_ LONG lPan) PURE;
  803. STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE;
  804. STDMETHOD(Stop) (THIS) PURE;
  805. STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  806. STDMETHOD(Restore) (THIS) PURE;
  807. // IDirectSoundBuffer8 methods
  808. STDMETHOD(SetFX) (THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
  809. STDMETHOD(AcquireResources) (THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
  810. STDMETHOD(GetObjectInPath) (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  811. //@@BEGIN_MSINTERNAL
  812. #ifdef FUTURE_MULTIPAN_SUPPORT
  813. STDMETHOD(SetChannelVolume) (THIS_ DWORD dwChannelCount, LPDWORD pdwChannels, LPLONG plVolumes) PURE;
  814. #endif
  815. //@@END_MSINTERNAL
  816. };
  817. // Special GUID meaning "select all objects" for use in GetObjectInPath()
  818. DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5);
  819. #define IDirectSoundBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  820. #define IDirectSoundBuffer8_AddRef(p) IUnknown_AddRef(p)
  821. #define IDirectSoundBuffer8_Release(p) IUnknown_Release(p)
  822. #define IDirectSoundBuffer8_GetCaps(p,a) IDirectSoundBuffer_GetCaps(p,a)
  823. #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) IDirectSoundBuffer_GetCurrentPosition(p,a,b)
  824. #define IDirectSoundBuffer8_GetFormat(p,a,b,c) IDirectSoundBuffer_GetFormat(p,a,b,c)
  825. #define IDirectSoundBuffer8_GetVolume(p,a) IDirectSoundBuffer_GetVolume(p,a)
  826. #define IDirectSoundBuffer8_GetPan(p,a) IDirectSoundBuffer_GetPan(p,a)
  827. #define IDirectSoundBuffer8_GetFrequency(p,a) IDirectSoundBuffer_GetFrequency(p,a)
  828. #define IDirectSoundBuffer8_GetStatus(p,a) IDirectSoundBuffer_GetStatus(p,a)
  829. #define IDirectSoundBuffer8_Initialize(p,a,b) IDirectSoundBuffer_Initialize(p,a,b)
  830. #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)
  831. #define IDirectSoundBuffer8_Play(p,a,b,c) IDirectSoundBuffer_Play(p,a,b,c)
  832. #define IDirectSoundBuffer8_SetCurrentPosition(p,a) IDirectSoundBuffer_SetCurrentPosition(p,a)
  833. #define IDirectSoundBuffer8_SetFormat(p,a) IDirectSoundBuffer_SetFormat(p,a)
  834. #define IDirectSoundBuffer8_SetVolume(p,a) IDirectSoundBuffer_SetVolume(p,a)
  835. #define IDirectSoundBuffer8_SetPan(p,a) IDirectSoundBuffer_SetPan(p,a)
  836. #define IDirectSoundBuffer8_SetFrequency(p,a) IDirectSoundBuffer_SetFrequency(p,a)
  837. #define IDirectSoundBuffer8_Stop(p) IDirectSoundBuffer_Stop(p)
  838. #define IDirectSoundBuffer8_Unlock(p,a,b,c,d) IDirectSoundBuffer_Unlock(p,a,b,c,d)
  839. #define IDirectSoundBuffer8_Restore(p) IDirectSoundBuffer_Restore(p)
  840. #if !defined(__cplusplus) || defined(CINTERFACE)
  841. #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c)
  842. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c)
  843. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  844. #else // !defined(__cplusplus) || defined(CINTERFACE)
  845. #define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
  846. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
  847. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
  848. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  849. #endif // DIRECTSOUND_VERSION >= 0x0800
  850. //
  851. // IDirectSound3DListener
  852. //
  853. DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  854. #undef INTERFACE
  855. #define INTERFACE IDirectSound3DListener
  856. DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
  857. {
  858. // IUnknown methods
  859. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  860. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  861. STDMETHOD_(ULONG,Release) (THIS) PURE;
  862. // IDirectSound3DListener methods
  863. STDMETHOD(GetAllParameters) (THIS_ LPDS3DLISTENER pListener) PURE;
  864. STDMETHOD(GetDistanceFactor) (THIS_ D3DVALUE* pflDistanceFactor) PURE;
  865. STDMETHOD(GetDopplerFactor) (THIS_ D3DVALUE* pflDopplerFactor) PURE;
  866. STDMETHOD(GetOrientation) (THIS_ D3DVECTOR* pvOrientFront, D3DVECTOR* pvOrientTop) PURE;
  867. STDMETHOD(GetPosition) (THIS_ D3DVECTOR* pvPosition) PURE;
  868. STDMETHOD(GetRolloffFactor) (THIS_ D3DVALUE* pflRolloffFactor) PURE;
  869. STDMETHOD(GetVelocity) (THIS_ D3DVECTOR* pvVelocity) PURE;
  870. STDMETHOD(SetAllParameters) (THIS_ LPCDS3DLISTENER pcListener, DWORD dwApply) PURE;
  871. STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
  872. STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
  873. STDMETHOD(SetOrientation) (THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront,
  874. D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
  875. STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  876. STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
  877. STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  878. STDMETHOD(CommitDeferredSettings) (THIS) PURE;
  879. };
  880. #define IDirectSound3DListener_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  881. #define IDirectSound3DListener_AddRef(p) IUnknown_AddRef(p)
  882. #define IDirectSound3DListener_Release(p) IUnknown_Release(p)
  883. #if !defined(__cplusplus) || defined(CINTERFACE)
  884. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  885. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
  886. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
  887. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
  888. #define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  889. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
  890. #define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  891. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  892. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
  893. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
  894. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
  895. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  896. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
  897. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  898. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
  899. #else // !defined(__cplusplus) || defined(CINTERFACE)
  900. #define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
  901. #define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
  902. #define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
  903. #define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
  904. #define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
  905. #define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
  906. #define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
  907. #define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  908. #define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
  909. #define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
  910. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
  911. #define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  912. #define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
  913. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  914. #define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
  915. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  916. //
  917. // IDirectSound3DBuffer
  918. //
  919. DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  920. #undef INTERFACE
  921. #define INTERFACE IDirectSound3DBuffer
  922. DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
  923. {
  924. // IUnknown methods
  925. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  926. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  927. STDMETHOD_(ULONG,Release) (THIS) PURE;
  928. // IDirectSound3DBuffer methods
  929. STDMETHOD(GetAllParameters) (THIS_ LPDS3DBUFFER pDs3dBuffer) PURE;
  930. STDMETHOD(GetConeAngles) (THIS_ LPDWORD pdwInsideConeAngle, LPDWORD pdwOutsideConeAngle) PURE;
  931. STDMETHOD(GetConeOrientation) (THIS_ D3DVECTOR* pvOrientation) PURE;
  932. STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG plConeOutsideVolume) PURE;
  933. STDMETHOD(GetMaxDistance) (THIS_ D3DVALUE* pflMaxDistance) PURE;
  934. STDMETHOD(GetMinDistance) (THIS_ D3DVALUE* pflMinDistance) PURE;
  935. STDMETHOD(GetMode) (THIS_ LPDWORD pdwMode) PURE;
  936. STDMETHOD(GetPosition) (THIS_ D3DVECTOR* pvPosition) PURE;
  937. STDMETHOD(GetVelocity) (THIS_ D3DVECTOR* pvVelocity) PURE;
  938. STDMETHOD(SetAllParameters) (THIS_ LPCDS3DBUFFER pcDs3dBuffer, DWORD dwApply) PURE;
  939. STDMETHOD(SetConeAngles) (THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
  940. STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  941. STDMETHOD(SetConeOutsideVolume) (THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
  942. STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
  943. STDMETHOD(SetMinDistance) (THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
  944. STDMETHOD(SetMode) (THIS_ DWORD dwMode, DWORD dwApply) PURE;
  945. STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  946. STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  947. };
  948. #define IDirectSound3DBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  949. #define IDirectSound3DBuffer_AddRef(p) IUnknown_AddRef(p)
  950. #define IDirectSound3DBuffer_Release(p) IUnknown_Release(p)
  951. #if !defined(__cplusplus) || defined(CINTERFACE)
  952. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  953. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
  954. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
  955. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
  956. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
  957. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
  958. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
  959. #define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
  960. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
  961. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
  962. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
  963. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
  964. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
  965. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
  966. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
  967. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
  968. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
  969. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  970. #else // !defined(__cplusplus) || defined(CINTERFACE)
  971. #define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
  972. #define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
  973. #define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
  974. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
  975. #define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
  976. #define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
  977. #define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
  978. #define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
  979. #define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
  980. #define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
  981. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
  982. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
  983. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
  984. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
  985. #define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
  986. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
  987. #define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
  988. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
  989. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  990. //
  991. // IDirectSoundCapture
  992. //
  993. DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  994. #undef INTERFACE
  995. #define INTERFACE IDirectSoundCapture
  996. DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
  997. {
  998. // IUnknown methods
  999. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1000. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1001. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1002. // IDirectSoundCapture methods
  1003. STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC pcDSCBufferDesc, LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, LPUNKNOWN pUnkOuter) PURE;
  1004. STDMETHOD(GetCaps) (THIS_ LPDSCCAPS pDSCCaps) PURE;
  1005. STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE;
  1006. };
  1007. #define IDirectSoundCapture_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1008. #define IDirectSoundCapture_AddRef(p) IUnknown_AddRef(p)
  1009. #define IDirectSoundCapture_Release(p) IUnknown_Release(p)
  1010. #if !defined(__cplusplus) || defined(CINTERFACE)
  1011. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
  1012. #define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1013. #define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1014. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1015. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
  1016. #define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
  1017. #define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
  1018. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1019. //
  1020. // IDirectSoundCaptureBuffer
  1021. //
  1022. DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  1023. #undef INTERFACE
  1024. #define INTERFACE IDirectSoundCaptureBuffer
  1025. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
  1026. {
  1027. // IUnknown methods
  1028. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1029. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1030. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1031. // IDirectSoundCaptureBuffer methods
  1032. STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS pDSCBCaps) PURE;
  1033. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE;
  1034. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  1035. STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE;
  1036. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
  1037. STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  1038. LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  1039. STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE;
  1040. STDMETHOD(Stop) (THIS) PURE;
  1041. STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  1042. };
  1043. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1044. #define IDirectSoundCaptureBuffer_AddRef(p) IUnknown_AddRef(p)
  1045. #define IDirectSoundCaptureBuffer_Release(p) IUnknown_Release(p)
  1046. #if !defined(__cplusplus) || defined(CINTERFACE)
  1047. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1048. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  1049. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  1050. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  1051. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1052. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  1053. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
  1054. #define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
  1055. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  1056. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1057. #define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
  1058. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  1059. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  1060. #define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
  1061. #define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  1062. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  1063. #define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
  1064. #define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
  1065. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  1066. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1067. //@@BEGIN_MSINTERNAL
  1068. #if DIRECTSOUND_VERSION >= 0x0701
  1069. //
  1070. // IDirectSoundCaptureBuffer7_1
  1071. //
  1072. DEFINE_GUID(IID_IDirectSoundCaptureBuffer7_1, 0xd6b2a50d, 0x918e, 0x47de, 0x9b, 0xcd, 0x64, 0xd4, 0x9c, 0x5b, 0x1d, 0x75);
  1073. #undef INTERFACE
  1074. #define INTERFACE IDirectSoundCaptureBuffer7_1
  1075. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer7_1, IDirectSoundCaptureBuffer)
  1076. {
  1077. // IUnknown methods
  1078. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1079. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1080. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1081. // IDirectSoundCaptureBuffer methods
  1082. STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS pDSCBCaps) PURE;
  1083. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE;
  1084. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  1085. STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE;
  1086. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
  1087. STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  1088. LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  1089. STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE;
  1090. STDMETHOD(Stop) (THIS) PURE;
  1091. STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  1092. // IDirectSoundCaptureBuffer7_1 methods
  1093. STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE;
  1094. STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE;
  1095. STDMETHOD(SetMicVolume) (THIS_ LONG lVolume) PURE;
  1096. STDMETHOD(GetMicVolume) (THIS_ LPLONG plVolume) PURE;
  1097. STDMETHOD(EnableMic) (THIS_ BOOL fEnable) PURE;
  1098. STDMETHOD(YieldFocus) (THIS) PURE;
  1099. STDMETHOD(ClaimFocus) (THIS) PURE;
  1100. STDMETHOD(SetFocusHWND) (THIS_ HWND hwndMainWindow) PURE;
  1101. STDMETHOD(GetFocusHWND) (THIS_ HWND *phwndMainWindow) PURE;
  1102. STDMETHOD(EnableFocusNotifications) (THIS_ HANDLE hFocusEvent) PURE;
  1103. };
  1104. #define IDirectSoundCaptureBuffer7_1_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1105. #define IDirectSoundCaptureBuffer7_1_AddRef(p) IUnknown_AddRef(p)
  1106. #define IDirectSoundCaptureBuffer7_1_Release(p) IUnknown_Release(p)
  1107. #if !defined(__cplusplus) || defined(CINTERFACE)
  1108. #define IDirectSoundCaptureBuffer7_1_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  1109. #define IDirectSoundCaptureBuffer7_1_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
  1110. #define IDirectSoundCaptureBuffer7_1_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
  1111. #define IDirectSoundCaptureBuffer7_1_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
  1112. #define IDirectSoundCaptureBuffer7_1_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1113. #define IDirectSoundCaptureBuffer7_1_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  1114. #define IDirectSoundCaptureBuffer7_1_Start(p,a) (p)->lpVtbl->Start(p,a)
  1115. #define IDirectSoundCaptureBuffer7_1_Stop(p) (p)->lpVtbl->Stop(p)
  1116. #define IDirectSoundCaptureBuffer7_1_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
  1117. #define IDirectSoundCaptureBuffer7_1_SetMicVolume(p,a) (p)->lpVtbl->SetMicVolume(p,a)
  1118. #define IDirectSoundCaptureBuffer7_1_GetMicVolume(p,a) (p)->lpVtbl->GetMicVolume(p,a)
  1119. #define IDirectSoundCaptureBuffer7_1_YieldFocus(p) (p)->lpVtbl->YieldFocus(p)
  1120. #define IDirectSoundCaptureBuffer7_1_ClaimFocus(p) (p)->lpVtbl->ClaimFocus(p)
  1121. #define IDirectSoundCaptureBuffer7_1_SetFocusHWND(p,a) (p)->lpVtbl->SetFocusHWND(p,a)
  1122. #define IDirectSoundCaptureBuffer7_1_GetFocusHWND(p,a) (p)->lpVtbl->GetFocusHWND(p,a)
  1123. #define IDirectSoundCaptureBuffer7_1_SetFocusNotificationHandler(p,a) (p)->lpVtbl->EnableFocusNotifications(p,a)
  1124. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1125. #define IDirectSoundCaptureBuffer7_1_GetCaps(p,a) (p)->GetCaps(a)
  1126. #define IDirectSoundCaptureBuffer7_1_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
  1127. #define IDirectSoundCaptureBuffer7_1_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
  1128. #define IDirectSoundCaptureBuffer7_1_GetStatus(p,a) (p)->GetStatus(a)
  1129. #define IDirectSoundCaptureBuffer7_1_Initialize(p,a,b) (p)->Initialize(a,b)
  1130. #define IDirectSoundCaptureBuffer7_1_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
  1131. #define IDirectSoundCaptureBuffer7_1_Start(p,a) (p)->Start(a)
  1132. #define IDirectSoundCaptureBuffer7_1_Stop(p) (p)->Stop()
  1133. #define IDirectSoundCaptureBuffer7_1_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
  1134. #define IDirectSoundCaptureBuffer7_1_SetMicVolume(p,a) (p)->SetMicVolume(a)
  1135. #define IDirectSoundCaptureBuffer7_1_GetMicVolume(p,a) (p)->GetMicVolume(a)
  1136. #define IDirectSoundCaptureBuffer7_1_YieldFocus(p) (p)->YieldFocus()
  1137. #define IDirectSoundCaptureBuffer7_1_ClaimFocus(p) (p)->ClaimFocus()
  1138. #define IDirectSoundCaptureBuffer7_1_SetFocusHWND(p,a) (p)->SetFocusHWND(a)
  1139. #define IDirectSoundCaptureBuffer7_1_GetFocusHWND(p,a) (p)->GetFocusHWND(a)
  1140. #define IDirectSoundCaptureBuffer7_1_SetFocusNotificationHandler(p,a) (p)->EnableFocusNotifications(a)
  1141. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1142. #endif // DIRECTSOUND_VERSION >= 0x0701
  1143. //@@END_MSINTERNAL
  1144. #if DIRECTSOUND_VERSION >= 0x0800
  1145. //
  1146. // IDirectSoundCaptureBuffer8
  1147. //
  1148. DEFINE_GUID(IID_IDirectSoundCaptureBuffer8, 0x990df4, 0xdbb, 0x4872, 0x83, 0x3e, 0x6d, 0x30, 0x3e, 0x80, 0xae, 0xb6);
  1149. #undef INTERFACE
  1150. #define INTERFACE IDirectSoundCaptureBuffer8
  1151. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8, IDirectSoundCaptureBuffer)
  1152. {
  1153. // IUnknown methods
  1154. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1155. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1156. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1157. // IDirectSoundCaptureBuffer methods
  1158. STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS pDSCBCaps) PURE;
  1159. STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE;
  1160. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  1161. STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE;
  1162. STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
  1163. STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  1164. LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  1165. STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE;
  1166. STDMETHOD(Stop) (THIS) PURE;
  1167. STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  1168. // IDirectSoundCaptureBuffer8 methods
  1169. STDMETHOD(GetObjectInPath) (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  1170. STDMETHOD(GetFXStatus) (DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
  1171. };
  1172. #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1173. #define IDirectSoundCaptureBuffer8_AddRef(p) IUnknown_AddRef(p)
  1174. #define IDirectSoundCaptureBuffer8_Release(p) IUnknown_Release(p)
  1175. #define IDirectSoundCaptureBuffer8_GetCaps(p,a) IDirectSoundCaptureBuffer_GetCaps(p,a)
  1176. #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)
  1177. #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)
  1178. #define IDirectSoundCaptureBuffer8_GetStatus(p,a) IDirectSoundCaptureBuffer_GetStatus(p,a)
  1179. #define IDirectSoundCaptureBuffer8_Initialize(p,a,b) IDirectSoundCaptureBuffer_Initialize(p,a,b)
  1180. #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)
  1181. #define IDirectSoundCaptureBuffer8_Start(p,a) IDirectSoundCaptureBuffer_Start(p,a)
  1182. #define IDirectSoundCaptureBuffer8_Stop(p) IDirectSoundCaptureBuffer_Stop(p))
  1183. #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)
  1184. #if !defined(__cplusplus) || defined(CINTERFACE)
  1185. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  1186. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b)
  1187. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1188. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
  1189. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
  1190. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1191. #endif // DIRECTSOUND_VERSION >= 0x0800
  1192. //
  1193. // IDirectSoundNotify
  1194. //
  1195. DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  1196. #undef INTERFACE
  1197. #define INTERFACE IDirectSoundNotify
  1198. DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
  1199. {
  1200. // IUnknown methods
  1201. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1202. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1203. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1204. // IDirectSoundNotify methods
  1205. STDMETHOD(SetNotificationPositions) (THIS_ DWORD dwPositionNotifies, LPCDSBPOSITIONNOTIFY pcPositionNotifies) PURE;
  1206. };
  1207. #define IDirectSoundNotify_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1208. #define IDirectSoundNotify_AddRef(p) IUnknown_AddRef(p)
  1209. #define IDirectSoundNotify_Release(p) IUnknown_Release(p)
  1210. #if !defined(__cplusplus) || defined(CINTERFACE)
  1211. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
  1212. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1213. #define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
  1214. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1215. //
  1216. // IKsPropertySet
  1217. //
  1218. #ifndef _IKsPropertySet_
  1219. #define _IKsPropertySet_
  1220. #ifdef __cplusplus
  1221. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  1222. struct IKsPropertySet;
  1223. #endif // __cplusplus
  1224. typedef struct IKsPropertySet *LPKSPROPERTYSET;
  1225. #define KSPROPERTY_SUPPORT_GET 0x00000001
  1226. #define KSPROPERTY_SUPPORT_SET 0x00000002
  1227. DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
  1228. #undef INTERFACE
  1229. #define INTERFACE IKsPropertySet
  1230. DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
  1231. {
  1232. // IUnknown methods
  1233. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1234. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1235. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1236. // IKsPropertySet methods
  1237. STDMETHOD(Get) (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength,
  1238. LPVOID pPropertyData, ULONG ulDataLength, PULONG pulBytesReturned) PURE;
  1239. STDMETHOD(Set) (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength,
  1240. LPVOID pPropertyData, ULONG ulDataLength) PURE;
  1241. STDMETHOD(QuerySupport) (THIS_ REFGUID rguidPropSet, ULONG ulId, PULONG pulTypeSupport) PURE;
  1242. };
  1243. #define IKsPropertySet_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1244. #define IKsPropertySet_AddRef(p) IUnknown_AddRef(p)
  1245. #define IKsPropertySet_Release(p) IUnknown_Release(p)
  1246. #if !defined(__cplusplus) || defined(CINTERFACE)
  1247. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
  1248. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
  1249. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
  1250. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1251. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
  1252. #define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
  1253. #define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
  1254. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1255. #endif // _IKsPropertySet_
  1256. #if DIRECTSOUND_VERSION >= 0x0800
  1257. //@@BEGIN_MSINTERNAL
  1258. //
  1259. // IDirectSoundFXSend
  1260. //
  1261. DEFINE_GUID(IID_IDirectSoundFXSend, 0xb30f3564, 0x1698, 0x45ba, 0x9f, 0x75, 0xfc, 0x3c, 0x6c, 0x3b, 0x28, 0x10);
  1262. typedef struct _DSFXSend
  1263. {
  1264. LONG lSendLevel;
  1265. } DSFXSend, *LPDSFXSend;
  1266. typedef const DSFXSend *LPCDSFXSend;
  1267. #undef INTERFACE
  1268. #define INTERFACE IDirectSoundFXSend
  1269. DECLARE_INTERFACE_(IDirectSoundFXSend, IUnknown)
  1270. {
  1271. // IUnknown methods
  1272. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1273. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1274. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1275. // IDirectSoundFXSend methods
  1276. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXSend pcDsFxSend) PURE;
  1277. STDMETHOD(GetAllParameters) (THIS_ LPDSFXSend pDsFxSend) PURE;
  1278. };
  1279. #define IDirectSoundFXSend_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1280. #define IDirectSoundFXSend_AddRef(p) IUnknown_AddRef(p)
  1281. #define IDirectSoundFXSend_Release(p) IUnknown_Release(p)
  1282. #if !defined(__cplusplus) || defined(CINTERFACE)
  1283. #define IDirectSoundFXSend_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1284. #define IDirectSoundFXSend_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1285. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1286. #define IDirectSoundFXSend_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1287. #define IDirectSoundFXSend_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1288. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1289. //@@END_MSINTERNAL
  1290. //
  1291. // IDirectSoundFXGargle
  1292. //
  1293. DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352, 0xd622, 0x11ce, 0xaa, 0xc5, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3);
  1294. typedef struct _DSFXGargle
  1295. {
  1296. DWORD dwRateHz; // Rate of modulation in hz
  1297. DWORD dwWaveShape; // DSFXGARGLE_WAVE_xxx
  1298. } DSFXGargle, *LPDSFXGargle;
  1299. #define DSFXGARGLE_WAVE_TRIANGLE 0
  1300. #define DSFXGARGLE_WAVE_SQUARE 1
  1301. typedef const DSFXGargle *LPCDSFXGargle;
  1302. #define DSFXGARGLE_RATEHZ_MIN 1
  1303. #define DSFXGARGLE_RATEHZ_MAX 1000
  1304. #undef INTERFACE
  1305. #define INTERFACE IDirectSoundFXGargle
  1306. DECLARE_INTERFACE_(IDirectSoundFXGargle, IUnknown)
  1307. {
  1308. // IUnknown methods
  1309. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1310. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1311. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1312. // IDirectSoundFXGargle methods
  1313. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXGargle pcDsFxGargle) PURE;
  1314. STDMETHOD(GetAllParameters) (THIS_ LPDSFXGargle pDsFxGargle) PURE;
  1315. };
  1316. #define IDirectSoundFXGargle_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1317. #define IDirectSoundFXGargle_AddRef(p) IUnknown_AddRef(p)
  1318. #define IDirectSoundFXGargle_Release(p) IUnknown_Release(p)
  1319. #if !defined(__cplusplus) || defined(CINTERFACE)
  1320. #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1321. #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1322. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1323. #define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1324. #define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1325. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1326. //
  1327. // IDirectSoundFXChorus
  1328. //
  1329. DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3, 0x145f, 0x43e6, 0xa9, 0x34, 0xa7, 0x18, 0x06, 0xe5, 0x05, 0x47);
  1330. typedef struct _DSFXChorus
  1331. {
  1332. FLOAT fWetDryMix;
  1333. FLOAT fDepth;
  1334. FLOAT fFeedback;
  1335. FLOAT fFrequency;
  1336. LONG lWaveform; // LFO shape; DSFXCHORUS_WAVE_xxx
  1337. FLOAT fDelay;
  1338. LONG lPhase;
  1339. } DSFXChorus, *LPDSFXChorus;
  1340. typedef const DSFXChorus *LPCDSFXChorus;
  1341. #define DSFXCHORUS_WAVE_TRIANGLE 0
  1342. #define DSFXCHORUS_WAVE_SIN 1
  1343. #define DSFXCHORUS_WETDRYMIX_MIN 0.0f
  1344. #define DSFXCHORUS_WETDRYMIX_MAX 100.0f
  1345. #define DSFXCHORUS_DEPTH_MIN 0.0f
  1346. #define DSFXCHORUS_DEPTH_MAX 100.0f
  1347. #define DSFXCHORUS_FEEDBACK_MIN -99.0f
  1348. #define DSFXCHORUS_FEEDBACK_MAX 99.0f
  1349. #define DSFXCHORUS_FREQUENCY_MIN 0.0f
  1350. #define DSFXCHORUS_FREQUENCY_MAX 10.0f
  1351. #define DSFXCHORUS_DELAY_MIN 0.0f
  1352. #define DSFXCHORUS_DELAY_MAX 20.0f
  1353. #define DSFXCHORUS_PHASE_MIN 0
  1354. #define DSFXCHORUS_PHASE_MAX 4
  1355. #define DSFXCHORUS_PHASE_NEG_180 0
  1356. #define DSFXCHORUS_PHASE_NEG_90 1
  1357. #define DSFXCHORUS_PHASE_ZERO 2
  1358. #define DSFXCHORUS_PHASE_90 3
  1359. #define DSFXCHORUS_PHASE_180 4
  1360. #undef INTERFACE
  1361. #define INTERFACE IDirectSoundFXChorus
  1362. DECLARE_INTERFACE_(IDirectSoundFXChorus, IUnknown)
  1363. {
  1364. // IUnknown methods
  1365. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1366. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1367. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1368. // IDirectSoundFXChorus methods
  1369. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXChorus pcDsFxChorus) PURE;
  1370. STDMETHOD(GetAllParameters) (THIS_ LPDSFXChorus pDsFxChorus) PURE;
  1371. };
  1372. #define IDirectSoundFXChorus_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1373. #define IDirectSoundFXChorus_AddRef(p) IUnknown_AddRef(p)
  1374. #define IDirectSoundFXChorus_Release(p) IUnknown_Release(p)
  1375. #if !defined(__cplusplus) || defined(CINTERFACE)
  1376. #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1377. #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1378. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1379. #define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1380. #define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1381. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1382. //
  1383. // IDirectSoundFXFlanger
  1384. //
  1385. DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878, 0x2c92, 0x4072, 0x9b, 0x2c, 0xea, 0x68, 0xf5, 0x39, 0x67, 0x83);
  1386. typedef struct _DSFXFlanger
  1387. {
  1388. FLOAT fWetDryMix;
  1389. FLOAT fDepth;
  1390. FLOAT fFeedback;
  1391. FLOAT fFrequency;
  1392. LONG lWaveform;
  1393. FLOAT fDelay;
  1394. LONG lPhase;
  1395. } DSFXFlanger, *LPDSFXFlanger;
  1396. typedef const DSFXFlanger *LPCDSFXFlanger;
  1397. #define DSFXFLANGER_WAVE_TRIANGLE 0
  1398. #define DSFXFLANGER_WAVE_SIN 1
  1399. #define DSFXFLANGER_WETDRYMIX_MIN 0.0f
  1400. #define DSFXFLANGER_WETDRYMIX_MAX 100.0f
  1401. #define DSFXFLANGER_FREQUENCY_MIN 0.0f
  1402. #define DSFXFLANGER_FREQUENCY_MAX 10.0f
  1403. #define DSFXFLANGER_DEPTH_MIN 0.0f
  1404. #define DSFXFLANGER_DEPTH_MAX 100.0f
  1405. #define DSFXFLANGER_PHASE_MIN 0
  1406. #define DSFXFLANGER_PHASE_MAX 4
  1407. #define DSFXFLANGER_FEEDBACK_MIN -99.0f
  1408. #define DSFXFLANGER_FEEDBACK_MAX 99.0f
  1409. #define DSFXFLANGER_DELAY_MIN 0.0f
  1410. #define DSFXFLANGER_DELAY_MAX 4.0f
  1411. #define DSFXFLANGER_PHASE_NEG_180 0
  1412. #define DSFXFLANGER_PHASE_NEG_90 1
  1413. #define DSFXFLANGER_PHASE_ZERO 2
  1414. #define DSFXFLANGER_PHASE_90 3
  1415. #define DSFXFLANGER_PHASE_180 4
  1416. #undef INTERFACE
  1417. #define INTERFACE IDirectSoundFXFlanger
  1418. DECLARE_INTERFACE_(IDirectSoundFXFlanger, IUnknown)
  1419. {
  1420. // IUnknown methods
  1421. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1422. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1423. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1424. // IDirectSoundFXFlanger methods
  1425. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXFlanger pcDsFxFlanger) PURE;
  1426. STDMETHOD(GetAllParameters) (THIS_ LPDSFXFlanger pDsFxFlanger) PURE;
  1427. };
  1428. #define IDirectSoundFXFlanger_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1429. #define IDirectSoundFXFlanger_AddRef(p) IUnknown_AddRef(p)
  1430. #define IDirectSoundFXFlanger_Release(p) IUnknown_Release(p)
  1431. #if !defined(__cplusplus) || defined(CINTERFACE)
  1432. #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1433. #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1434. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1435. #define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1436. #define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1437. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1438. //
  1439. // IDirectSoundFXEcho
  1440. //
  1441. DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf, 0x50db, 0x4e92, 0xa2, 0xbd, 0x44, 0x54, 0x88, 0xd1, 0xed, 0x42);
  1442. typedef struct _DSFXEcho
  1443. {
  1444. FLOAT fWetDryMix;
  1445. FLOAT fFeedback;
  1446. FLOAT fLeftDelay;
  1447. FLOAT fRightDelay;
  1448. LONG lPanDelay;
  1449. } DSFXEcho, *LPDSFXEcho;
  1450. typedef const DSFXEcho *LPCDSFXEcho;
  1451. #define DSFXECHO_WETDRYMIX_MIN 0.0f
  1452. #define DSFXECHO_WETDRYMIX_MAX 100.0f
  1453. #define DSFXECHO_FEEDBACK_MIN 0.0f
  1454. #define DSFXECHO_FEEDBACK_MAX 100.0f
  1455. #define DSFXECHO_LEFTDELAY_MIN 1.0f
  1456. #define DSFXECHO_LEFTDELAY_MAX 2000.0f
  1457. #define DSFXECHO_RIGHTDELAY_MIN 1.0f
  1458. #define DSFXECHO_RIGHTDELAY_MAX 2000.0f
  1459. #define DSFXECHO_PANDELAY_MIN 0
  1460. #define DSFXECHO_PANDELAY_MAX 1
  1461. #undef INTERFACE
  1462. #define INTERFACE IDirectSoundFXEcho
  1463. DECLARE_INTERFACE_(IDirectSoundFXEcho, IUnknown)
  1464. {
  1465. // IUnknown methods
  1466. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1467. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1468. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1469. // IDirectSoundFXEcho methods
  1470. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXEcho pcDsFxEcho) PURE;
  1471. STDMETHOD(GetAllParameters) (THIS_ LPDSFXEcho pDsFxEcho) PURE;
  1472. };
  1473. #define IDirectSoundFXEcho_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1474. #define IDirectSoundFXEcho_AddRef(p) IUnknown_AddRef(p)
  1475. #define IDirectSoundFXEcho_Release(p) IUnknown_Release(p)
  1476. #if !defined(__cplusplus) || defined(CINTERFACE)
  1477. #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1478. #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1479. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1480. #define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1481. #define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1482. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1483. //
  1484. // IDirectSoundFXDistortion
  1485. //
  1486. DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326, 0x455f, 0x4d8b, 0xbd, 0xa9, 0x8d, 0x5d, 0x3e, 0x9e, 0x3e, 0x0b);
  1487. typedef struct _DSFXDistortion
  1488. {
  1489. FLOAT fGain;
  1490. FLOAT fEdge;
  1491. FLOAT fPostEQCenterFrequency;
  1492. FLOAT fPostEQBandwidth;
  1493. FLOAT fPreLowpassCutoff;
  1494. } DSFXDistortion, *LPDSFXDistortion;
  1495. typedef const DSFXDistortion *LPCDSFXDistortion;
  1496. #define DSFXDISTORTION_GAIN_MIN -60.0f
  1497. #define DSFXDISTORTION_GAIN_MAX 0.0f
  1498. #define DSFXDISTORTION_EDGE_MIN 0.0f
  1499. #define DSFXDISTORTION_EDGE_MAX 100.0f
  1500. #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN 100.0f
  1501. #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f
  1502. #define DSFXDISTORTION_POSTEQBANDWIDTH_MIN 100.0f
  1503. #define DSFXDISTORTION_POSTEQBANDWIDTH_MAX 8000.0f
  1504. #define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN 100.0f
  1505. #define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX 8000.0f
  1506. #undef INTERFACE
  1507. #define INTERFACE IDirectSoundFXDistortion
  1508. DECLARE_INTERFACE_(IDirectSoundFXDistortion, IUnknown)
  1509. {
  1510. // IUnknown methods
  1511. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1512. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1513. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1514. // IDirectSoundFXDistortion methods
  1515. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXDistortion pcDsFxDistortion) PURE;
  1516. STDMETHOD(GetAllParameters) (THIS_ LPDSFXDistortion pDsFxDistortion) PURE;
  1517. };
  1518. #define IDirectSoundFXDistortion_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1519. #define IDirectSoundFXDistortion_AddRef(p) IUnknown_AddRef(p)
  1520. #define IDirectSoundFXDistortion_Release(p) IUnknown_Release(p)
  1521. #if !defined(__cplusplus) || defined(CINTERFACE)
  1522. #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1523. #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1524. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1525. #define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1526. #define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1527. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1528. //
  1529. // IDirectSoundFXCompressor
  1530. //
  1531. DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154, 0x62f6, 0x4e2c, 0xa1, 0x5c, 0xd3, 0xb6, 0xc4, 0x17, 0xf7, 0xa0);
  1532. typedef struct _DSFXCompressor
  1533. {
  1534. FLOAT fGain;
  1535. FLOAT fAttack;
  1536. FLOAT fRelease;
  1537. FLOAT fThreshold;
  1538. FLOAT fRatio;
  1539. FLOAT fPredelay;
  1540. } DSFXCompressor, *LPDSFXCompressor;
  1541. typedef const DSFXCompressor *LPCDSFXCompressor;
  1542. #define DSFXCOMPRESSOR_GAIN_MIN -60.0f
  1543. #define DSFXCOMPRESSOR_GAIN_MAX 60.0f
  1544. #define DSFXCOMPRESSOR_ATTACK_MIN 0.01f
  1545. #define DSFXCOMPRESSOR_ATTACK_MAX 500.0f
  1546. #define DSFXCOMPRESSOR_RELEASE_MIN 50.0f
  1547. #define DSFXCOMPRESSOR_RELEASE_MAX 3000.0f
  1548. #define DSFXCOMPRESSOR_THRESHOLD_MIN -60.0f
  1549. #define DSFXCOMPRESSOR_THRESHOLD_MAX 0.0f
  1550. #define DSFXCOMPRESSOR_RATIO_MIN 1.0f
  1551. #define DSFXCOMPRESSOR_RATIO_MAX 100.0f
  1552. #define DSFXCOMPRESSOR_PREDELAY_MIN 0.0f
  1553. #define DSFXCOMPRESSOR_PREDELAY_MAX 4.0f
  1554. #undef INTERFACE
  1555. #define INTERFACE IDirectSoundFXCompressor
  1556. DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown)
  1557. {
  1558. // IUnknown methods
  1559. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1560. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1561. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1562. // IDirectSoundFXCompressor methods
  1563. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXCompressor pcDsFxCompressor) PURE;
  1564. STDMETHOD(GetAllParameters) (THIS_ LPDSFXCompressor pDsFxCompressor) PURE;
  1565. };
  1566. #define IDirectSoundFXCompressor_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1567. #define IDirectSoundFXCompressor_AddRef(p) IUnknown_AddRef(p)
  1568. #define IDirectSoundFXCompressor_Release(p) IUnknown_Release(p)
  1569. #if !defined(__cplusplus) || defined(CINTERFACE)
  1570. #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1571. #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1572. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1573. #define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1574. #define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1575. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1576. //
  1577. // IDirectSoundFXParamEq
  1578. //
  1579. DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe, 0xfe90, 0x4204, 0x80, 0x78, 0x82, 0x33, 0x4c, 0xd1, 0x77, 0xda);
  1580. typedef struct _DSFXParamEq
  1581. {
  1582. FLOAT fCenter;
  1583. FLOAT fBandwidth;
  1584. FLOAT fGain;
  1585. } DSFXParamEq, *LPDSFXParamEq;
  1586. typedef const DSFXParamEq *LPCDSFXParamEq;
  1587. #define DSFXPARAMEQ_CENTER_MIN 80.0f
  1588. #define DSFXPARAMEQ_CENTER_MAX 16000.0f
  1589. #define DSFXPARAMEQ_BANDWIDTH_MIN 1.0f
  1590. #define DSFXPARAMEQ_BANDWIDTH_MAX 36.0f
  1591. #define DSFXPARAMEQ_GAIN_MIN -15.0f
  1592. #define DSFXPARAMEQ_GAIN_MAX 15.0f
  1593. #undef INTERFACE
  1594. #define INTERFACE IDirectSoundFXParamEq
  1595. DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown)
  1596. {
  1597. // IUnknown methods
  1598. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1599. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1600. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1601. // IDirectSoundFXParamEq methods
  1602. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXParamEq pcDsFxParamEq) PURE;
  1603. STDMETHOD(GetAllParameters) (THIS_ LPDSFXParamEq pDsFxParamEq) PURE;
  1604. };
  1605. #define IDirectSoundFXParamEq_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1606. #define IDirectSoundFXParamEq_AddRef(p) IUnknown_AddRef(p)
  1607. #define IDirectSoundFXParamEq_Release(p) IUnknown_Release(p)
  1608. #if !defined(__cplusplus) || defined(CINTERFACE)
  1609. #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1610. #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1611. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1612. #define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1613. #define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1614. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1615. //@@BEGIN_MSINTERNAL
  1616. #if 0
  1617. //
  1618. // IDirectSoundFXI3DL2Source
  1619. //
  1620. DEFINE_GUID(IID_IDirectSoundFXI3DL2Source, 0x4363ff5c, 0x0410, 0x4507, 0xb3, 0x21, 0xea, 0x09, 0xf8, 0xf4, 0x56, 0x99);
  1621. typedef struct _DSFXI3DL2Obstruction
  1622. {
  1623. LONG lHFLevel; // [-10000, 0] default: 0 mB
  1624. FLOAT flLFRatio; // [0.0, 1.0] default: 0.0
  1625. } DSFXI3DL2Obstruction, *LPDSFXI3DL2Obstruction;
  1626. typedef const DSFXI3DL2Obstruction *LPCDSFXI3DL2Obstruction;
  1627. typedef struct _DSFXI3DL2Occlusion
  1628. {
  1629. LONG lHFLevel; // [-10000, 0] default: 0 mB
  1630. FLOAT flLFRatio; // [0.0, 1.0] default: 0.25
  1631. } DSFXI3DL2Occlusion, *LPDSFXI3DL2Occlusion;
  1632. typedef const DSFXI3DL2Occlusion *LPCDSFXI3DL2Occlusion;
  1633. typedef struct _DSFXI3DL2Source
  1634. {
  1635. LONG lDirect; // [-10000, 1000] default: 0 mB
  1636. LONG lDirectHF; // [-10000, 0] default: 0 mB
  1637. LONG lRoom; // [-10000, 1000] default: 0 mB
  1638. LONG lRoomHF; // [-10000, 0] default: 0 mB
  1639. FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
  1640. DSFXI3DL2Obstruction Obstruction;
  1641. DSFXI3DL2Occlusion Occlusion;
  1642. DWORD dwFlags; // default: DSFX_I3DL2SOURCE_OCC_LPF
  1643. } DSFXI3DL2Source, *LPDSFXI3DL2Source;
  1644. typedef const DSFXI3DL2Source *LPCDSFXI3DL2Source;
  1645. #define DSFX_I3DL2SOURCE_DIRECT_MIN (-10000)
  1646. #define DSFX_I3DL2SOURCE_DIRECT_MAX 1000
  1647. #define DSFX_I3DL2SOURCE_DIRECT_DEFAULT 0
  1648. #define DSFX_I3DL2SOURCE_DIRECTHF_MIN (-10000)
  1649. #define DSFX_I3DL2SOURCE_DIRECTHF_MAX 0
  1650. #define DSFX_I3DL2SOURCE_DIRECTHF_DEFAULT 0
  1651. #define DSFX_I3DL2SOURCE_ROOM_MIN (-10000)
  1652. #define DSFX_I3DL2SOURCE_ROOM_MAX 1000
  1653. #define DSFX_I3DL2SOURCE_ROOM_DEFAULT 0
  1654. #define DSFX_I3DL2SOURCE_ROOMHF_MIN (-10000)
  1655. #define DSFX_I3DL2SOURCE_ROOMHF_MAX 0
  1656. #define DSFX_I3DL2SOURCE_ROOMHF_DEFAULT 0
  1657. #define DSFX_I3DL2SOURCE_ROOMROLLOFFFACTOR_MIN 0.0f
  1658. #define DSFX_I3DL2SOURCE_ROOMROLLOFFFACTOR_MAX 10.0f
  1659. #define DSFX_I3DL2SOURCE_ROOMROLLOFFFACTOR_DEFAULT 0.0f
  1660. #define DSFX_I3DL2SOURCE_OBSTRUCTION_HFLEVEL_MIN (-10000)
  1661. #define DSFX_I3DL2SOURCE_OBSTRUCTION_HFLEVEL_MAX 0
  1662. #define DSFX_I3DL2SOURCE_OBSTRUCTION_HFLEVEL_DEFAULT 0
  1663. #define DSFX_I3DL2SOURCE_OBSTRUCTION_LFRATIO_MIN 0.0f
  1664. #define DSFX_I3DL2SOURCE_OBSTRUCTION_LFRATIO_MAX 1.0f
  1665. #define DSFX_I3DL2SOURCE_OBSTRUCTION_LFRATIO_DEFAULT 0.0f
  1666. #define DSFX_I3DL2SOURCE_OCCLUSION_HFLEVEL_MIN (-10000)
  1667. #define DSFX_I3DL2SOURCE_OCCLUSION_HFLEVEL_MAX 0
  1668. #define DSFX_I3DL2SOURCE_OCCLUSION_HFLEVEL_DEFAULT 0
  1669. #define DSFX_I3DL2SOURCE_OCCLUSION_LFRATIO_MIN 0.0f
  1670. #define DSFX_I3DL2SOURCE_OCCLUSION_LFRATIO_MAX 1.0f
  1671. #define DSFX_I3DL2SOURCE_OCCLUSION_LFRATIO_DEFAULT 0.25f
  1672. #undef INTERFACE
  1673. #define INTERFACE IDirectSoundFXI3DL2Source
  1674. DECLARE_INTERFACE_(IDirectSoundFXI3DL2Source, IUnknown)
  1675. {
  1676. // IUnknown methods
  1677. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1678. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1679. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1680. // IDirectSoundFXI3DL2Source methods
  1681. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXI3DL2Source pcDsFxI3DL2Source) PURE;
  1682. STDMETHOD(GetAllParameters) (THIS_ LPDSFXI3DL2Source pDsFxI3DL2Source) PURE;
  1683. STDMETHOD(SetObstructionPreset) (THIS_ DWORD dwPreset) PURE;
  1684. STDMETHOD(GetObstructionPreset) (THIS_ LPDWORD pdwPreset) PURE;
  1685. STDMETHOD(SetOcclusionPreset) (THIS_ DWORD dwPreset) PURE;
  1686. STDMETHOD(GetOcclusionPreset) (THIS_ LPDWORD pdwPreset) PURE;
  1687. };
  1688. #define IDirectSoundFXI3DL2Source_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1689. #define IDirectSoundFXI3DL2Source_AddRef(p) IUnknown_AddRef(p)
  1690. #define IDirectSoundFXI3DL2Source_Release(p) IUnknown_Release(p)
  1691. #if !defined(__cplusplus) || defined(CINTERFACE)
  1692. #define IDirectSoundFXI3DL2Source_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1693. #define IDirectSoundFXI3DL2Source_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1694. #define IDirectSoundFXI3DL2Source_SetObstructionPreset(p,a) (p)->lpVtbl->SetObstructionPreset(p,a)
  1695. #define IDirectSoundFXI3DL2Source_GetObstructionPreset(p,a) (p)->lpVtbl->GetObstructionPreset(p,a)
  1696. #define IDirectSoundFXI3DL2Source_SetOcclusionPreset(p,a) (p)->lpVtbl->SetOcclusionPreset(p,a)
  1697. #define IDirectSoundFXI3DL2Source_GetOcclusionPreset(p,a) (p)->lpVtbl->GetOcclusionPreset(p,a)
  1698. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1699. #define IDirectSoundFXI3DL2Source_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1700. #define IDirectSoundFXI3DL2Source_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1701. #define IDirectSoundFXI3DL2Source_SetObstructionPreset(p,a) (p)->SetObstructionPreset(a)
  1702. #define IDirectSoundFXI3DL2Source_GetObstructionPreset(p,a) (p)->GetObstructionPreset(a)
  1703. #define IDirectSoundFXI3DL2Source_SetOcclusionPreset(p,a) (p)->SetOcclusionPreset(a)
  1704. #define IDirectSoundFXI3DL2Source_GetOcclusionPreset(p,a) (p)->GetOcclusionPreset(a)
  1705. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1706. #endif // 0
  1707. //@@END_MSINTERNAL
  1708. //
  1709. // IDirectSoundFXI3DL2Reverb
  1710. //
  1711. DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
  1712. typedef struct _DSFXI3DL2Reverb
  1713. {
  1714. LONG lRoom; // [-10000, 0] default: -1000 mB
  1715. LONG lRoomHF; // [-10000, 0] default: 0 mB
  1716. FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
  1717. FLOAT flDecayTime; // [0.1, 20.0] default: 1.49s
  1718. FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.83
  1719. LONG lReflections; // [-10000, 1000] default: -2602 mB
  1720. FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.007 s
  1721. LONG lReverb; // [-10000, 2000] default: 200 mB
  1722. FLOAT flReverbDelay; // [0.0, 0.1] default: 0.011 s
  1723. FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 %
  1724. FLOAT flDensity; // [0.0, 100.0] default: 100.0 %
  1725. FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
  1726. } DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb;
  1727. typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb;
  1728. #define DSFX_I3DL2REVERB_ROOM_MIN (-10000)
  1729. #define DSFX_I3DL2REVERB_ROOM_MAX 0
  1730. #define DSFX_I3DL2REVERB_ROOM_DEFAULT (-1000)
  1731. #define DSFX_I3DL2REVERB_ROOMHF_MIN (-10000)
  1732. #define DSFX_I3DL2REVERB_ROOMHF_MAX 0
  1733. #define DSFX_I3DL2REVERB_ROOMHF_DEFAULT (-100)
  1734. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN 0.0f
  1735. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX 10.0f
  1736. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT 0.0f
  1737. #define DSFX_I3DL2REVERB_DECAYTIME_MIN 0.1f
  1738. #define DSFX_I3DL2REVERB_DECAYTIME_MAX 20.0f
  1739. #define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT 1.49f
  1740. #define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN 0.1f
  1741. #define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX 2.0f
  1742. #define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT 0.83f
  1743. #define DSFX_I3DL2REVERB_REFLECTIONS_MIN (-10000)
  1744. #define DSFX_I3DL2REVERB_REFLECTIONS_MAX 1000
  1745. #define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT (-2602)
  1746. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN 0.0f
  1747. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX 0.3f
  1748. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT 0.007f
  1749. #define DSFX_I3DL2REVERB_REVERB_MIN (-10000)
  1750. #define DSFX_I3DL2REVERB_REVERB_MAX 2000
  1751. #define DSFX_I3DL2REVERB_REVERB_DEFAULT (200)
  1752. #define DSFX_I3DL2REVERB_REVERBDELAY_MIN 0.0f
  1753. #define DSFX_I3DL2REVERB_REVERBDELAY_MAX 0.1f
  1754. #define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT 0.011f
  1755. #define DSFX_I3DL2REVERB_DIFFUSION_MIN 0.0f
  1756. #define DSFX_I3DL2REVERB_DIFFUSION_MAX 100.0f
  1757. #define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT 100.0f
  1758. #define DSFX_I3DL2REVERB_DENSITY_MIN 0.0f
  1759. #define DSFX_I3DL2REVERB_DENSITY_MAX 100.0f
  1760. #define DSFX_I3DL2REVERB_DENSITY_DEFAULT 100.0f
  1761. #define DSFX_I3DL2REVERB_HFREFERENCE_MIN 20.0f
  1762. #define DSFX_I3DL2REVERB_HFREFERENCE_MAX 20000.0f
  1763. #define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT 5000.0f
  1764. #define DSFX_I3DL2REVERB_QUALITY_MIN 0
  1765. #define DSFX_I3DL2REVERB_QUALITY_MAX 3
  1766. #define DSFX_I3DL2REVERB_QUALITY_DEFAULT 2
  1767. #undef INTERFACE
  1768. #define INTERFACE IDirectSoundFXI3DL2Reverb
  1769. DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb, IUnknown)
  1770. {
  1771. // IUnknown methods
  1772. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1773. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1774. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1775. // IDirectSoundFXI3DL2Reverb methods
  1776. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXI3DL2Reverb pcDsFxI3DL2Reverb) PURE;
  1777. STDMETHOD(GetAllParameters) (THIS_ LPDSFXI3DL2Reverb pDsFxI3DL2Reverb) PURE;
  1778. STDMETHOD(SetPreset) (THIS_ DWORD dwPreset) PURE;
  1779. STDMETHOD(GetPreset) (THIS_ LPDWORD pdwPreset) PURE;
  1780. STDMETHOD(SetQuality) (THIS_ LONG lQuality) PURE;
  1781. STDMETHOD(GetQuality) (THIS_ LONG *plQuality) PURE;
  1782. };
  1783. #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1784. #define IDirectSoundFXI3DL2Reverb_AddRef(p) IUnknown_AddRef(p)
  1785. #define IDirectSoundFXI3DL2Reverb_Release(p) IUnknown_Release(p)
  1786. #if !defined(__cplusplus) || defined(CINTERFACE)
  1787. #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1788. #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1789. #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->lpVtbl->SetPreset(p,a)
  1790. #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->lpVtbl->GetPreset(p,a)
  1791. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1792. #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1793. #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1794. #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->SetPreset(a)
  1795. #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->GetPreset(a)
  1796. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1797. //@@BEGIN_MSINTERNAL
  1798. //
  1799. // IDirectSoundFXI3DL2SourceEnv - A private interface used by the I3DL2 source DMO
  1800. // to receive various bits of information about the environment it's operating in.
  1801. //
  1802. DEFINE_GUID(IID_IDirectSoundFXI3DL2SourceEnv, 0xf6c55470, 0x7706, 0x4ce1, 0xa3, 0x54, 0x74, 0xb2, 0xf0, 0x3, 0x25, 0xe2);
  1803. #undef INTERFACE
  1804. #define INTERFACE IDirectSoundFXI3DL2SourceEnv
  1805. DECLARE_INTERFACE_(IDirectSoundFXI3DL2SourceEnv, IUnknown)
  1806. {
  1807. // IUnknown methods
  1808. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1809. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1810. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1811. // IDirectSoundFXI3DL2SourceEnv methods
  1812. STDMETHOD(SetEnvironmentReverb) (THIS_ LPDIRECTSOUNDFXI3DL2REVERB8) PURE;
  1813. STDMETHOD(SetDS3DBuffer) (THIS_ LPDIRECTSOUND3DBUFFER) PURE;
  1814. STDMETHOD(SetDS3DListener) (THIS_ LPDIRECTSOUND3DLISTENER) PURE;
  1815. };
  1816. #define IDirectSoundFXI3DL2SourceEnv_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1817. #define IDirectSoundFXI3DL2SourceEnv_AddRef(p) IUnknown_AddRef(p)
  1818. #define IDirectSoundFXI3DL2SourceEnv_Release(p) IUnknown_Release(p)
  1819. #if !defined(__cplusplus) || defined(CINTERFACE)
  1820. #define IDirectSoundFXI3DL2SourceEnv_SetEnvironmentReverb(p,a) (p)->lpVtbl->SetEnvironmentReverb(p,a)
  1821. #define IDirectSoundFXI3DL2SourceEnv_SetDS3DBuffer(p,a) (p)->lpVtbl->SetDS3DBuffer(p,a)
  1822. #define IDirectSoundFXI3DL2SourceEnv_SetDS3DListener(p,a) (p)->lpVtbl->SetDS3DListener(p,a)
  1823. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1824. #define IDirectSoundFXI3DL2SourceEnv_SetEnvironmentReverb(p,a) (p)->SetEnvironmentReverb(a)
  1825. #define IDirectSoundFXI3DL2SourceEnv_SetDS3DBuffer(p,a) (p)->SetDS3DBuffer(a)
  1826. #define IDirectSoundFXI3DL2SourceEnv_SetDS3DListener(p,a) (p)->SetDS3DListener(a)
  1827. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1828. //
  1829. // IDirectSound3DBufferPrivate - provided by our 3D buffer object so that the
  1830. // I3DL2 source DMO can discover the current attenuation of its host buffer.
  1831. //
  1832. DEFINE_GUID(IID_IDirectSound3DBufferPrivate, 0x7d8ef383, 0xca05, 0x4593, 0x82, 0xa1, 0x44, 0x4e, 0x80, 0x08, 0x71, 0xe1);
  1833. #undef INTERFACE
  1834. #define INTERFACE IDirectSound3DBufferPrivate
  1835. DECLARE_INTERFACE_(IDirectSound3DBufferPrivate, IUnknown)
  1836. {
  1837. // IUnknown methods
  1838. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1839. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1840. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1841. // IDirectSound3DBufferPrivate methods
  1842. STDMETHOD(GetAttenuation) (THIS_ FLOAT*) PURE;
  1843. };
  1844. #define IDirectSound3DBufferPrivate_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1845. #define IDirectSound3DBufferPrivate_AddRef(p) IUnknown_AddRef(p)
  1846. #define IDirectSound3DBufferPrivate_Release(p) IUnknown_Release(p)
  1847. #if !defined(__cplusplus) || defined(CINTERFACE)
  1848. #define IDirectSound3DBufferPrivate_GetAttenuation(p,a) (p)->lpVtbl->GetAttenuation(p,a)
  1849. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1850. #define IDirectSound3DBufferPrivate_GetAttenuation(p,a) (p)->GetAttenuation(a)
  1851. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1852. //@@END_MSINTERNAL
  1853. //
  1854. // IDirectSoundFXWavesReverb
  1855. //
  1856. DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
  1857. typedef struct _DSFXWavesReverb
  1858. {
  1859. FLOAT fInGain; // [-96.0,0.0] default: 0.0 dB
  1860. FLOAT fReverbMix; // [-96.0,0.0] default: 0.0 db
  1861. FLOAT fReverbTime; // [0.001,3000.0] default: 1000.0 ms
  1862. FLOAT fHighFreqRTRatio; // [0.001,0.999] default: 0.001
  1863. } DSFXWavesReverb, *LPDSFXWavesReverb;
  1864. typedef const DSFXWavesReverb *LPCDSFXWavesReverb;
  1865. #define DSFX_WAVESREVERB_INGAIN_MIN -96.0f
  1866. #define DSFX_WAVESREVERB_INGAIN_MAX 0.0f
  1867. #define DSFX_WAVESREVERB_INGAIN_DEFAULT 0.0f
  1868. #define DSFX_WAVESREVERB_REVERBMIX_MIN -96.0f
  1869. #define DSFX_WAVESREVERB_REVERBMIX_MAX 0.0f
  1870. #define DSFX_WAVESREVERB_REVERBMIX_DEFAULT 0.0f
  1871. #define DSFX_WAVESREVERB_REVERBTIME_MIN 0.001f
  1872. #define DSFX_WAVESREVERB_REVERBTIME_MAX 3000.0f
  1873. #define DSFX_WAVESREVERB_REVERBTIME_DEFAULT 1000.0f
  1874. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN 0.001f
  1875. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX 0.999f
  1876. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT 0.001f
  1877. #undef INTERFACE
  1878. #define INTERFACE IDirectSoundFXWavesReverb
  1879. DECLARE_INTERFACE_(IDirectSoundFXWavesReverb, IUnknown)
  1880. {
  1881. // IUnknown methods
  1882. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1883. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1884. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1885. // IDirectSoundFXWavesReverb methods
  1886. STDMETHOD(SetAllParameters) (THIS_ LPCDSFXWavesReverb pcDsFxWavesReverb) PURE;
  1887. STDMETHOD(GetAllParameters) (THIS_ LPDSFXWavesReverb pDsFxWavesReverb) PURE;
  1888. };
  1889. #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1890. #define IDirectSoundFXWavesReverb_AddRef(p) IUnknown_AddRef(p)
  1891. #define IDirectSoundFXWavesReverb_Release(p) IUnknown_Release(p)
  1892. #if !defined(__cplusplus) || defined(CINTERFACE)
  1893. #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1894. #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1895. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1896. #define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1897. #define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1898. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1899. //
  1900. // IDirectSoundCaptureFXAec
  1901. //
  1902. DEFINE_GUID(IID_IDirectSoundCaptureFXAec, 0xad74143d, 0x903d, 0x4ab7, 0x80, 0x66, 0x28, 0xd3, 0x63, 0x03, 0x6d, 0x65);
  1903. typedef struct _DSCFXAec
  1904. {
  1905. BOOL fEnable;
  1906. BOOL fNoiseFill;
  1907. DWORD dwMode;
  1908. } DSCFXAec, *LPDSCFXAec;
  1909. typedef const DSCFXAec *LPCDSCFXAec;
  1910. // These match the AEC_MODE_* constants in the DDK's ksmedia.h file
  1911. #define DSCFX_AEC_MODE_PASS_THROUGH 0x0
  1912. #define DSCFX_AEC_MODE_HALF_DUPLEX 0x1
  1913. #define DSCFX_AEC_MODE_FULL_DUPLEX 0x2
  1914. // These match the AEC_STATUS_* constants in ksmedia.h
  1915. #define DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED 0x0
  1916. #define DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED 0x1
  1917. #define DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED 0x2
  1918. #define DSCFX_AEC_STATUS_CURRENTLY_CONVERGED 0x8
  1919. #undef INTERFACE
  1920. #define INTERFACE IDirectSoundCaptureFXAec
  1921. DECLARE_INTERFACE_(IDirectSoundCaptureFXAec, IUnknown)
  1922. {
  1923. // IUnknown methods
  1924. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1925. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1926. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1927. // IDirectSoundCaptureFXAec methods
  1928. STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXAec pDscFxAec) PURE;
  1929. STDMETHOD(GetAllParameters) (THIS_ LPDSCFXAec pDscFxAec) PURE;
  1930. STDMETHOD(GetStatus) (THIS_ PDWORD pdwStatus) PURE;
  1931. STDMETHOD(Reset) (THIS) PURE;
  1932. };
  1933. #define IDirectSoundCaptureFXAec_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1934. #define IDirectSoundCaptureFXAec_AddRef(p) IUnknown_AddRef(p)
  1935. #define IDirectSoundCaptureFXAec_Release(p) IUnknown_Release(p)
  1936. #if !defined(__cplusplus) || defined(CINTERFACE)
  1937. #define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1938. #define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1939. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1940. #define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1941. #define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1942. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1943. //
  1944. // IDirectSoundCaptureFXNoiseSuppress
  1945. //
  1946. DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress, 0xed311e41, 0xfbae, 0x4175, 0x96, 0x25, 0xcd, 0x8, 0x54, 0xf6, 0x93, 0xca);
  1947. typedef struct _DSCFXNoiseSuppress
  1948. {
  1949. BOOL fEnable;
  1950. } DSCFXNoiseSuppress, *LPDSCFXNoiseSuppress;
  1951. typedef const DSCFXNoiseSuppress *LPCDSCFXNoiseSuppress;
  1952. #undef INTERFACE
  1953. #define INTERFACE IDirectSoundCaptureFXNoiseSuppress
  1954. DECLARE_INTERFACE_(IDirectSoundCaptureFXNoiseSuppress, IUnknown)
  1955. {
  1956. // IUnknown methods
  1957. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1958. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1959. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1960. // IDirectSoundCaptureFXNoiseSuppress methods
  1961. STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXNoiseSuppress pcDscFxNoiseSuppress) PURE;
  1962. STDMETHOD(GetAllParameters) (THIS_ LPDSCFXNoiseSuppress pDscFxNoiseSuppress) PURE;
  1963. STDMETHOD(Reset) (THIS) PURE;
  1964. };
  1965. #define IDirectSoundCaptureFXNoiseSuppress_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1966. #define IDirectSoundCaptureFXNoiseSuppress_AddRef(p) IUnknown_AddRef(p)
  1967. #define IDirectSoundCaptureFXNoiseSuppress_Release(p) IUnknown_Release(p)
  1968. #if !defined(__cplusplus) || defined(CINTERFACE)
  1969. #define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  1970. #define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  1971. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1972. #define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->SetAllParameters(a)
  1973. #define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->GetAllParameters(a)
  1974. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1975. //@@BEGIN_MSINTERNAL
  1976. //
  1977. // IDirectSoundCaptureFXAgc
  1978. //
  1979. DEFINE_GUID(IID_IDirectSoundCaptureFXAgc, 0xe54f76b8, 0xe48f, 0x427b, 0xb7, 0xf7, 0xaf, 0xb8, 0xc7, 0x13, 0xa1, 0x25);
  1980. typedef struct _DSCFXAgc
  1981. {
  1982. BOOL fEnable;
  1983. BOOL fReset;
  1984. } DSCFXAgc, *LPDSCFXAgc;
  1985. typedef const DSCFXAgc *LPCDSCFXAgc;
  1986. #undef INTERFACE
  1987. #define INTERFACE IDirectSoundCaptureFXAgc
  1988. DECLARE_INTERFACE_(IDirectSoundCaptureFXAgc, IUnknown)
  1989. {
  1990. // IUnknown methods
  1991. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  1992. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1993. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1994. // IDirectSoundCaptureFXAgc methods
  1995. STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXAgc pcDscFxAgc) PURE;
  1996. STDMETHOD(GetAllParameters) (THIS_ LPDSCFXAgc pDscFxAgc) PURE;
  1997. };
  1998. #define IDirectSoundCaptureFXAgc_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  1999. #define IDirectSoundCaptureFXAgc_AddRef(p) IUnknown_AddRef(p)
  2000. #define IDirectSoundCaptureFXAgc_Release(p) IUnknown_Release(p)
  2001. #if !defined(__cplusplus) || defined(CINTERFACE)
  2002. #define IDirectSoundCaptureFXAgc_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  2003. #define IDirectSoundCaptureFXAgc_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  2004. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2005. #define IDirectSoundCaptureFXAgc_SetAllParameters(p,a) (p)->SetAllParameters(a)
  2006. #define IDirectSoundCaptureFXAgc_GetAllParameters(p,a) (p)->GetAllParameters(a)
  2007. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2008. //
  2009. // IDirectSoundCaptureFXMicArray
  2010. //
  2011. DEFINE_GUID(IID_IDirectSoundCaptureFXMicArray, 0x9AAB5F95, 0xCAF6, 0x4e2a, 0x9D, 0x16, 0x24, 0x5E, 0xBF, 0xDC, 0xFB, 0xE9);
  2012. typedef struct _DSCFXMicArray
  2013. {
  2014. BOOL fEnable;
  2015. BOOL fReset;
  2016. } DSCFXMicArray, *LPDSCFXMicArray;
  2017. typedef const DSCFXMicArray *LPCDSCFXMicArray;
  2018. #undef INTERFACE
  2019. #define INTERFACE IDirectSoundCaptureFXMicArray
  2020. DECLARE_INTERFACE_(IDirectSoundCaptureFXMicArray, IUnknown)
  2021. {
  2022. // IUnknown methods
  2023. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  2024. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2025. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2026. // IDirectSoundCaptureFXMicArray methods
  2027. STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXMicArray pcDscFxMicArray) PURE;
  2028. STDMETHOD(GetAllParameters) (THIS_ LPDSCFXMicArray pDscFxMicArray) PURE;
  2029. };
  2030. #define IDirectSoundCaptureFXMicArray_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2031. #define IDirectSoundCaptureFXMicArray_AddRef(p) IUnknown_AddRef(p)
  2032. #define IDirectSoundCaptureFXMicArray_Release(p) IUnknown_Release(p)
  2033. #if !defined(__cplusplus) || defined(CINTERFACE)
  2034. #define IDirectSoundCaptureFXMicArray_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a)
  2035. #define IDirectSoundCaptureFXMicArray_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
  2036. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2037. #define IDirectSoundCaptureFXMicArray_SetAllParameters(p,a) (p)->SetAllParameters(a)
  2038. #define IDirectSoundCaptureFXMicArray_GetAllParameters(p,a) (p)->GetAllParameters(a)
  2039. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2040. //
  2041. // IDirectSoundDMOProxy
  2042. //
  2043. DEFINE_GUID(IID_IDirectSoundDMOProxy,0xe782c03b,0x8187,0x4110,0xb6,0x53,0xd1,0x53,0xff,0x8f,0x42,0xc7);
  2044. #undef INTERFACE
  2045. #define INTERFACE IDirectSoundDMOProxy
  2046. DECLARE_INTERFACE_(IDirectSoundDMOProxy, IUnknown)
  2047. {
  2048. // IUnknown methods
  2049. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  2050. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2051. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2052. // IDirectSoundDMOProxy methods
  2053. STDMETHOD(AcquireResources) (THIS_ IKsPropertySet *pKsPropertySet) PURE;
  2054. STDMETHOD(ReleaseResources) (THIS) PURE;
  2055. STDMETHOD(InitializeNode) (THIS_ HANDLE hPin, ULONG ulNodeId) PURE;
  2056. };
  2057. #define IDirectSoundDMOProxy_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2058. #define IDirectSoundDMOProxy_AddRef(p) IUnknown_AddRef(p)
  2059. #define IDirectSoundDMOProxy_Release(p) IUnknown_Release(p)
  2060. #if !defined(__cplusplus) || defined(CINTERFACE)
  2061. #define IDirectSoundDMOProxy_AcquireResources(p,a) (p)->lpVtbl->AcquireResources(p,a)
  2062. #define IDirectSoundDMOProxy_ReleaseResources(p) (p)->lpVtbl->ReleaseResources(p)
  2063. #define IDirectSoundDMOProxy_InitializeNode(p,a,b) (p)->lpVtbl->InitializeNode(p,a,b)
  2064. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2065. #define IDirectSoundDMOProxy_AcquireResources(p,a) (p)->AcquireResources(a)
  2066. #define IDirectSoundDMOProxy_ReleaseResources(p) (p)->ReleaseResources()
  2067. #define IDirectSoundDMOProxy_InitializeNode(p,a,b) (p)->InitializeNode(a,b)
  2068. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2069. //@@END_MSINTERNAL
  2070. //
  2071. // IDirectSoundFullDuplex
  2072. //
  2073. #ifndef _IDirectSoundFullDuplex_
  2074. #define _IDirectSoundFullDuplex_
  2075. #ifdef __cplusplus
  2076. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  2077. struct IDirectSoundFullDuplex;
  2078. #endif // __cplusplus
  2079. typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
  2080. DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xedcb4c7a, 0xdaab, 0x4216, 0xa4, 0x2e, 0x6c, 0x50, 0x59, 0x6d, 0xdc, 0x1d);
  2081. #undef INTERFACE
  2082. #define INTERFACE IDirectSoundFullDuplex
  2083. DECLARE_INTERFACE_(IDirectSoundFullDuplex, IUnknown)
  2084. {
  2085. // IUnknown methods
  2086. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  2087. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2088. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2089. // IDirectSoundFullDuplex methods
  2090. STDMETHOD(Initialize) (THIS_ LPCGUID pCaptureGuid, LPCGUID pRenderGuid, LPCDSCBUFFERDESC lpDscBufferDesc, LPCDSBUFFERDESC lpDsBufferDesc, HWND hWnd, DWORD dwLevel, LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
  2091. };
  2092. #define IDirectSoundFullDuplex_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2093. #define IDirectSoundFullDuplex_AddRef(p) IUnknown_AddRef(p)
  2094. #define IDirectSoundFullDuplex_Release(p) IUnknown_Release(p)
  2095. #if !defined(__cplusplus) || defined(CINTERFACE)
  2096. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
  2097. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2098. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
  2099. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2100. #endif // _IDirectSoundFullDuplex_
  2101. #endif // DIRECTSOUND_VERSION >= 0x0800
  2102. //
  2103. // Return Codes
  2104. //
  2105. // The function completed successfully
  2106. #define DS_OK S_OK
  2107. //@@BEGIN_MSINTERNAL
  2108. #define DS_OK_EXPLANATION TEXT("The function completed successfully")
  2109. //@@END_MSINTERNAL
  2110. // The call succeeded, but we had to substitute the 3D algorithm
  2111. #define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
  2112. //@@BEGIN_MSINTERNAL
  2113. #define DS_NO_VIRTUALIZATION_EXPLANATION TEXT("The function succeeded, substituting the Pan3D algorithm")
  2114. //@@END_MSINTERNAL
  2115. // The call succeeded, but not all of the optional effects were obtained.
  2116. #define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20)
  2117. //@@BEGIN_MSINTERNAL
  2118. #define DS_INCOMPLETE_EXPLANATION TEXT("The function succeeded, but not all of the optional effects requested could be obtained")
  2119. //@@END_MSINTERNAL
  2120. // The call failed because resources (such as a priority level)
  2121. // were already being used by another caller
  2122. #define DSERR_ALLOCATED MAKE_DSHRESULT(10)
  2123. //@@BEGIN_MSINTERNAL
  2124. #define DSERR_ALLOCATED_EXPLANATION TEXT("The call failed because resources (such as a priority level) were already being used by another caller")
  2125. //@@END_MSINTERNAL
  2126. //@@BEGIN_MSINTERNAL
  2127. // An attempt was made to lock the area between the play and write cursors
  2128. #define DSERR_CANTLOCKPLAYCURSOR MAKE_DSHRESULT(20)
  2129. //@@END_MSINTERNAL
  2130. //@@BEGIN_MSINTERNAL
  2131. #define DSERR_CANTLOCKPLAYCURSOR_EXPLANATION TEXT("An attempt was made to lock the area between the play and write cursors")
  2132. //@@END_MSINTERNAL
  2133. // The control (vol, pan, etc.) requested by the caller is not available
  2134. #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
  2135. //@@BEGIN_MSINTERNAL
  2136. #define DSERR_CONTROLUNAVAIL_EXPLANATION TEXT("The control (vol, pan, etc.) requested by the caller is not available")
  2137. //@@END_MSINTERNAL
  2138. // An invalid parameter was passed to the returning function
  2139. #define DSERR_INVALIDPARAM E_INVALIDARG
  2140. //@@BEGIN_MSINTERNAL
  2141. #define DSERR_INVALIDPARAM_EXPLANATION TEXT("An invalid parameter was passed to the returning function")
  2142. //@@END_MSINTERNAL
  2143. // This call is not valid for the current state of this object
  2144. #define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
  2145. //@@BEGIN_MSINTERNAL
  2146. #define DSERR_INVALIDCALL_EXPLANATION TEXT("This call is not valid for the current state of this object")
  2147. //@@END_MSINTERNAL
  2148. // An undetermined error occurred inside the DirectSound subsystem
  2149. #define DSERR_GENERIC E_FAIL
  2150. //@@BEGIN_MSINTERNAL
  2151. #define DSERR_GENERIC_EXPLANATION TEXT("An undetermined error occurred inside the DirectSound subsystem")
  2152. //@@END_MSINTERNAL
  2153. // The caller does not have the priority level required for the function to
  2154. // succeed
  2155. #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
  2156. //@@BEGIN_MSINTERNAL
  2157. #define DSERR_PRIOLEVELNEEDED_EXPLANATION TEXT("The caller does not have the priority level required for the function to succeed")
  2158. //@@END_MSINTERNAL
  2159. // Not enough free memory is available to complete the operation
  2160. #define DSERR_OUTOFMEMORY E_OUTOFMEMORY
  2161. //@@BEGIN_MSINTERNAL
  2162. #define DSERR_OUTOFMEMORY_EXPLANATION TEXT("Not enough free memory is available to complete the operation")
  2163. //@@END_MSINTERNAL
  2164. // The specified WAVE format is not supported
  2165. #define DSERR_BADFORMAT MAKE_DSHRESULT(100)
  2166. //@@BEGIN_MSINTERNAL
  2167. #define DSERR_BADFORMAT_EXPLANATION TEXT("The specified WAVE format is not supported")
  2168. //@@END_MSINTERNAL
  2169. // The function called is not supported at this time
  2170. #define DSERR_UNSUPPORTED E_NOTIMPL
  2171. //@@BEGIN_MSINTERNAL
  2172. #define DSERR_UNSUPPORTED_EXPLANATION TEXT("The function called is not supported at this time")
  2173. //@@END_MSINTERNAL
  2174. // No sound driver is available for use
  2175. #define DSERR_NODRIVER MAKE_DSHRESULT(120)
  2176. //@@BEGIN_MSINTERNAL
  2177. #define DSERR_NODRIVER_EXPLANATION TEXT("No sound device is available for use, or the given device ID isn't valid")
  2178. //@@END_MSINTERNAL
  2179. // This object is already initialized
  2180. #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
  2181. //@@BEGIN_MSINTERNAL
  2182. #define DSERR_ALREADYINITIALIZED_EXPLANATION TEXT("This object is already initialized")
  2183. //@@END_MSINTERNAL
  2184. // This object does not support aggregation
  2185. #define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
  2186. //@@BEGIN_MSINTERNAL
  2187. #define DSERR_NOAGGREGATION_EXPLANATION TEXT("This object does not support aggregation")
  2188. //@@END_MSINTERNAL
  2189. // The buffer memory has been lost, and must be restored
  2190. #define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
  2191. //@@BEGIN_MSINTERNAL
  2192. #define DSERR_BUFFERLOST_EXPLANATION TEXT("The buffer memory has been lost, and must be restored")
  2193. //@@END_MSINTERNAL
  2194. // Another app has a higher priority level, preventing this call from
  2195. // succeeding
  2196. #define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
  2197. //@@BEGIN_MSINTERNAL
  2198. #define DSERR_OTHERAPPHASPRIO_EXPLANATION TEXT("Another app has a higher priority level, preventing this call from succeeding")
  2199. //@@END_MSINTERNAL
  2200. // This object has not been initialized
  2201. #define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
  2202. //@@BEGIN_MSINTERNAL
  2203. #define DSERR_UNINITIALIZED_EXPLANATION TEXT("This object has not been initialized")
  2204. //@@END_MSINTERNAL
  2205. // The requested COM interface is not available
  2206. #define DSERR_NOINTERFACE E_NOINTERFACE
  2207. //@@BEGIN_MSINTERNAL
  2208. #define DSERR_NOINTERFACE_EXPLANATION TEXT("The requested COM interface is not available")
  2209. //@@END_MSINTERNAL
  2210. // Access is denied
  2211. #define DSERR_ACCESSDENIED E_ACCESSDENIED
  2212. //@@BEGIN_MSINTERNAL
  2213. #define DSERR_ACCESSDENIED_EXPLANATION TEXT("Access is denied")
  2214. //@@END_MSINTERNAL
  2215. // Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds
  2216. #define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
  2217. //@@BEGIN_MSINTERNAL
  2218. #define DSERR_BUFFERTOOSMALL_EXPLANATION TEXT("Tried to create a CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds")
  2219. //@@END_MSINTERNAL
  2220. // Attempt to use DirectSound 8 functionality on an older DirectSound object
  2221. #define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
  2222. //@@BEGIN_MSINTERNAL
  2223. #define DSERR_DS8_REQUIRED_EXPLANATION TEXT("Attempt to use DirectSound 8 functionality on an older DirectSound object")
  2224. //@@END_MSINTERNAL
  2225. // A circular loop of send effects was detected
  2226. #define DSERR_SENDLOOP MAKE_DSHRESULT(200)
  2227. //@@BEGIN_MSINTERNAL
  2228. #define DSERR_SENDLOOP_EXPLANATION TEXT("A circular loop of send effects was detected")
  2229. //@@END_MSINTERNAL
  2230. // The GUID specified in an audiopath file does not match a valid MIXIN buffer
  2231. #define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
  2232. //@@BEGIN_MSINTERNAL
  2233. #define DSERR_BADSENDBUFFERGUID_EXPLANATION TEXT("The GUID specified does not match a valid MIXIN buffer")
  2234. //@@END_MSINTERNAL
  2235. // The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)
  2236. #define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
  2237. //@@BEGIN_MSINTERNAL
  2238. // Can't just be #defined to DMUS_E_NOTFOUND because we don't include the header
  2239. #define DSERR_OBJECTNOTFOUND_EXPLANATION TEXT("The object was not found")
  2240. //@@END_MSINTERNAL
  2241. // The effects requested could not be found on the system, or they were found
  2242. // but in the wrong order, or in the wrong hardware/software locations.
  2243. #define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
  2244. //@@BEGIN_MSINTERNAL
  2245. #define DSERR_FXUNAVAILABLE_EXPLANATION TEXT("The effects could not be found in the order and location requested")
  2246. //@@END_MSINTERNAL
  2247. //
  2248. // Flags
  2249. //
  2250. #define DSCAPS_PRIMARYMONO 0x00000001
  2251. #define DSCAPS_PRIMARYSTEREO 0x00000002
  2252. #define DSCAPS_PRIMARY8BIT 0x00000004
  2253. #define DSCAPS_PRIMARY16BIT 0x00000008
  2254. #define DSCAPS_CONTINUOUSRATE 0x00000010
  2255. #define DSCAPS_EMULDRIVER 0x00000020
  2256. #define DSCAPS_CERTIFIED 0x00000040
  2257. #define DSCAPS_SECONDARYMONO 0x00000100
  2258. #define DSCAPS_SECONDARYSTEREO 0x00000200
  2259. #define DSCAPS_SECONDARY8BIT 0x00000400
  2260. #define DSCAPS_SECONDARY16BIT 0x00000800
  2261. //@@BEGIN_MSINTERNAL
  2262. #define DSCAPS_PRIMARYFLAGS (DSCAPS_PRIMARYMONO | DSCAPS_PRIMARYSTEREO | DSCAPS_PRIMARY8BIT | DSCAPS_PRIMARY16BIT)
  2263. #define DSCAPS_SECONDARYFLAGS (DSCAPS_SECONDARYMONO | DSCAPS_SECONDARYSTEREO | DSCAPS_SECONDARY8BIT | DSCAPS_SECONDARY16BIT)
  2264. #define DSCAPS_VALIDDRIVERFLAGS (DSCAPS_PRIMARYFLAGS | DSCAPS_SECONDARYFLAGS | DSCAPS_CONTINUOUSRATE)
  2265. #define DSCAPS_VALIDFLAGS (DSCAPS_VALIDDRIVERFLAGS | DSCAPS_EMULDRIVER | DSCAPS_CERTIFIED)
  2266. #define DSCAPS_FILENAMECOOKIE 179 // Must be less than 256.
  2267. #define DSCAPS_FILENAMEMODVALUE 247 // Must be less that 256.
  2268. //@@END_MSINTERNAL
  2269. #define DSSCL_NORMAL 0x00000001
  2270. #define DSSCL_PRIORITY 0x00000002
  2271. #define DSSCL_EXCLUSIVE 0x00000003
  2272. #define DSSCL_WRITEPRIMARY 0x00000004
  2273. //@@BEGIN_MSINTERNAL
  2274. #define DSSCL_NONE 0x00000000
  2275. #define DSSCL_FIRST DSSCL_NORMAL
  2276. #define DSSCL_LAST DSSCL_WRITEPRIMARY
  2277. //@@END_MSINTERNAL
  2278. #define DSSPEAKER_DIRECTOUT 0x00000000
  2279. #define DSSPEAKER_HEADPHONE 0x00000001
  2280. #define DSSPEAKER_MONO 0x00000002
  2281. #define DSSPEAKER_QUAD 0x00000003
  2282. #define DSSPEAKER_STEREO 0x00000004
  2283. #define DSSPEAKER_SURROUND 0x00000005
  2284. #define DSSPEAKER_5POINT1 0x00000006
  2285. #define DSSPEAKER_7POINT1 0x00000007
  2286. //@@BEGIN_MSINTERNAL
  2287. #define DSSPEAKER_FIRST DSSPEAKER_DIRECTOUT
  2288. #define DSSPEAKER_LAST DSSPEAKER_7POINT1
  2289. #define DSSPEAKER_DEFAULT DSSPEAKER_STEREO
  2290. //@@END_MSINTERNAL
  2291. #define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees
  2292. #define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees
  2293. #define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees
  2294. #define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees
  2295. #define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
  2296. #define DSSPEAKER_CONFIG(a) ((BYTE)(a))
  2297. #define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
  2298. //@@BEGIN_MSINTERNAL
  2299. #define DSSPEAKER_CONFIG_MASK 0x000000FF
  2300. #define DSSPEAKER_GEOMETRY_MASK 0x00FF0000
  2301. //@@END_MSINTERNAL
  2302. //@@BEGIN_MSINTERNAL
  2303. #ifdef FUTURE_MULTIPAN_SUPPORT
  2304. #ifndef _SPEAKER_POSITIONS_
  2305. // Speaker positions for SetChannelVolume()
  2306. #define _SPEAKER_POSITIONS_
  2307. #define SPEAKER_FRONT_LEFT 0x1
  2308. #define SPEAKER_FRONT_RIGHT 0x2
  2309. #define SPEAKER_FRONT_CENTER 0x4
  2310. #define SPEAKER_LOW_FREQUENCY 0x8
  2311. #define SPEAKER_BACK_LEFT 0x10
  2312. #define SPEAKER_BACK_RIGHT 0x20
  2313. #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
  2314. #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
  2315. #define SPEAKER_BACK_CENTER 0x100
  2316. #define SPEAKER_SIDE_LEFT 0x200
  2317. #define SPEAKER_SIDE_RIGHT 0x400
  2318. #define SPEAKER_TOP_CENTER 0x800
  2319. #define SPEAKER_TOP_FRONT_LEFT 0x1000
  2320. #define SPEAKER_TOP_FRONT_CENTER 0x2000
  2321. #define SPEAKER_TOP_FRONT_RIGHT 0x4000
  2322. #define SPEAKER_TOP_BACK_LEFT 0x8000
  2323. #define SPEAKER_TOP_BACK_CENTER 0x10000
  2324. #define SPEAKER_TOP_BACK_RIGHT 0x20000
  2325. // Bit mask locations reserved for future use
  2326. #define SPEAKER_RESERVED 0x7FFC0000
  2327. // Not used in the DirectSound API
  2328. #define SPEAKER_ALL 0x80000000
  2329. #endif // _SPEAKER_POSITIONS_
  2330. #endif // FUTURE_MULTIPAN_SUPPORT
  2331. //@@END_MSINTERNAL
  2332. #define DSBCAPS_PRIMARYBUFFER 0x00000001
  2333. #define DSBCAPS_STATIC 0x00000002
  2334. #define DSBCAPS_LOCHARDWARE 0x00000004
  2335. #define DSBCAPS_LOCSOFTWARE 0x00000008
  2336. #define DSBCAPS_CTRL3D 0x00000010
  2337. #define DSBCAPS_CTRLFREQUENCY 0x00000020
  2338. #define DSBCAPS_CTRLPAN 0x00000040
  2339. #define DSBCAPS_CTRLVOLUME 0x00000080
  2340. #define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
  2341. #define DSBCAPS_CTRLFX 0x00000200
  2342. //@@BEGIN_MSINTERNAL
  2343. #ifdef FUTURE_MULTIPAN_SUPPORT
  2344. #define DSBCAPS_CTRLCHANNELVOLUME 0x00000400
  2345. #endif
  2346. #define DSBCAPS_MIXIN 0x00002000
  2347. //@@END_MSINTERNAL
  2348. #define DSBCAPS_STICKYFOCUS 0x00004000
  2349. #define DSBCAPS_GLOBALFOCUS 0x00008000
  2350. #define DSBCAPS_GETCURRENTPOSITION2 0x00010000
  2351. #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
  2352. #define DSBCAPS_LOCDEFER 0x00040000
  2353. //@@BEGIN_MSINTERNAL
  2354. #define DSBCAPS_SINKIN 0x00001000 // Means buffer will receive data from a DirectSound sink
  2355. #ifdef FUTURE_WAVE_SUPPORT
  2356. #define DSBCAPS_FROMWAVEOBJECT 0x00080000 // Means buffer was created with CreateSoundBufferFromWave()
  2357. #endif
  2358. #define DSBCAPS_DSBUFFERDESC1MASK 0x0003C1FF // Flags valid for pre-DX7 applications
  2359. #define DSBCAPS_DSBUFFERDESC7MASK (DSBCAPS_DSBUFFERDESC1MASK | DSBCAPS_LOCDEFER) // Flags valid for DX7 apps
  2360. #define DSBCAPS_VALIDFLAGS (DSBCAPS_DSBUFFERDESC7MASK | DSBCAPS_CTRLFX | DSBCAPS_MIXIN) //...DX8 apps
  2361. #define DSBCAPS_CTRLATTENUATION (DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLPAN)
  2362. #define DSBCAPS_CTRLNOVIRT (DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY)
  2363. #define DSBCAPS_LOCMASK (DSBCAPS_LOCHARDWARE | DSBCAPS_LOCSOFTWARE) // All valid location flags
  2364. #define DSBCAPS_FOCUSMASK (DSBCAPS_STICKYFOCUS | DSBCAPS_GLOBALFOCUS) // All valid focus flags
  2365. #define DSBCAPS_DRIVERFLAGSMASK (DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLPOSITIONNOTIFY | DSBCAPS_CTRLATTENUATION | \
  2366. DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY) // Flags of interest to a VxD driver
  2367. #define DSBCAPS_STREAMINGVALIDFLAGS (DSBCAPS_LOCMASK | DSBCAPS_FOCUSMASK | DSBCAPS_MIXIN | \
  2368. DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFX | \
  2369. DSBCAPS_CTRL3D | DSBCAPS_MUTE3DATMAXDISTANCE )
  2370. #define DSBCAPS_CHANVOLVALIDFLAGS (DSBCAPS_VALIDFLAGS & ~(DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLPAN | \
  2371. DSBCAPS_CTRL3D | DSBCAPS_MUTE3DATMAXDISTANCE))
  2372. #define DSBCAPS_FROMWAVEVALIDFLAGS (DSBCAPS_LOCMASK | DSBCAPS_LOCDEFER | DSBCAPS_FOCUSMASK | DSBCAPS_CTRLPAN | \
  2373. DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFX | DSBCAPS_CTRLFREQUENCY)
  2374. //@@END_MSINTERNAL
  2375. #define DSBPLAY_LOOPING 0x00000001
  2376. #define DSBPLAY_LOCHARDWARE 0x00000002
  2377. #define DSBPLAY_LOCSOFTWARE 0x00000004
  2378. #define DSBPLAY_TERMINATEBY_TIME 0x00000008
  2379. #define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
  2380. #define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
  2381. //@@BEGIN_MSINTERNAL
  2382. #define DSBPLAY_LOCMASK (DSBPLAY_LOCHARDWARE | DSBPLAY_LOCSOFTWARE) // All valid location flags
  2383. #define DSBPLAY_TERMINATEBY_MASK (DSBPLAY_TERMINATEBY_TIME | DSBPLAY_TERMINATEBY_DISTANCE | DSBPLAY_TERMINATEBY_PRIORITY)
  2384. #define DSBPLAY_LOCDEFERMASK (DSBPLAY_LOCMASK | DSBPLAY_TERMINATEBY_MASK)
  2385. #define DSBPLAY_VALIDFLAGS (DSBPLAY_LOCDEFERMASK | DSBPLAY_LOOPING)
  2386. //@@END_MSINTERNAL
  2387. #define DSBSTATUS_PLAYING 0x00000001
  2388. #define DSBSTATUS_BUFFERLOST 0x00000002
  2389. #define DSBSTATUS_LOOPING 0x00000004
  2390. #define DSBSTATUS_LOCHARDWARE 0x00000008
  2391. #define DSBSTATUS_LOCSOFTWARE 0x00000010
  2392. #define DSBSTATUS_TERMINATED 0x00000020
  2393. //@@BEGIN_MSINTERNAL
  2394. #define DSBSTATUS_ACTIVE 0x00000040
  2395. #define DSBSTATUS_RESOURCESACQUIRED 0x00000080
  2396. #define DSBSTATUS_STOPPEDBYFOCUS 0x00000100
  2397. #define DSBSTATUS_LOCMASK (DSBSTATUS_LOCHARDWARE | DSBSTATUS_LOCSOFTWARE)
  2398. #define DSBSTATUS_LOCDEFERMASK (DSBSTATUS_LOCMASK | DSBSTATUS_TERMINATED)
  2399. #define DSBSTATUS_USERMASK (DSBSTATUS_LOCDEFERMASK | DSBSTATUS_PLAYING | DSBSTATUS_BUFFERLOST | DSBSTATUS_LOOPING)
  2400. //@@END_MSINTERNAL
  2401. #define DSBLOCK_FROMWRITECURSOR 0x00000001
  2402. #define DSBLOCK_ENTIREBUFFER 0x00000002
  2403. //@@BEGIN_MSINTERNAL
  2404. #define DSBLOCK_VALIDFLAGS (DSBLOCK_FROMWRITECURSOR | DSBLOCK_ENTIREBUFFER)
  2405. //@@END_MSINTERNAL
  2406. #define DSBFREQUENCY_MIN 100
  2407. #define DSBFREQUENCY_MAX 100000
  2408. #define DSBFREQUENCY_ORIGINAL 0
  2409. #define DSBPAN_LEFT -10000
  2410. #define DSBPAN_CENTER 0
  2411. #define DSBPAN_RIGHT 10000
  2412. #define DSBVOLUME_MIN -10000
  2413. #define DSBVOLUME_MAX 0
  2414. #define DSBSIZE_MIN 4
  2415. #define DSBSIZE_MAX 0x0FFFFFFF
  2416. #define DSBSIZE_FX_MIN 150 // NOTE: Milliseconds, not bytes
  2417. #define DS3DMODE_NORMAL 0x00000000
  2418. #define DS3DMODE_HEADRELATIVE 0x00000001
  2419. #define DS3DMODE_DISABLE 0x00000002
  2420. //@@BEGIN_MSINTERNAL
  2421. #define DS3DMODE_FIRST DS3DMODE_NORMAL
  2422. #define DS3DMODE_LAST DS3DMODE_DISABLE
  2423. //@@END_MSINTERNAL
  2424. #define DS3D_IMMEDIATE 0x00000000
  2425. #define DS3D_DEFERRED 0x00000001
  2426. //@@BEGIN_MSINTERNAL
  2427. #define DS3D_VALIDFLAGS 0x00000001
  2428. //@@END_MSINTERNAL
  2429. #define DS3D_MINDISTANCEFACTOR FLT_MIN
  2430. #define DS3D_MAXDISTANCEFACTOR FLT_MAX
  2431. #define DS3D_DEFAULTDISTANCEFACTOR 1.0f
  2432. #define DS3D_MINROLLOFFFACTOR 0.0f
  2433. #define DS3D_MAXROLLOFFFACTOR 10.0f
  2434. #define DS3D_DEFAULTROLLOFFFACTOR 1.0f
  2435. #define DS3D_MINDOPPLERFACTOR 0.0f
  2436. #define DS3D_MAXDOPPLERFACTOR 10.0f
  2437. #define DS3D_DEFAULTDOPPLERFACTOR 1.0f
  2438. #define DS3D_DEFAULTMINDISTANCE 1.0f
  2439. #define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
  2440. #define DS3D_MINCONEANGLE 0
  2441. #define DS3D_MAXCONEANGLE 360
  2442. #define DS3D_DEFAULTCONEANGLE 360
  2443. #define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
  2444. // IDirectSoundCapture attributes
  2445. #define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
  2446. #define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
  2447. //@@BEGIN_MSINTERNAL
  2448. #if DIRECTSOUND_VERSION >= 0x0701
  2449. #define DSCCAPS_MULTIPLECAPTURE 0x00000001
  2450. #endif
  2451. //@@END_MSINTERNAL
  2452. // IDirectSoundCaptureBuffer attributes
  2453. #define DSCBCAPS_WAVEMAPPED 0x80000000
  2454. #if DIRECTSOUND_VERSION >= 0x0800
  2455. #define DSCBCAPS_CTRLFX 0x00000200
  2456. #endif
  2457. //@@BEGIN_MSINTERNAL
  2458. #define DSCBCAPS_LOCHARDWARE 0x00000004
  2459. #define DSCBCAPS_LOCSOFTWARE 0x00000008
  2460. #if DIRECTSOUND_VERSION >= 0x0701
  2461. #define DSCBCAPS_CTRLVOLUME 0x10000000
  2462. #define DSCBCAPS_FOCUSAWARE 0x20000000
  2463. #define DSCBCAPS_STRICTFOCUS 0x40000000
  2464. #endif
  2465. #define DSCBCAPS_VALIDFLAGS (DSCBCAPS_WAVEMAPPED | DSCBCAPS_STRICTFOCUS | DSCBCAPS_FOCUSAWARE | DSCBCAPS_CTRLVOLUME | DSCBCAPS_CTRLFX)
  2466. //@@END_MSINTERNAL
  2467. #define DSCBLOCK_ENTIREBUFFER 0x00000001
  2468. //@@BEGIN_MSINTERNAL
  2469. #define DSCBLOCK_VALIDFLAGS 0x00000001
  2470. //@@END_MSINTERNAL
  2471. #define DSCBSTATUS_CAPTURING 0x00000001
  2472. #define DSCBSTATUS_LOOPING 0x00000002
  2473. //@@BEGIN_MSINTERNAL
  2474. #if DIRECTSOUND_VERSION >= 0x0701
  2475. #define DSCBSTATUS_INFOCUS 0x00000004
  2476. #define DSCBSTATUS_LOSTFOCUS 0x00000008
  2477. #endif
  2478. #define DSCBSTATUS_STOPPING 0x80000000
  2479. #define DSCBSTATUS_STOPPED 0x40000000
  2480. #define DSCBSTATUS_USERMASK 0x0000FFFF
  2481. //@@END_MSINTERNAL
  2482. #define DSCBSTART_LOOPING 0x00000001
  2483. //@@BEGIN_MSINTERNAL
  2484. #define DSCBSTART_VALIDFLAGS DSCBSTART_LOOPING
  2485. //@@END_MSINTERNAL
  2486. #define DSBPN_OFFSETSTOP 0xFFFFFFFF
  2487. #define DS_CERTIFIED 0x00000000
  2488. #define DS_UNCERTIFIED 0x00000001
  2489. //@@BEGIN_MSINTERNAL
  2490. // Dsound system resource constants: these match the
  2491. // KSAUDIO_CPU_RESOURCES_xxx_HOST_CPU values in ksmedia.h
  2492. #define DS_SYSTEM_RESOURCES_NO_HOST_RESOURCES 0x00000000
  2493. #define DS_SYSTEM_RESOURCES_ALL_HOST_RESOURCES 0x7FFFFFFF
  2494. #define DS_SYSTEM_RESOURCES_UNDEFINED 0x80000000
  2495. #if 0
  2496. //
  2497. // Flags for the I3DL2 reverberation effect
  2498. //
  2499. enum
  2500. {
  2501. DSFX_I3DL2SOURCE_OCC_LPF,
  2502. DSFX_I3DL2SOURCE_OCC_VOLUME
  2503. };
  2504. #endif
  2505. //@@END_MSINTERNAL
  2506. //
  2507. // I3DL2 Material Presets
  2508. //
  2509. enum
  2510. {
  2511. DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW,
  2512. DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW,
  2513. DSFX_I3DL2_MATERIAL_PRESET_THINDOOR,
  2514. DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR,
  2515. DSFX_I3DL2_MATERIAL_PRESET_WOODWALL,
  2516. DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL,
  2517. DSFX_I3DL2_MATERIAL_PRESET_STONEWALL,
  2518. DSFX_I3DL2_MATERIAL_PRESET_CURTAIN
  2519. //@@BEGIN_MSINTERNAL
  2520. ,DSFX_I3DL2_MATERIAL_PRESET_MAX
  2521. //@@END_MSINTERNAL
  2522. };
  2523. #define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
  2524. #define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
  2525. #define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f
  2526. #define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f
  2527. #define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f
  2528. #define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f
  2529. #define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f
  2530. #define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f
  2531. enum
  2532. {
  2533. DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT,
  2534. DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC,
  2535. DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL,
  2536. DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM,
  2537. DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM,
  2538. DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM,
  2539. DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM,
  2540. DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM,
  2541. DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL,
  2542. DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE,
  2543. DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA,
  2544. DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR,
  2545. DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY,
  2546. DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY,
  2547. DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR,
  2548. DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY,
  2549. DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST,
  2550. DSFX_I3DL2_ENVIRONMENT_PRESET_CITY,
  2551. DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS,
  2552. DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY,
  2553. DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN,
  2554. DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT,
  2555. DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE,
  2556. DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER,
  2557. DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM,
  2558. DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM,
  2559. DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM,
  2560. DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL,
  2561. DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL,
  2562. DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE
  2563. //@@BEGIN_MSINTERNAL
  2564. ,DSFX_I3DL2_ENVIRONMENT_PRESET_MAX
  2565. //@@END_MSINTERNAL
  2566. };
  2567. //
  2568. // I3DL2 Reverberation Presets Values
  2569. //
  2570. #define I3DL2_ENVIRONMENT_PRESET_DEFAULT -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f
  2571. #define I3DL2_ENVIRONMENT_PRESET_GENERIC -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f
  2572. #define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL -1000,-6000, 0.0f, 0.17f, 0.10f, -1204, 0.001f, 207, 0.002f, 100.0f, 100.0f, 5000.0f
  2573. #define I3DL2_ENVIRONMENT_PRESET_ROOM -1000, -454, 0.0f, 0.40f, 0.83f, -1646, 0.002f, 53, 0.003f, 100.0f, 100.0f, 5000.0f
  2574. #define I3DL2_ENVIRONMENT_PRESET_BATHROOM -1000,-1200, 0.0f, 1.49f, 0.54f, -370, 0.007f, 1030, 0.011f, 100.0f, 60.0f, 5000.0f
  2575. #define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM -1000,-6000, 0.0f, 0.50f, 0.10f, -1376, 0.003f, -1104, 0.004f, 100.0f, 100.0f, 5000.0f
  2576. #define I3DL2_ENVIRONMENT_PRESET_STONEROOM -1000, -300, 0.0f, 2.31f, 0.64f, -711, 0.012f, 83, 0.017f, 100.0f, 100.0f, 5000.0f
  2577. #define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM -1000, -476, 0.0f, 4.32f, 0.59f, -789, 0.020f, -289, 0.030f, 100.0f, 100.0f, 5000.0f
  2578. #define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL -1000, -500, 0.0f, 3.92f, 0.70f, -1230, 0.020f, -2, 0.029f, 100.0f, 100.0f, 5000.0f
  2579. #define I3DL2_ENVIRONMENT_PRESET_CAVE -1000, 0, 0.0f, 2.91f, 1.30f, -602, 0.015f, -302, 0.022f, 100.0f, 100.0f, 5000.0f
  2580. #define I3DL2_ENVIRONMENT_PRESET_ARENA -1000, -698, 0.0f, 7.24f, 0.33f, -1166, 0.020f, 16, 0.030f, 100.0f, 100.0f, 5000.0f
  2581. #define I3DL2_ENVIRONMENT_PRESET_HANGAR -1000,-1000, 0.0f,10.05f, 0.23f, -602, 0.020f, 198, 0.030f, 100.0f, 100.0f, 5000.0f
  2582. #define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000, 0.0f, 0.30f, 0.10f, -1831, 0.002f, -1630, 0.030f, 100.0f, 100.0f, 5000.0f
  2583. #define I3DL2_ENVIRONMENT_PRESET_HALLWAY -1000, -300, 0.0f, 1.49f, 0.59f, -1219, 0.007f, 441, 0.011f, 100.0f, 100.0f, 5000.0f
  2584. #define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR -1000, -237, 0.0f, 2.70f, 0.79f, -1214, 0.013f, 395, 0.020f, 100.0f, 100.0f, 5000.0f
  2585. #define I3DL2_ENVIRONMENT_PRESET_ALLEY -1000, -270, 0.0f, 1.49f, 0.86f, -1204, 0.007f, -4, 0.011f, 100.0f, 100.0f, 5000.0f
  2586. #define I3DL2_ENVIRONMENT_PRESET_FOREST -1000,-3300, 0.0f, 1.49f, 0.54f, -2560, 0.162f, -613, 0.088f, 79.0f, 100.0f, 5000.0f
  2587. #define I3DL2_ENVIRONMENT_PRESET_CITY -1000, -800, 0.0f, 1.49f, 0.67f, -2273, 0.007f, -2217, 0.011f, 50.0f, 100.0f, 5000.0f
  2588. #define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS -1000,-2500, 0.0f, 1.49f, 0.21f, -2780, 0.300f, -2014, 0.100f, 27.0f, 100.0f, 5000.0f
  2589. #define I3DL2_ENVIRONMENT_PRESET_QUARRY -1000,-1000, 0.0f, 1.49f, 0.83f,-10000, 0.061f, 500, 0.025f, 100.0f, 100.0f, 5000.0f
  2590. #define I3DL2_ENVIRONMENT_PRESET_PLAIN -1000,-2000, 0.0f, 1.49f, 0.50f, -2466, 0.179f, -2514, 0.100f, 21.0f, 100.0f, 5000.0f
  2591. #define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT -1000, 0, 0.0f, 1.65f, 1.50f, -1363, 0.008f, -1153, 0.012f, 100.0f, 100.0f, 5000.0f
  2592. #define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE -1000,-1000, 0.0f, 2.81f, 0.14f, 429, 0.014f, 648, 0.021f, 80.0f, 60.0f, 5000.0f
  2593. #define I3DL2_ENVIRONMENT_PRESET_UNDERWATER -1000,-4000, 0.0f, 1.49f, 0.10f, -449, 0.007f, 1700, 0.011f, 100.0f, 100.0f, 5000.0f
  2594. //
  2595. // Examples simulating 'musical' reverb presets
  2596. //
  2597. // Name Decay time Description
  2598. // Small Room 1.1s A small size room with a length of 5m or so.
  2599. // Medium Room 1.3s A medium size room with a length of 10m or so.
  2600. // Large Room 1.5s A large size room suitable for live performances.
  2601. // Medium Hall 1.8s A medium size concert hall.
  2602. // Large Hall 1.8s A large size concert hall suitable for a full orchestra.
  2603. // Plate 1.3s A plate reverb simulation.
  2604. //
  2605. #define I3DL2_ENVIRONMENT_PRESET_SMALLROOM -1000, -600, 0.0f, 1.10f, 0.83f, -400, 0.005f, 500, 0.010f, 100.0f, 100.0f, 5000.0f
  2606. #define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM -1000, -600, 0.0f, 1.30f, 0.83f, -1000, 0.010f, -200, 0.020f, 100.0f, 100.0f, 5000.0f
  2607. #define I3DL2_ENVIRONMENT_PRESET_LARGEROOM -1000, -600, 0.0f, 1.50f, 0.83f, -1600, 0.020f, -1000, 0.040f, 100.0f, 100.0f, 5000.0f
  2608. #define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL -1000, -600, 0.0f, 1.80f, 0.70f, -1300, 0.015f, -800, 0.030f, 100.0f, 100.0f, 5000.0f
  2609. #define I3DL2_ENVIRONMENT_PRESET_LARGEHALL -1000, -600, 0.0f, 1.80f, 0.70f, -2000, 0.030f, -1400, 0.060f, 100.0f, 100.0f, 5000.0f
  2610. #define I3DL2_ENVIRONMENT_PRESET_PLATE -1000, -200, 0.0f, 1.30f, 0.90f, 0, 0.002f, 0, 0.010f, 100.0f, 75.0f, 5000.0f
  2611. //
  2612. // DirectSound3D Algorithms
  2613. //
  2614. // Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000}
  2615. #define DS3DALG_DEFAULT GUID_NULL
  2616. // No virtualization (Pan3D) {C241333F-1C1B-11d2-94F5-00C04FC28ACA}
  2617. DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2618. // High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA}
  2619. DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2620. // Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA}
  2621. DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2622. //@@BEGIN_MSINTERNAL
  2623. // Original DirectSound3D ITD algorithm {1B5C9566-5E20-11d2-91BD-00C04FC28ACA}
  2624. DEFINE_GUID(DS3DALG_ITD, 0x1b5c9566, 0x5e20, 0x11d2, 0x91, 0xbd, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2625. //@@END_MSINTERNAL
  2626. #if DIRECTSOUND_VERSION >= 0x0800
  2627. //
  2628. // DirectSound Internal Effect Algorithms
  2629. //
  2630. //@@BEGIN_MSINTERNAL
  2631. // Buffer Send {EF602176-BCBB-49E0-8CCA-E09A5A152B33}
  2632. DEFINE_GUID(GUID_DSFX_SEND, 0xef602176, 0xbcbb, 0x49e0, 0x8c, 0xca, 0xe0, 0x9a, 0x5a, 0x15, 0x2b, 0x33);
  2633. //@@END_MSINTERNAL
  2634. // Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF}
  2635. DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xdafd8210, 0x5711, 0x4b91, 0x9f, 0xe3, 0xf7, 0x5b, 0x7a, 0xe2, 0x79, 0xbf);
  2636. // Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6}
  2637. DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xefe6629c, 0x81f7, 0x4281, 0xbd, 0x91, 0xc9, 0xd6, 0x04, 0xa9, 0x5a, 0xf6);
  2638. // Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98}
  2639. DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xefca3d92, 0xdfd8, 0x4672, 0xa6, 0x03, 0x74, 0x20, 0x89, 0x4b, 0xad, 0x98);
  2640. // Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}
  2641. DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xef3e932c, 0xd40b, 0x4f51, 0x8c, 0xcf, 0x3f, 0x98, 0xf1, 0xb2, 0x9d, 0x5d);
  2642. // Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21}
  2643. DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xef114c90, 0xcd1d, 0x484e, 0x96, 0xe5, 0x09, 0xcf, 0xaf, 0x91, 0x2a, 0x21);
  2644. // Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57}
  2645. DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xef011f79, 0x4000, 0x406d, 0x87, 0xaf, 0xbf, 0xfb, 0x3f, 0xc3, 0x9d, 0x57);
  2646. // Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231}
  2647. DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120ced89, 0x3bf4, 0x4173, 0xa1, 0x32, 0x3c, 0xb4, 0x06, 0xcf, 0x32, 0x31);
  2648. //@@BEGIN_MSINTERNAL
  2649. // I3DL2 Environmental Reverberation: Source Effect {EFBA364A-E606-451C-8E97-07D508119C65}
  2650. ///DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2SOURCE, 0xefba364a, 0xe606, 0x451c, 0x8e, 0x97, 0x07, 0xd5, 0x08, 0x11, 0x9c, 0x65);
  2651. //@@END_MSINTERNAL
  2652. // I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}
  2653. DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xef985e71, 0xd5c7, 0x42d4, 0xba, 0x4d, 0x2d, 0x07, 0x3e, 0x2e, 0x96, 0xf4);
  2654. // Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C}
  2655. DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87fc0268, 0x9a55, 0x4360, 0x95, 0xaa, 0x00, 0x4a, 0x1d, 0x9d, 0xe2, 0x6c);
  2656. //
  2657. // DirectSound Capture Effect Algorithms
  2658. //
  2659. //@@BEGIN_MSINTERNAL
  2660. // Microphone Array Processor {830A44f2-A32D-476B-BE97-42845673B35A}
  2661. // Matches KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR in ksmedia.h
  2662. DEFINE_GUID(GUID_DSCFX_CLASS_MA, 0x830A44F2, 0xA32D, 0x476B, 0xBE, 0x97, 0x42, 0x84, 0x56, 0x73, 0xB3, 0x5A);
  2663. // Microsoft Microphone Array Processor {F4A49496-1481-44d7-9C4E-A0269CAF0597}
  2664. DEFINE_GUID(GUID_DSCFX_MS_MA, 0xF4A49496, 0x1481, 0x44d7, 0x9C, 0x4E, 0xA0, 0x26, 0x9C, 0xAF, 0x5, 0x97);
  2665. // System Microphone Array Processor {B6F5A0A0-9E61-4f8c-91E3-76CF0F3C471F}
  2666. DEFINE_GUID(GUID_DSCFX_SYSTEM_MA, 0xB6F5A0A0, 0x9E61, 0x4F8C, 0x91, 0xE3, 0x76, 0xCF, 0xF, 0x3C, 0x47, 0x1F );
  2667. // Automatic Gain Control {E88C9BA0-C557-11D0-8A2B-00A0C9255AC1}
  2668. // Matches KSNODETYPE_AGC in ksmedia.h
  2669. DEFINE_GUID(GUID_DSCFX_CLASS_AGC, 0xE88C9BA0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
  2670. // Microsoft Automatic Gain Control {5A86531E-8E2A-419f-B4CC-18EB8E891796}
  2671. DEFINE_GUID(GUID_DSCFX_MS_AGC, 0x5a86531e, 0x8e2a, 0x419f, 0xb4, 0xcc, 0x18, 0xeb, 0x8e, 0x89, 0x17, 0x96);
  2672. // System Automatic Gain Control {950E55B9-877C-4c67-BE08-E47B5611130A}
  2673. DEFINE_GUID(GUID_DSCFX_SYSTEM_AGC, 0x950e55b9, 0x877c, 0x4c67, 0xbe, 0x8, 0xe4, 0x7b, 0x56, 0x11, 0x13, 0xa);
  2674. //@@END_MSINTERNAL
  2675. // Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1}
  2676. // Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h
  2677. DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
  2678. // Microsoft AEC {CDEBB919-379A-488a-8765-F53CFD36DE40}
  2679. DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xcdebb919, 0x379a, 0x488a, 0x87, 0x65, 0xf5, 0x3c, 0xfd, 0x36, 0xde, 0x40);
  2680. // System AEC {1C22C56D-9879-4f5b-A389-27996DDC2810}
  2681. DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1c22c56d, 0x9879, 0x4f5b, 0xa3, 0x89, 0x27, 0x99, 0x6d, 0xdc, 0x28, 0x10);
  2682. // Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5}
  2683. // Matches KSNODETYPE_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h
  2684. DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5);
  2685. // Microsoft Noise Suppresion {11C5C73B-66E9-4ba1-A0BA-E814C6EED92D}
  2686. DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11c5c73b, 0x66e9, 0x4ba1, 0xa0, 0xba, 0xe8, 0x14, 0xc6, 0xee, 0xd9, 0x2d);
  2687. // System Noise Suppresion {5AB0882E-7274-4516-877D-4EEE99BA4FD0}
  2688. DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e, 0xee, 0x99, 0xba, 0x4f, 0xd0);
  2689. #endif // DIRECTSOUND_VERSION >= 0x0800
  2690. #endif // __DSOUND_INCLUDED__
  2691. //@@BEGIN_MSINTERNAL
  2692. #ifndef __DSOUNDP_INCLUDED__
  2693. #define __DSOUNDP_INCLUDED__
  2694. #if DIRECTSOUND_VERSION >= 0x0800
  2695. //
  2696. // Private DirectSound interfaces used by DMusic, DPlayVoice, etc.
  2697. // Eventually much of the MSINTERNAL stuff above should migrate here.
  2698. //
  2699. #ifdef __cplusplus
  2700. struct IDirectSoundPrivate;
  2701. struct IDirectSoundSynthSink;
  2702. struct IDirectSoundConnect;
  2703. struct IDirectSoundSinkSync;
  2704. struct IDirectSoundSource;
  2705. struct IDirectSoundWave;
  2706. #endif // __cplusplus
  2707. #define IDirectSoundPrivate8 IDirectSoundPrivate
  2708. #define IDirectSoundSynthSink8 IDirectSoundSynthSink
  2709. #define IDirectSoundConnect8 IDirectSoundConnect
  2710. #define IDirectSoundSinkSync8 IDirectSoundSinkSync
  2711. #define IDirectSoundSource8 IDirectSoundSource
  2712. #define IDirectSoundWave8 IDirectSoundWave
  2713. #define IID_IDirectSoundPrivate8 IID_IDirectSoundPrivate
  2714. #define IID_IDirectSoundSynthSink8 IID_IDirectSoundSynthSink
  2715. #define IID_IDirectSoundConnect8 IID_IDirectSoundConnect
  2716. #define IID_IDirectSoundSinkSync8 IID_IDirectSoundSinkSync
  2717. #define IID_IDirectSoundSource8 IID_IDirectSoundSource
  2718. #define IID_IDirectSoundWave8 IID_IDirectSoundWave
  2719. typedef struct IDirectSoundPrivate *LPDIRECTSOUNDPRIVATE;
  2720. typedef struct IDirectSoundSynthSink *LPDIRECTSOUNDSYNTHSINK;
  2721. typedef struct IDirectSoundConnect *LPDIRECTSOUNDCONNECT;
  2722. typedef struct IDirectSoundSinkSync *LPDIRECTSOUNDSINKSYNC;
  2723. typedef struct IDirectSoundSource *LPDIRECTSOUNDSOURCE;
  2724. typedef struct IDirectSoundWave *LPDIRECTSOUNDWAVE;
  2725. typedef struct IDirectSoundPrivate8 *LPDIRECTSOUNDPRIVATE8;
  2726. typedef struct IDirectSoundSynthSink8 *LPDIRECTSOUNDSYNTHSINK8;
  2727. typedef struct IDirectSoundConnect8 *LPDIRECTSOUNDCONNECT8;
  2728. typedef struct IDirectSoundSinkSync8 *LPDIRECTSOUNDSINKSYNC8;
  2729. typedef struct IDirectSoundSource8 *LPDIRECTSOUNDSOURCE8;
  2730. typedef struct IDirectSoundWave8 *LPDIRECTSOUNDWAVE8;
  2731. //
  2732. // IDirectSoundPrivate: used by DirectMusic to create DirectSoundSink objects
  2733. //
  2734. DEFINE_GUID(IID_IDirectSoundPrivate, 0xd6e525ae, 0xb125, 0x4ec4, 0xbe, 0x13, 0x12, 0x6d, 0x0c, 0xf7, 0xaf, 0xb6);
  2735. #undef INTERFACE
  2736. #define INTERFACE IDirectSoundPrivate
  2737. DECLARE_INTERFACE_(IDirectSoundPrivate, IUnknown)
  2738. {
  2739. // IUnknown methods
  2740. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  2741. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2742. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2743. // IDirectSoundPrivate methods
  2744. STDMETHOD(AllocSink) (THIS_ LPWAVEFORMATEX pwfxFormat, LPDIRECTSOUNDCONNECT *ppSinkConnect) PURE;
  2745. };
  2746. #define IDirectSoundPrivate_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2747. #define IDirectSoundPrivate_AddRef(p) IUnknown_AddRef(p)
  2748. #define IDirectSoundPrivate_Release(p) IUnknown_Release(p)
  2749. #if !defined(__cplusplus) || defined(CINTERFACE)
  2750. #define IDirectSoundPrivate_AllocSink(p,a,b) (p)->lpVtbl->AllocSink(p,a,b)
  2751. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2752. #define IDirectSoundPrivate_AllocSink(p,a,b) (p)->AllocSink(a,b)
  2753. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2754. //
  2755. // IDirectSoundSynthSink: used by the DirectMusic synthesiser
  2756. //
  2757. DEFINE_GUID(IID_IDirectSoundSynthSink, 0x73a6a85a, 0x493e, 0x4c87, 0xb4, 0xa5, 0xbe, 0x53, 0xeb, 0x92, 0x74, 0x4b);
  2758. #undef INTERFACE
  2759. #define INTERFACE IDirectSoundSynthSink
  2760. DECLARE_INTERFACE_(IDirectSoundSynthSink, IUnknown)
  2761. {
  2762. // IUnknown methods
  2763. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  2764. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2765. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2766. // IDirectSoundSynthSink methods
  2767. STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE;
  2768. STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE;
  2769. STDMETHOD(SampleToRefTime) (THIS_ LONGLONG llSampleTime, REFERENCE_TIME *prtTime) PURE;
  2770. STDMETHOD(RefToSampleTime) (THIS_ REFERENCE_TIME rtTime, LONGLONG *pllSampleTime) PURE;
  2771. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  2772. };
  2773. #define IDirectSoundSynthSink_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2774. #define IDirectSoundSynthSink_AddRef(p) IUnknown_AddRef(p)
  2775. #define IDirectSoundSynthSink_Release(p) IUnknown_Release(p)
  2776. #if !defined(__cplusplus) || defined(CINTERFACE)
  2777. #define IDirectSoundSynthSink_GetLatencyClock(p,a) (p)->lpVtbl->GetLatencyClock(p,a)
  2778. #define IDirectSoundSynthSink_Activate(p,a) (p)->lpVtbl->Activate(p,a)
  2779. #define IDirectSoundSynthSink_SampleToRefTime(p,a,b) (p)->lpVtbl->SampleToRefTime(p,a,b)
  2780. #define IDirectSoundSynthSink_RefToSampleTime(p,a,b) (p)->lpVtbl->RefToSampleTime(p,a,b)
  2781. #define IDirectSoundSynthSink_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
  2782. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2783. #define IDirectSoundSynthSink_GetLatencyClock(p,a) (p)->GetLatencyClock(a)
  2784. #define IDirectSoundSynthSink_Activate(p,a) (p)->Activate(a)
  2785. #define IDirectSoundSynthSink_SampleToRefTime(p,a,b) (p)->SampleToRefTime(a,b)
  2786. #define IDirectSoundSynthSink_RefToSampleTime(p,a,b) (p)->RefToSampleTime(a,b)
  2787. #define IDirectSoundSynthSink_GetFormat(p,a,b) (p)->GetFormat(a,b)
  2788. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2789. //
  2790. // IDirectSoundConnect: used by DirectMusic to implement
  2791. // audio paths and connect the synthesiser to the sink
  2792. //
  2793. DEFINE_GUID(IID_IDirectSoundConnect, 0x5bee1fe0, 0x60d5, 0x4ef9, 0x88, 0xbc, 0x33, 0x67, 0xb9, 0x75, 0xc6, 0x11);
  2794. #undef INTERFACE
  2795. #define INTERFACE IDirectSoundConnect
  2796. DECLARE_INTERFACE_(IDirectSoundConnect, IUnknown)
  2797. {
  2798. // IUnknown methods
  2799. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  2800. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2801. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2802. // IDirectSoundConnect methods
  2803. STDMETHOD(AddSource) (THIS_ LPDIRECTSOUNDSOURCE pDSSource) PURE;
  2804. STDMETHOD(RemoveSource) (THIS_ LPDIRECTSOUNDSOURCE pDSSource) PURE;
  2805. STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE;
  2806. STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDWORD pdwFuncID, DWORD dwBusIDCount,
  2807. REFGUID guidBufferID, LPDIRECTSOUNDBUFFER *ppDSBuffer) PURE;
  2808. STDMETHOD(CreateSoundBufferFromConfig) (THIS_ LPUNKNOWN pConfig, LPDIRECTSOUNDBUFFER *ppDSBuffer) PURE;
  2809. STDMETHOD(GetSoundBuffer) (THIS_ DWORD dwBusID, LPDIRECTSOUNDBUFFER *ppDSBuffer) PURE;
  2810. STDMETHOD(GetBusCount) (THIS_ LPDWORD pdwCount) PURE;
  2811. STDMETHOD(GetBusIDs) (THIS_ LPDWORD pdwBusIDs, LPDWORD pdwFuncIDs, DWORD dwBusCount) PURE;
  2812. STDMETHOD(GetFunctionalID) (THIS_ DWORD dwBusID, LPDWORD pdwFuncID) PURE;
  2813. STDMETHOD(GetSoundBufferBusIDs) (THIS_ LPDIRECTSOUNDBUFFER pDSBuffer, LPDWORD pdwBusIDs, LPDWORD pdwFuncIDs, LPDWORD pdwBusCount) PURE;
  2814. };
  2815. #define IDirectSoundConnect_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2816. #define IDirectSoundConnect_AddRef(p) IUnknown_AddRef(p)
  2817. #define IDirectSoundConnect_Release(p) IUnknown_Release(p)
  2818. #if !defined(__cplusplus) || defined(CINTERFACE)
  2819. #define IDirectSoundConnect_AddSource(p,a) (p)->lpVtbl->AddSource(p,a)
  2820. #define IDirectSoundConnect_RemoveSource(p,a) (p)->lpVtbl->RemoveSource(p,a)
  2821. #define IDirectSoundConnect_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a)
  2822. #define IDirectSoundConnect_CreateSoundBuffer(p,a,b,c,d) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c,d)
  2823. #define IDirectSoundConnect_CreateSoundBufferFromConfig(p,a,b) (p)->lpVtbl->CreateSoundBufferFromConfig(p,a,b)
  2824. #define IDirectSoundConnect_GetSoundBuffer(p,a,b) (p)->lpVtbl->GetSoundBuffer(p,a,b)
  2825. #define IDirectSoundConnect_GetBusCount(p,a) (p)->lpVtbl->GetBusCount(p,a)
  2826. #define IDirectSoundConnect_GetBusIDs(p,a,b,c) (p)->lpVtbl->GetBusIDs(p,a,b,c)
  2827. #define IDirectSoundConnect_GetFunctionalID(p,a,b) (p)->lpVtbl->GetFunctionalID(p,a,b)
  2828. #define IDirectSoundConnect_GetSoundBufferBusIDs(p,a,b,c,d) (p)->lpVtbl->GetSoundBufferBusIDs(p,a,b,c,d)
  2829. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2830. #define IDirectSoundConnect_AddSource(p,a) (p)->AddSource(a)
  2831. #define IDirectSoundConnect_RemoveSource(p,a) (p)->RemoveSource(a)
  2832. #define IDirectSoundConnect_SetMasterClock(p,a) (p)->SetMasterClock(a)
  2833. #define IDirectSoundConnect_CreateSoundBuffer(p,a,b,c,d) (p)->CreateSoundBuffer(a,b,c,d)
  2834. #define IDirectSoundConnect_CreateSoundBufferFromConfig(p,a,b) (p)->CreateSoundBufferFromConfig(a,b)
  2835. #define IDirectSoundConnect_GetSoundBuffer(p,a,b) (p)->GetSoundBuffer(a,b)
  2836. #define IDirectSoundConnect_GetBusCount(p,a) (p)->GetBusCount(a)
  2837. #define IDirectSoundConnect_GetBusIDs(p,a,b,c) (p)->GetBusIDs(a,b,c)
  2838. #define IDirectSoundConnect_GetFunctionalID(p,a,b) (p)->GetFunctionalID(a,b)
  2839. #define IDirectSoundConnect_GetSoundBufferBusIDs(p,a,b,c,d) (p)->GetSoundBufferBusIDs(a,b,c,d)
  2840. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2841. //
  2842. // IDirectSoundSinkSync: provided by the DirectMusic master clock
  2843. // to allow DirectSound to synchronize with it
  2844. //
  2845. DEFINE_GUID(IID_IDirectSoundSinkSync, 0xd28de0d0, 0x2794, 0x492f, 0xa3, 0xff, 0xe2, 0x41, 0x80, 0xd5, 0x43, 0x79);
  2846. #undef INTERFACE
  2847. #define INTERFACE IDirectSoundSinkSync
  2848. DECLARE_INTERFACE_(IDirectSoundSinkSync, IUnknown)
  2849. {
  2850. // IUnknown methods
  2851. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
  2852. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2853. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2854. // IDirectSoundSinkSync methods
  2855. STDMETHOD(SetClockOffset) (THIS_ LONGLONG llOffset) PURE;
  2856. };
  2857. #define IDirectSoundSinkSync_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2858. #define IDirectSoundSinkSync_AddRef(p) IUnknown_AddRef(p)
  2859. #define IDirectSoundSinkSync_Release(p) IUnknown_Release(p)
  2860. #if !defined(__cplusplus) || defined(CINTERFACE)
  2861. #define IDirectSoundSinkSync_SetClockOffset(p,a) (p)->lpVtbl->SetClockOffset(p,a)
  2862. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2863. #define IDirectSoundSinkSync_SetClockOffset(p,a) (p)->SetClockOffset(a)
  2864. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2865. //
  2866. // IDirectSoundSource (currently private)
  2867. //
  2868. DEFINE_GUID(IID_IDirectSoundSource, 0x536f7af3, 0xdb03, 0x4888, 0x93, 0x66, 0x54, 0x48, 0xb1, 0x1d, 0x4a, 0x19);
  2869. #undef INTERFACE
  2870. #define INTERFACE IDirectSoundSource
  2871. DECLARE_INTERFACE_(IDirectSoundSource, IUnknown)
  2872. {
  2873. // IUnknown methods
  2874. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  2875. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2876. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2877. // IDirectSoundSource methods
  2878. STDMETHOD(SetSink) (THIS_ LPDIRECTSOUNDCONNECT pSinkConnect) PURE;
  2879. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  2880. STDMETHOD(Seek) (THIS_ ULONGLONG ullPosition) PURE;
  2881. STDMETHOD(Read) (THIS_ LPVOID *ppvBusBuffers, LPDWORD pdwIDs, LPDWORD pdwFuncIDs, LPLONG plPitchAdjust, DWORD dwBufferCount, ULONGLONG *ullLength) PURE;
  2882. STDMETHOD(GetSize) (THIS_ ULONGLONG *pullStreamSize) PURE;
  2883. };
  2884. #define IDirectSoundSource_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2885. #define IDirectSoundSource_AddRef(p) IUnknown_AddRef(p)
  2886. #define IDirectSoundSource_Release(p) IUnknown_Release(p)
  2887. #if !defined(__cplusplus) || defined(CINTERFACE)
  2888. #define IDirectSoundSource_SetSink(p,a) (p)->lpVtbl->SetSink(p,a)
  2889. #define IDirectSoundSource_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
  2890. #define IDirectSoundSource_Seek(p,a) (p)->lpVtbl->Seek(p,a)
  2891. #define IDirectSoundSource_Read(p,a,b,c,d,e) (p)->lpVtbl->Read(p,a,b,c,d,e)
  2892. #define IDirectSoundSource_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
  2893. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2894. #define IDirectSoundSource_SetSink(p,a) (p)->SetSink(a)
  2895. #define IDirectSoundSource_GetFormat(p,a,b) (p)->GetFormat(a,b)
  2896. #define IDirectSoundSource_Seek(p,a) (p)->Seek(a)
  2897. #define IDirectSoundSource_Read(p,a,b,c,d,e) (p)->Read(a,b,c,d,e)
  2898. #define IDirectSoundSource_GetSize(p,a) (p)->GetSize(a)
  2899. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2900. //
  2901. // IDirectSoundWave (currently private)
  2902. //
  2903. DEFINE_GUID(IID_IDirectSoundWave, 0x69e934e4, 0x97f1, 0x4f1d, 0x88, 0xe8, 0xf2, 0xac, 0x88, 0x67, 0x13, 0x27);
  2904. #define DSWCS_F_DEINTERLEAVED 0x00000001
  2905. #define DSWCS_F_TOGGLE_8BIT 0x00000002
  2906. #undef INTERFACE
  2907. #define INTERFACE IDirectSoundWave
  2908. DECLARE_INTERFACE_(IDirectSoundWave, IUnknown)
  2909. {
  2910. // IUnknown methods
  2911. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
  2912. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2913. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2914. // IDirectSoundWave methods
  2915. STDMETHOD(CreateSource) (THIS_ LPDIRECTSOUNDSOURCE *ppDSSource, LPWAVEFORMATEX pwfxFormat, DWORD dwFlags) PURE;
  2916. STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  2917. STDMETHOD(GetStreamingParms) (THIS_ LPDWORD pdwFlags, REFERENCE_TIME *prtReadAhead) PURE;
  2918. };
  2919. #define IDirectSoundWave_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
  2920. #define IDirectSoundWave_AddRef(p) IUnknown_AddRef(p)
  2921. #define IDirectSoundWave_Release(p) IUnknown_Release(p)
  2922. #if !defined(__cplusplus) || defined(CINTERFACE)
  2923. #define IDirectSoundWave_CreateSource(p,a,b,c) (p)->lpVtbl->CreateSource(p,a,b,c)
  2924. #define IDirectSoundWave_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
  2925. #define IDirectSoundWave_GetStreamingParms(p,a,b) (p)->lpVtbl->GetStreamingParms(p,a,b)
  2926. #else // !defined(__cplusplus) || defined(CINTERFACE)
  2927. #define IDirectSoundWave_CreateSource(p,a,b,c) (p)->CreateSource(a,b,c)
  2928. #define IDirectSoundWave_GetFormat(p,a,b) (p)->GetFormat(a,b)
  2929. #define IDirectSoundWave_GetStreamingParms(p,a,b) (p)->GetStreamingParms(a,b)
  2930. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  2931. #endif // DIRECTSOUND_VERSION >= 0x0800
  2932. #endif // __DSOUNDP_INCLUDED__
  2933. //@@END_MSINTERNAL
  2934. #ifdef __cplusplus
  2935. };
  2936. #endif // __cplusplus