home *** CD-ROM | disk | FTP | other *** search
/ Beginning Direct3D Game Programming / Direct3D.iso / directx / dxf / include / dsound.h < prev    next >
C/C++ Source or Header  |  2000-10-20  |  110KB  |  2,346 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1995-2000 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dsound.h
  6.  *  Content:    DirectSound include file
  7.  *
  8.  **************************************************************************/
  9.  
  10. #define COM_NO_WINDOWS_H
  11. #include <objbase.h>
  12. #include <float.h>
  13.  
  14. #ifndef DIRECTSOUND_VERSION
  15. #define DIRECTSOUND_VERSION 0x0800  /* Version 8.0 */
  16. #endif
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif // __cplusplus
  21.  
  22. #ifndef __DSOUND_INCLUDED__
  23. #define __DSOUND_INCLUDED__
  24.  
  25. /* Type definitions shared with Direct3D */
  26.  
  27. #ifndef DX_SHARED_DEFINES
  28.  
  29. typedef float D3DVALUE, *LPD3DVALUE;
  30.  
  31. #ifndef D3DCOLOR_DEFINED
  32. typedef DWORD D3DCOLOR;
  33. #define D3DCOLOR_DEFINED
  34. #endif
  35.  
  36. #ifndef LPD3DCOLOR_DEFINED
  37. typedef DWORD *LPD3DCOLOR;
  38. #define LPD3DCOLOR_DEFINED
  39. #endif
  40.  
  41. #ifndef D3DVECTOR_DEFINED
  42. typedef struct _D3DVECTOR {
  43.     float x;
  44.     float y;
  45.     float z;
  46. } D3DVECTOR;
  47. #define D3DVECTOR_DEFINED
  48. #endif
  49.  
  50. #ifndef LPD3DVECTOR_DEFINED
  51. typedef D3DVECTOR *LPD3DVECTOR;
  52. #define LPD3DVECTOR_DEFINED
  53. #endif
  54.  
  55. #define DX_SHARED_DEFINES
  56. #endif // DX_SHARED_DEFINES
  57.  
  58. #define _FACDS  0x878   /* DirectSound's facility code */
  59. #define MAKE_DSHRESULT(code)  MAKE_HRESULT(1, _FACDS, code)
  60.  
  61. // DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000}
  62. DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
  63.  
  64. // DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
  65. DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
  66.  
  67. // DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16}
  68. DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  69.  
  70. // DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
  71. DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
  72.  
  73. // DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D}
  74. DEFINE_GUID(CLSID_DirectSoundFullDuplex, 0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
  75.  
  76.  
  77. // DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03}
  78. DEFINE_GUID(DSDEVID_DefaultPlayback, 0xdef00000, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  79.  
  80. // DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03}
  81. DEFINE_GUID(DSDEVID_DefaultCapture, 0xdef00001, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  82.  
  83. // DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03}
  84. DEFINE_GUID(DSDEVID_DefaultVoicePlayback, 0xdef00002, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  85.  
  86. // DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03}
  87. DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xdef00003, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
  88.  
  89.  
  90. //
  91. // Forward declarations for interfaces.
  92. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  93. //
  94.  
  95. #ifdef __cplusplus
  96. struct IDirectSound;
  97. struct IDirectSoundBuffer;
  98. struct IDirectSound3DListener;
  99. struct IDirectSound3DBuffer;
  100. struct IDirectSoundCapture;
  101. struct IDirectSoundCaptureBuffer;
  102. struct IDirectSoundNotify;
  103. #endif // __cplusplus
  104.  
  105.  
  106. //
  107. // DirectSound 8.0 interfaces.
  108. //
  109.  
  110. #if DIRECTSOUND_VERSION >= 0x0800
  111.  
  112. #ifdef __cplusplus
  113. struct IDirectSound8;
  114. struct IDirectSoundBuffer8;
  115. struct IDirectSoundCaptureBuffer8;
  116. struct IDirectSoundFXGargle;
  117. struct IDirectSoundFXChorus;
  118. struct IDirectSoundFXFlanger;
  119. struct IDirectSoundFXEcho;
  120. struct IDirectSoundFXDistortion;
  121. struct IDirectSoundFXCompressor;
  122. struct IDirectSoundFXParamEq;
  123. struct IDirectSoundFXWavesReverb;
  124. struct IDirectSoundFXI3DL2Reverb;
  125. struct IDirectSoundCaptureFXAec;
  126. struct IDirectSoundCaptureFXNoiseSuppress;
  127. struct IDirectSoundFullDuplex;
  128. #endif // __cplusplus
  129.  
  130. // IDirectSound8, IDirectSoundBuffer8 and IDirectSoundCaptureBuffer8 are the
  131. // only DirectSound 7.0 interfaces with changed functionality in version 8.0.
  132. // The other level 8 interfaces as equivalent to their level 7 counterparts:
  133.  
  134. #define IDirectSoundCapture8            IDirectSoundCapture
  135. #define IDirectSound3DListener8         IDirectSound3DListener
  136. #define IDirectSound3DBuffer8           IDirectSound3DBuffer
  137. #define IDirectSoundNotify8             IDirectSoundNotify
  138. #define IDirectSoundFXGargle8           IDirectSoundFXGargle
  139. #define IDirectSoundFXChorus8           IDirectSoundFXChorus
  140. #define IDirectSoundFXFlanger8          IDirectSoundFXFlanger
  141. #define IDirectSoundFXEcho8             IDirectSoundFXEcho
  142. #define IDirectSoundFXDistortion8       IDirectSoundFXDistortion
  143. #define IDirectSoundFXCompressor8       IDirectSoundFXCompressor
  144. #define IDirectSoundFXParamEq8          IDirectSoundFXParamEq
  145. #define IDirectSoundFXWavesReverb8      IDirectSoundFXWavesReverb
  146. #define IDirectSoundFXI3DL2Reverb8      IDirectSoundFXI3DL2Reverb
  147. #define IDirectSoundCaptureFXAec8       IDirectSoundCaptureFXAec
  148. #define IDirectSoundCaptureFXNoiseSuppress8 IDirectSoundCaptureFXNoiseSuppress
  149. #define IDirectSoundFullDuplex8         IDirectSoundFullDuplex
  150.  
  151. #endif // DIRECTSOUND_VERSION >= 0x0800
  152.  
  153.  
  154. typedef struct IDirectSound                 *LPDIRECTSOUND;
  155. typedef struct IDirectSoundBuffer           *LPDIRECTSOUNDBUFFER;
  156. typedef struct IDirectSound3DListener       *LPDIRECTSOUND3DLISTENER;
  157. typedef struct IDirectSound3DBuffer         *LPDIRECTSOUND3DBUFFER;
  158. typedef struct IDirectSoundCapture          *LPDIRECTSOUNDCAPTURE;
  159. typedef struct IDirectSoundCaptureBuffer    *LPDIRECTSOUNDCAPTUREBUFFER;
  160. typedef struct IDirectSoundNotify           *LPDIRECTSOUNDNOTIFY;
  161.  
  162.  
  163. #if DIRECTSOUND_VERSION >= 0x0800
  164. typedef struct IDirectSoundFXGargle         *LPDIRECTSOUNDFXGARGLE;
  165. typedef struct IDirectSoundFXChorus         *LPDIRECTSOUNDFXCHORUS;
  166. typedef struct IDirectSoundFXFlanger        *LPDIRECTSOUNDFXFLANGER;
  167. typedef struct IDirectSoundFXEcho           *LPDIRECTSOUNDFXECHO;
  168. typedef struct IDirectSoundFXDistortion     *LPDIRECTSOUNDFXDISTORTION;
  169. typedef struct IDirectSoundFXCompressor     *LPDIRECTSOUNDFXCOMPRESSOR;
  170. typedef struct IDirectSoundFXParamEq        *LPDIRECTSOUNDFXPARAMEQ;
  171. typedef struct IDirectSoundFXWavesReverb    *LPDIRECTSOUNDFXWAVESREVERB;
  172. typedef struct IDirectSoundFXI3DL2Reverb    *LPDIRECTSOUNDFXI3DL2REVERB;
  173. typedef struct IDirectSoundCaptureFXAec     *LPDIRECTSOUNDCAPTUREFXAEC;
  174. typedef struct IDirectSoundCaptureFXNoiseSuppress *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS;
  175. typedef struct IDirectSoundFullDuplex       *LPDIRECTSOUNDFULLDUPLEX;
  176.  
  177. typedef struct IDirectSound8                *LPDIRECTSOUND8;
  178. typedef struct IDirectSoundBuffer8          *LPDIRECTSOUNDBUFFER8;
  179. typedef struct IDirectSound3DListener8      *LPDIRECTSOUND3DLISTENER8;
  180. typedef struct IDirectSound3DBuffer8        *LPDIRECTSOUND3DBUFFER8;
  181. typedef struct IDirectSoundCapture8         *LPDIRECTSOUNDCAPTURE8;
  182. typedef struct IDirectSoundCaptureBuffer8   *LPDIRECTSOUNDCAPTUREBUFFER8;
  183. typedef struct IDirectSoundNotify8          *LPDIRECTSOUNDNOTIFY8;
  184. typedef struct IDirectSoundFXGargle8        *LPDIRECTSOUNDFXGARGLE8;
  185. typedef struct IDirectSoundFXChorus8        *LPDIRECTSOUNDFXCHORUS8;
  186. typedef struct IDirectSoundFXFlanger8       *LPDIRECTSOUNDFXFLANGER8;
  187. typedef struct IDirectSoundFXEcho8          *LPDIRECTSOUNDFXECHO8;
  188. typedef struct IDirectSoundFXDistortion8    *LPDIRECTSOUNDFXDISTORTION8;
  189. typedef struct IDirectSoundFXCompressor8    *LPDIRECTSOUNDFXCOMPRESSOR8;
  190. typedef struct IDirectSoundFXParamEq8       *LPDIRECTSOUNDFXPARAMEQ8;
  191. typedef struct IDirectSoundFXWavesReverb8   *LPDIRECTSOUNDFXWAVESREVERB8;
  192. typedef struct IDirectSoundFXI3DL2Reverb8   *LPDIRECTSOUNDFXI3DL2REVERB8;
  193. typedef struct IDirectSoundCaptureFXAec8    *LPDIRECTSOUNDCAPTUREFXAEC8;
  194. typedef struct IDirectSoundCaptureFXNoiseSuppress8 *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8;
  195. typedef struct IDirectSoundFullDuplex8      *LPDIRECTSOUNDFULLDUPLEX8;
  196.  
  197. #endif // DIRECTSOUND_VERSION >= 0x0800
  198.  
  199. //
  200. // IID definitions for the unchanged DirectSound 8.0 interfaces
  201. //
  202.  
  203. #if DIRECTSOUND_VERSION >= 0x0800
  204. #define IID_IDirectSoundCapture8            IID_IDirectSoundCapture
  205. #define IID_IDirectSound3DListener8         IID_IDirectSound3DListener
  206. #define IID_IDirectSound3DBuffer8           IID_IDirectSound3DBuffer
  207. #define IID_IDirectSoundNotify8             IID_IDirectSoundNotify
  208. #define IID_IDirectSoundFXGargle8           IID_IDirectSoundFXGargle
  209. #define IID_IDirectSoundFXChorus8           IID_IDirectSoundFXChorus
  210. #define IID_IDirectSoundFXFlanger8          IID_IDirectSoundFXFlanger
  211. #define IID_IDirectSoundFXEcho8             IID_IDirectSoundFXEcho
  212. #define IID_IDirectSoundFXDistortion8       IID_IDirectSoundFXDistortion
  213. #define IID_IDirectSoundFXCompressor8       IID_IDirectSoundFXCompressor
  214. #define IID_IDirectSoundFXParamEq8          IID_IDirectSoundFXParamEq
  215. #define IID_IDirectSoundFXWavesReverb8      IID_IDirectSoundFXWavesReverb
  216. #define IID_IDirectSoundFXI3DL2Reverb8      IID_IDirectSoundFXI3DL2Reverb
  217. #define IID_IDirectSoundCaptureFXAec8       IID_IDirectSoundCaptureFXAec
  218. #define IID_IDirectSoundCaptureFXNoiseSuppress8 IID_IDirectSoundCaptureFXNoiseSuppress
  219. #define IID_IDirectSoundFullDuplex8         IID_IDirectSoundFullDuplex
  220. #endif // DIRECTSOUND_VERSION >= 0x0800
  221.  
  222. //
  223. // Compatibility typedefs
  224. //
  225.  
  226. #ifndef _LPCWAVEFORMATEX_DEFINED
  227. #define _LPCWAVEFORMATEX_DEFINED
  228. typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
  229. #endif // _LPCWAVEFORMATEX_DEFINED
  230.  
  231. #ifndef __LPCGUID_DEFINED__
  232. #define __LPCGUID_DEFINED__
  233. typedef const GUID *LPCGUID;
  234. #endif // __LPCGUID_DEFINED__
  235.  
  236. typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
  237. typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
  238. typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
  239. typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
  240. typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
  241. typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
  242. typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
  243.  
  244. #if DIRECTSOUND_VERSION >= 0x0800
  245. typedef LPDIRECTSOUND8 *LPLPDIRECTSOUND8;
  246. typedef LPDIRECTSOUNDBUFFER8 *LPLPDIRECTSOUNDBUFFER8;
  247. typedef LPDIRECTSOUNDCAPTURE8 *LPLPDIRECTSOUNDCAPTURE8;
  248. typedef LPDIRECTSOUNDCAPTUREBUFFER8 *LPLPDIRECTSOUNDCAPTUREBUFFER8;
  249. #endif // DIRECTSOUND_VERSION >= 0x0800
  250.  
  251. //
  252. // Structures
  253. //
  254.  
  255. typedef struct _DSCAPS
  256. {
  257.     DWORD           dwSize;
  258.     DWORD           dwFlags;
  259.     DWORD           dwMinSecondarySampleRate;
  260.     DWORD           dwMaxSecondarySampleRate;
  261.     DWORD           dwPrimaryBuffers;
  262.     DWORD           dwMaxHwMixingAllBuffers;
  263.     DWORD           dwMaxHwMixingStaticBuffers;
  264.     DWORD           dwMaxHwMixingStreamingBuffers;
  265.     DWORD           dwFreeHwMixingAllBuffers;
  266.     DWORD           dwFreeHwMixingStaticBuffers;
  267.     DWORD           dwFreeHwMixingStreamingBuffers;
  268.     DWORD           dwMaxHw3DAllBuffers;
  269.     DWORD           dwMaxHw3DStaticBuffers;
  270.     DWORD           dwMaxHw3DStreamingBuffers;
  271.     DWORD           dwFreeHw3DAllBuffers;
  272.     DWORD           dwFreeHw3DStaticBuffers;
  273.     DWORD           dwFreeHw3DStreamingBuffers;
  274.     DWORD           dwTotalHwMemBytes;
  275.     DWORD           dwFreeHwMemBytes;
  276.     DWORD           dwMaxContigFreeHwMemBytes;
  277.     DWORD           dwUnlockTransferRateHwBuffers;
  278.     DWORD           dwPlayCpuOverheadSwBuffers;
  279.     DWORD           dwReserved1;
  280.     DWORD           dwReserved2;
  281. } DSCAPS, *LPDSCAPS;
  282.  
  283. typedef const DSCAPS *LPCDSCAPS;
  284.  
  285. typedef struct _DSBCAPS
  286. {
  287.     DWORD           dwSize;
  288.     DWORD           dwFlags;
  289.     DWORD           dwBufferBytes;
  290.     DWORD           dwUnlockTransferRate;
  291.     DWORD           dwPlayCpuOverhead;
  292. } DSBCAPS, *LPDSBCAPS;
  293.  
  294. typedef const DSBCAPS *LPCDSBCAPS;
  295.  
  296. #if DIRECTSOUND_VERSION >= 0x0800
  297.  
  298.     typedef struct _DSEFFECTDESC
  299.     {
  300.         DWORD       dwSize;
  301.         DWORD       dwFlags;
  302.         GUID        guidDSFXClass;
  303.         DWORD       dwReserved1;
  304.         DWORD       dwReserved2;
  305.     } DSEFFECTDESC, *LPDSEFFECTDESC;
  306.     typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
  307.  
  308.     #define DSFX_LOCHARDWARE    0x00000001
  309.     #define DSFX_LOCSOFTWARE    0x00000002
  310.  
  311.     enum
  312.     {
  313.         DSFXR_PRESENT,          // 0
  314.         DSFXR_LOCHARDWARE,      // 1
  315.         DSFXR_LOCSOFTWARE,      // 2
  316.         DSFXR_UNALLOCATED,      // 3
  317.         DSFXR_FAILED,           // 4
  318.         DSFXR_UNKNOWN,          // 5
  319.         DSFXR_SENDLOOP          // 6
  320.     };
  321.  
  322.     typedef struct _DSCEFFECTDESC
  323.     {
  324.         DWORD       dwSize;
  325.         DWORD       dwFlags;
  326.         GUID        guidDSCFXClass;
  327.         GUID        guidDSCFXInstance;
  328.         DWORD       dwReserved1;
  329.         DWORD       dwReserved2;
  330.     } DSCEFFECTDESC, *LPDSCEFFECTDESC;
  331.     typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
  332.  
  333.     #define DSCFX_LOCHARDWARE   0x00000001
  334.     #define DSCFX_LOCSOFTWARE   0x00000002
  335.  
  336.     #define DSCFXR_LOCHARDWARE  0x00000010
  337.     #define DSCFXR_LOCSOFTWARE  0x00000020
  338.     #define DSCFXR_UNALLOCATED  0x00000040
  339.     #define DSCFXR_FAILED       0x00000080
  340.     #define DSCFXR_UNKNOWN      0x00000100
  341.  
  342. #endif // DIRECTSOUND_VERSION >= 0x0800
  343.  
  344. typedef struct _DSBUFFERDESC
  345. {
  346.     DWORD           dwSize;
  347.     DWORD           dwFlags;
  348.     DWORD           dwBufferBytes;
  349.     DWORD           dwReserved;
  350.     LPWAVEFORMATEX  lpwfxFormat;
  351. #if DIRECTSOUND_VERSION >= 0x0700
  352.     GUID            guid3DAlgorithm;
  353. #endif
  354. } DSBUFFERDESC, *LPDSBUFFERDESC;
  355.  
  356. typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
  357.  
  358. // Older version of this structure:
  359.  
  360. typedef struct _DSBUFFERDESC1
  361. {
  362.     DWORD           dwSize;
  363.     DWORD           dwFlags;
  364.     DWORD           dwBufferBytes;
  365.     DWORD           dwReserved;
  366.     LPWAVEFORMATEX  lpwfxFormat;
  367. } DSBUFFERDESC1, *LPDSBUFFERDESC1;
  368.  
  369. typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
  370.  
  371. typedef struct _DS3DBUFFER
  372. {
  373.     DWORD           dwSize;
  374.     D3DVECTOR       vPosition;
  375.     D3DVECTOR       vVelocity;
  376.     DWORD           dwInsideConeAngle;
  377.     DWORD           dwOutsideConeAngle;
  378.     D3DVECTOR       vConeOrientation;
  379.     LONG            lConeOutsideVolume;
  380.     D3DVALUE        flMinDistance;
  381.     D3DVALUE        flMaxDistance;
  382.     DWORD           dwMode;
  383. } DS3DBUFFER, *LPDS3DBUFFER;
  384.  
  385. typedef const DS3DBUFFER *LPCDS3DBUFFER;
  386.  
  387. typedef struct _DS3DLISTENER
  388. {
  389.     DWORD           dwSize;
  390.     D3DVECTOR       vPosition;
  391.     D3DVECTOR       vVelocity;
  392.     D3DVECTOR       vOrientFront;
  393.     D3DVECTOR       vOrientTop;
  394.     D3DVALUE        flDistanceFactor;
  395.     D3DVALUE        flRolloffFactor;
  396.     D3DVALUE        flDopplerFactor;
  397. } DS3DLISTENER, *LPDS3DLISTENER;
  398.  
  399. typedef const DS3DLISTENER *LPCDS3DLISTENER;
  400.  
  401. typedef struct _DSCCAPS
  402. {
  403.     DWORD           dwSize;
  404.     DWORD           dwFlags;
  405.     DWORD           dwFormats;
  406.     DWORD           dwChannels;
  407. } DSCCAPS, *LPDSCCAPS;
  408.  
  409. typedef const DSCCAPS *LPCDSCCAPS;
  410.  
  411. typedef struct _DSCBUFFERDESC1
  412. {
  413.     DWORD           dwSize;
  414.     DWORD           dwFlags;
  415.     DWORD           dwBufferBytes;
  416.     DWORD           dwReserved;
  417.     LPWAVEFORMATEX  lpwfxFormat;
  418. } DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
  419.  
  420. typedef struct _DSCBUFFERDESC
  421. {
  422.     DWORD           dwSize;
  423.     DWORD           dwFlags;
  424.     DWORD           dwBufferBytes;
  425.     DWORD           dwReserved;
  426.     LPWAVEFORMATEX  lpwfxFormat;
  427. #if DIRECTSOUND_VERSION >= 0x0800
  428.     DWORD           dwFXCount;
  429.     LPDSCEFFECTDESC lpDSCFXDesc;
  430. #endif
  431. } DSCBUFFERDESC, *LPDSCBUFFERDESC;
  432.  
  433. typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
  434.  
  435. typedef struct _DSCBCAPS
  436. {
  437.     DWORD           dwSize;
  438.     DWORD           dwFlags;
  439.     DWORD           dwBufferBytes;
  440.     DWORD           dwReserved;
  441. } DSCBCAPS, *LPDSCBCAPS;
  442.  
  443. typedef const DSCBCAPS *LPCDSCBCAPS;
  444.  
  445. typedef struct _DSBPOSITIONNOTIFY
  446. {
  447.     DWORD           dwOffset;
  448.     HANDLE          hEventNotify;
  449. } DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
  450.  
  451. typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
  452.  
  453. //
  454. // DirectSound API
  455. //
  456.  
  457. typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
  458. typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
  459.  
  460. extern HRESULT WINAPI DirectSoundCreate(LPCGUID pcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter);
  461. extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
  462. extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
  463.  
  464. extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
  465. extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
  466. extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext);
  467.  
  468. #if DIRECTSOUND_VERSION >= 0x0800
  469. extern HRESULT WINAPI DirectSoundCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUND8 *ppDS8, LPUNKNOWN pUnkOuter);
  470. extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
  471. extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
  472.         LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd,
  473.         DWORD dwLevel, LPDIRECTSOUNDFULLDUPLEX* ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8,
  474.         LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
  475. #define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
  476.  
  477. extern HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest);
  478. #endif // DIRECTSOUND_VERSION >= 0x0800
  479.  
  480. #ifdef UNICODE
  481. #define LPDSENUMCALLBACK            LPDSENUMCALLBACKW
  482. #define DirectSoundEnumerate        DirectSoundEnumerateW
  483. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
  484. #else // UNICODE
  485. #define LPDSENUMCALLBACK            LPDSENUMCALLBACKA
  486. #define DirectSoundEnumerate        DirectSoundEnumerateA
  487. #define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
  488. #endif // UNICODE
  489.  
  490. //
  491. // IUnknown
  492. //
  493.  
  494. #if !defined(__cplusplus) || defined(CINTERFACE)
  495. #ifndef IUnknown_QueryInterface
  496. #define IUnknown_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
  497. #endif // IUnknown_QueryInterface
  498. #ifndef IUnknown_AddRef
  499. #define IUnknown_AddRef(p)              (p)->lpVtbl->AddRef(p)
  500. #endif // IUnknown_AddRef
  501. #ifndef IUnknown_Release
  502. #define IUnknown_Release(p)             (p)->lpVtbl->Release(p)
  503. #endif // IUnknown_Release
  504. #else // !defined(__cplusplus) || defined(CINTERFACE)
  505. #ifndef IUnknown_QueryInterface
  506. #define IUnknown_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
  507. #endif // IUnknown_QueryInterface
  508. #ifndef IUnknown_AddRef
  509. #define IUnknown_AddRef(p)              (p)->AddRef()
  510. #endif // IUnknown_AddRef
  511. #ifndef IUnknown_Release
  512. #define IUnknown_Release(p)             (p)->Release()
  513. #endif // IUnknown_Release
  514. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  515.  
  516. #ifndef __IReferenceClock_INTERFACE_DEFINED__
  517. #define __IReferenceClock_INTERFACE_DEFINED__
  518.  
  519. typedef LONGLONG REFERENCE_TIME;
  520. typedef REFERENCE_TIME *LPREFERENCE_TIME;
  521.  
  522. DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70);
  523.  
  524. #undef INTERFACE
  525. #define INTERFACE IReferenceClock
  526.  
  527. DECLARE_INTERFACE_(IReferenceClock, IUnknown)
  528. {
  529.     // IUnknown methods
  530.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  531.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  532.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  533.  
  534.     // IReferenceClock methods
  535.     STDMETHOD(GetTime)              (THIS_ REFERENCE_TIME *pTime) PURE;
  536.     STDMETHOD(AdviseTime)           (THIS_ REFERENCE_TIME rtBaseTime, REFERENCE_TIME rtStreamTime,
  537.                                            HANDLE hEvent, LPDWORD pdwAdviseCookie) PURE;
  538.     STDMETHOD(AdvisePeriodic)       (THIS_ REFERENCE_TIME rtStartTime, REFERENCE_TIME rtPeriodTime,
  539.                                            HANDLE hSemaphore, LPDWORD pdwAdviseCookie) PURE;
  540.     STDMETHOD(Unadvise)             (THIS_ DWORD dwAdviseCookie) PURE;
  541. };
  542.  
  543. #endif // __IReferenceClock_INTERFACE_DEFINED__
  544.  
  545. #ifndef IReferenceClock_QueryInterface
  546.  
  547. #define IReferenceClock_QueryInterface(p,a,b)      IUnknown_QueryInterface(p,a,b)
  548. #define IReferenceClock_AddRef(p)                  IUnknown_AddRef(p)
  549. #define IReferenceClock_Release(p)                 IUnknown_Release(p)
  550.  
  551. #if !defined(__cplusplus) || defined(CINTERFACE)
  552. #define IReferenceClock_GetTime(p,a)               (p)->lpVtbl->GetTime(p,a)
  553. #define IReferenceClock_AdviseTime(p,a,b,c,d)      (p)->lpVtbl->AdviseTime(p,a,b,c,d)
  554. #define IReferenceClock_AdvisePeriodic(p,a,b,c,d)  (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d)
  555. #define IReferenceClock_Unadvise(p,a)              (p)->lpVtbl->Unadvise(p,a)
  556. #else // !defined(__cplusplus) || defined(CINTERFACE)
  557. #define IReferenceClock_GetTime(p,a)               (p)->GetTime(a)
  558. #define IReferenceClock_AdviseTime(p,a,b,c,d)      (p)->AdviseTime(a,b,c,d)
  559. #define IReferenceClock_AdvisePeriodic(p,a,b,c,d)  (p)->AdvisePeriodic(a,b,c,d)
  560. #define IReferenceClock_Unadvise(p,a)              (p)->Unadvise(a)
  561. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  562.  
  563. #endif // IReferenceClock_QueryInterface
  564.  
  565. //
  566. // IDirectSound
  567. //
  568.  
  569. DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  570.  
  571. #undef INTERFACE
  572. #define INTERFACE IDirectSound
  573.  
  574. DECLARE_INTERFACE_(IDirectSound, IUnknown)
  575. {
  576.     // IUnknown methods
  577.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  578.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  579.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  580.  
  581.     // IDirectSound methods
  582.     STDMETHOD(CreateSoundBuffer)    (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE;
  583.     STDMETHOD(GetCaps)              (THIS_ LPDSCAPS pDSCaps) PURE;
  584.     STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
  585.     STDMETHOD(SetCooperativeLevel)  (THIS_ HWND hwnd, DWORD dwLevel) PURE;
  586.     STDMETHOD(Compact)              (THIS) PURE;
  587.     STDMETHOD(GetSpeakerConfig)     (THIS_ LPDWORD pdwSpeakerConfig) PURE;
  588.     STDMETHOD(SetSpeakerConfig)     (THIS_ DWORD dwSpeakerConfig) PURE;
  589.     STDMETHOD(Initialize)           (THIS_ LPCGUID pcGuidDevice) PURE;
  590. };
  591.  
  592. #define IDirectSound_QueryInterface(p,a,b)       IUnknown_QueryInterface(p,a,b)
  593. #define IDirectSound_AddRef(p)                   IUnknown_AddRef(p)
  594. #define IDirectSound_Release(p)                  IUnknown_Release(p)
  595.  
  596. #if !defined(__cplusplus) || defined(CINTERFACE)
  597. #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
  598. #define IDirectSound_GetCaps(p,a)                (p)->lpVtbl->GetCaps(p,a)
  599. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
  600. #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  601. #define IDirectSound_Compact(p)                  (p)->lpVtbl->Compact(p)
  602. #define IDirectSound_GetSpeakerConfig(p,a)       (p)->lpVtbl->GetSpeakerConfig(p,a)
  603. #define IDirectSound_SetSpeakerConfig(p,b)       (p)->lpVtbl->SetSpeakerConfig(p,b)
  604. #define IDirectSound_Initialize(p,a)             (p)->lpVtbl->Initialize(p,a)
  605. #else // !defined(__cplusplus) || defined(CINTERFACE)
  606. #define IDirectSound_CreateSoundBuffer(p,a,b,c)  (p)->CreateSoundBuffer(a,b,c)
  607. #define IDirectSound_GetCaps(p,a)                (p)->GetCaps(a)
  608. #define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
  609. #define IDirectSound_SetCooperativeLevel(p,a,b)  (p)->SetCooperativeLevel(a,b)
  610. #define IDirectSound_Compact(p)                  (p)->Compact()
  611. #define IDirectSound_GetSpeakerConfig(p,a)       (p)->GetSpeakerConfig(a)
  612. #define IDirectSound_SetSpeakerConfig(p,b)       (p)->SetSpeakerConfig(b)
  613. #define IDirectSound_Initialize(p,a)             (p)->Initialize(a)
  614. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  615.  
  616. #if DIRECTSOUND_VERSION >= 0x0800
  617.  
  618. //
  619. // IDirectSound8
  620. //
  621.  
  622. DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66);
  623.  
  624. #undef INTERFACE
  625. #define INTERFACE IDirectSound8
  626.  
  627. DECLARE_INTERFACE_(IDirectSound8, IDirectSound)
  628. {
  629.     // IUnknown methods
  630.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  631.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  632.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  633.  
  634.     // IDirectSound methods
  635.     STDMETHOD(CreateSoundBuffer)    (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE;
  636.     STDMETHOD(GetCaps)              (THIS_ LPDSCAPS pDSCaps) PURE;
  637.     STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
  638.     STDMETHOD(SetCooperativeLevel)  (THIS_ HWND hwnd, DWORD dwLevel) PURE;
  639.     STDMETHOD(Compact)              (THIS) PURE;
  640.     STDMETHOD(GetSpeakerConfig)     (THIS_ LPDWORD pdwSpeakerConfig) PURE;
  641.     STDMETHOD(SetSpeakerConfig)     (THIS_ DWORD dwSpeakerConfig) PURE;
  642.     STDMETHOD(Initialize)           (THIS_ LPCGUID pcGuidDevice) PURE;
  643.  
  644.     // IDirectSound8 methods
  645.     STDMETHOD(VerifyCertification)  (THIS_ LPDWORD pdwCertified) PURE;
  646. };
  647.  
  648. #define IDirectSound8_QueryInterface(p,a,b)       IDirectSound_QueryInterface(p,a,b)
  649. #define IDirectSound8_AddRef(p)                   IDirectSound_AddRef(p)
  650. #define IDirectSound8_Release(p)                  IDirectSound_Release(p)
  651. #define IDirectSound8_CreateSoundBuffer(p,a,b,c)  IDirectSound_CreateSoundBuffer(p,a,b,c)
  652. #define IDirectSound8_GetCaps(p,a)                IDirectSound_GetCaps(p,a)
  653. #define IDirectSound8_DuplicateSoundBuffer(p,a,b) IDirectSound_DuplicateSoundBuffer(p,a,b)
  654. #define IDirectSound8_SetCooperativeLevel(p,a,b)  IDirectSound_SetCooperativeLevel(p,a,b)
  655. #define IDirectSound8_Compact(p)                  IDirectSound_Compact(p)
  656. #define IDirectSound8_GetSpeakerConfig(p,a)       IDirectSound_GetSpeakerConfig(p,a)
  657. #define IDirectSound8_SetSpeakerConfig(p,a)       IDirectSound_SetSpeakerConfig(p,a)
  658. #define IDirectSound8_Initialize(p,a)             IDirectSound_Initialize(p,a)
  659.  
  660. #if !defined(__cplusplus) || defined(CINTERFACE)
  661. #define IDirectSound8_VerifyCertification(p,a)           (p)->lpVtbl->VerifyCertification(p,a)
  662. #else // !defined(__cplusplus) || defined(CINTERFACE)
  663. #define IDirectSound8_VerifyCertification(p,a)           (p)->VerifyCertification(a)
  664. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  665.  
  666. #endif // DIRECTSOUND_VERSION >= 0x0800
  667.  
  668. //
  669. // IDirectSoundBuffer
  670. //
  671.  
  672. DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  673.  
  674. #undef INTERFACE
  675. #define INTERFACE IDirectSoundBuffer
  676.  
  677. DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
  678. {
  679.     // IUnknown methods
  680.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  681.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  682.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  683.  
  684.     // IDirectSoundBuffer methods
  685.     STDMETHOD(GetCaps)              (THIS_ LPDSBCAPS pDSBufferCaps) PURE;
  686.     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE;
  687.     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  688.     STDMETHOD(GetVolume)            (THIS_ LPLONG plVolume) PURE;
  689.     STDMETHOD(GetPan)               (THIS_ LPLONG plPan) PURE;
  690.     STDMETHOD(GetFrequency)         (THIS_ LPDWORD pdwFrequency) PURE;
  691.     STDMETHOD(GetStatus)            (THIS_ LPDWORD pdwStatus) PURE;
  692.     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE;
  693.     STDMETHOD(Lock)                 (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  694.                                            LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  695.     STDMETHOD(Play)                 (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
  696.     STDMETHOD(SetCurrentPosition)   (THIS_ DWORD dwNewPosition) PURE;
  697.     STDMETHOD(SetFormat)            (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE;
  698.     STDMETHOD(SetVolume)            (THIS_ LONG lVolume) PURE;
  699.     STDMETHOD(SetPan)               (THIS_ LONG lPan) PURE;
  700.     STDMETHOD(SetFrequency)         (THIS_ DWORD dwFrequency) PURE;
  701.     STDMETHOD(Stop)                 (THIS) PURE;
  702.     STDMETHOD(Unlock)               (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  703.     STDMETHOD(Restore)              (THIS) PURE;
  704. };
  705.  
  706. #define IDirectSoundBuffer_QueryInterface(p,a,b)        IUnknown_QueryInterface(p,a,b)
  707. #define IDirectSoundBuffer_AddRef(p)                    IUnknown_AddRef(p)
  708. #define IDirectSoundBuffer_Release(p)                   IUnknown_Release(p)
  709.  
  710. #if !defined(__cplusplus) || defined(CINTERFACE)
  711. #define IDirectSoundBuffer_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
  712. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)    (p)->lpVtbl->GetCurrentPosition(p,a,b)
  713. #define IDirectSoundBuffer_GetFormat(p,a,b,c)           (p)->lpVtbl->GetFormat(p,a,b,c)
  714. #define IDirectSoundBuffer_GetVolume(p,a)               (p)->lpVtbl->GetVolume(p,a)
  715. #define IDirectSoundBuffer_GetPan(p,a)                  (p)->lpVtbl->GetPan(p,a)
  716. #define IDirectSoundBuffer_GetFrequency(p,a)            (p)->lpVtbl->GetFrequency(p,a)
  717. #define IDirectSoundBuffer_GetStatus(p,a)               (p)->lpVtbl->GetStatus(p,a)
  718. #define IDirectSoundBuffer_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  719. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  720. #define IDirectSoundBuffer_Play(p,a,b,c)                (p)->lpVtbl->Play(p,a,b,c)
  721. #define IDirectSoundBuffer_SetCurrentPosition(p,a)      (p)->lpVtbl->SetCurrentPosition(p,a)
  722. #define IDirectSoundBuffer_SetFormat(p,a)               (p)->lpVtbl->SetFormat(p,a)
  723. #define IDirectSoundBuffer_SetVolume(p,a)               (p)->lpVtbl->SetVolume(p,a)
  724. #define IDirectSoundBuffer_SetPan(p,a)                  (p)->lpVtbl->SetPan(p,a)
  725. #define IDirectSoundBuffer_SetFrequency(p,a)            (p)->lpVtbl->SetFrequency(p,a)
  726. #define IDirectSoundBuffer_Stop(p)                      (p)->lpVtbl->Stop(p)
  727. #define IDirectSoundBuffer_Unlock(p,a,b,c,d)            (p)->lpVtbl->Unlock(p,a,b,c,d)
  728. #define IDirectSoundBuffer_Restore(p)                   (p)->lpVtbl->Restore(p)
  729. #else // !defined(__cplusplus) || defined(CINTERFACE)
  730. #define IDirectSoundBuffer_GetCaps(p,a)                 (p)->GetCaps(a)
  731. #define IDirectSoundBuffer_GetCurrentPosition(p,a,b)    (p)->GetCurrentPosition(a,b)
  732. #define IDirectSoundBuffer_GetFormat(p,a,b,c)           (p)->GetFormat(a,b,c)
  733. #define IDirectSoundBuffer_GetVolume(p,a)               (p)->GetVolume(a)
  734. #define IDirectSoundBuffer_GetPan(p,a)                  (p)->GetPan(a)
  735. #define IDirectSoundBuffer_GetFrequency(p,a)            (p)->GetFrequency(a)
  736. #define IDirectSoundBuffer_GetStatus(p,a)               (p)->GetStatus(a)
  737. #define IDirectSoundBuffer_Initialize(p,a,b)            (p)->Initialize(a,b)
  738. #define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)        (p)->Lock(a,b,c,d,e,f,g)
  739. #define IDirectSoundBuffer_Play(p,a,b,c)                (p)->Play(a,b,c)
  740. #define IDirectSoundBuffer_SetCurrentPosition(p,a)      (p)->SetCurrentPosition(a)
  741. #define IDirectSoundBuffer_SetFormat(p,a)               (p)->SetFormat(a)
  742. #define IDirectSoundBuffer_SetVolume(p,a)               (p)->SetVolume(a)
  743. #define IDirectSoundBuffer_SetPan(p,a)                  (p)->SetPan(a)
  744. #define IDirectSoundBuffer_SetFrequency(p,a)            (p)->SetFrequency(a)
  745. #define IDirectSoundBuffer_Stop(p)                      (p)->Stop()
  746. #define IDirectSoundBuffer_Unlock(p,a,b,c,d)            (p)->Unlock(a,b,c,d)
  747. #define IDirectSoundBuffer_Restore(p)                   (p)->Restore()
  748. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  749.  
  750. #if DIRECTSOUND_VERSION >= 0x0800
  751.  
  752. //
  753. // IDirectSoundBuffer8
  754. //
  755.  
  756. DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825a449, 0x7524, 0x4d82, 0x92, 0x0f, 0x50, 0xe3, 0x6a, 0xb3, 0xab, 0x1e);
  757.  
  758. #undef INTERFACE
  759. #define INTERFACE IDirectSoundBuffer8
  760.  
  761. DECLARE_INTERFACE_(IDirectSoundBuffer8, IDirectSoundBuffer)
  762. {
  763.     // IUnknown methods
  764.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  765.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  766.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  767.  
  768.     // IDirectSoundBuffer methods
  769.     STDMETHOD(GetCaps)              (THIS_ LPDSBCAPS pDSBufferCaps) PURE;
  770.     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE;
  771.     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  772.     STDMETHOD(GetVolume)            (THIS_ LPLONG plVolume) PURE;
  773.     STDMETHOD(GetPan)               (THIS_ LPLONG plPan) PURE;
  774.     STDMETHOD(GetFrequency)         (THIS_ LPDWORD pdwFrequency) PURE;
  775.     STDMETHOD(GetStatus)            (THIS_ LPDWORD pdwStatus) PURE;
  776.     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE;
  777.     STDMETHOD(Lock)                 (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  778.                                            LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  779.     STDMETHOD(Play)                 (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
  780.     STDMETHOD(SetCurrentPosition)   (THIS_ DWORD dwNewPosition) PURE;
  781.     STDMETHOD(SetFormat)            (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE;
  782.     STDMETHOD(SetVolume)            (THIS_ LONG lVolume) PURE;
  783.     STDMETHOD(SetPan)               (THIS_ LONG lPan) PURE;
  784.     STDMETHOD(SetFrequency)         (THIS_ DWORD dwFrequency) PURE;
  785.     STDMETHOD(Stop)                 (THIS) PURE;
  786.     STDMETHOD(Unlock)               (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  787.     STDMETHOD(Restore)              (THIS) PURE;
  788.  
  789.     // IDirectSoundBuffer8 methods
  790.     STDMETHOD(SetFX)                (THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
  791.     STDMETHOD(AcquireResources)     (THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
  792.     STDMETHOD(GetObjectInPath)      (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  793. };
  794.  
  795. // Special GUID meaning "select all objects" for use in GetObjectInPath()
  796. DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5);
  797.  
  798. #define IDirectSoundBuffer8_QueryInterface(p,a,b)           IUnknown_QueryInterface(p,a,b)
  799. #define IDirectSoundBuffer8_AddRef(p)                       IUnknown_AddRef(p)
  800. #define IDirectSoundBuffer8_Release(p)                      IUnknown_Release(p)
  801.  
  802. #define IDirectSoundBuffer8_GetCaps(p,a)                    IDirectSoundBuffer_GetCaps(p,a)
  803. #define IDirectSoundBuffer8_GetCurrentPosition(p,a,b)       IDirectSoundBuffer_GetCurrentPosition(p,a,b)
  804. #define IDirectSoundBuffer8_GetFormat(p,a,b,c)              IDirectSoundBuffer_GetFormat(p,a,b,c)
  805. #define IDirectSoundBuffer8_GetVolume(p,a)                  IDirectSoundBuffer_GetVolume(p,a)
  806. #define IDirectSoundBuffer8_GetPan(p,a)                     IDirectSoundBuffer_GetPan(p,a)
  807. #define IDirectSoundBuffer8_GetFrequency(p,a)               IDirectSoundBuffer_GetFrequency(p,a)
  808. #define IDirectSoundBuffer8_GetStatus(p,a)                  IDirectSoundBuffer_GetStatus(p,a)
  809. #define IDirectSoundBuffer8_Initialize(p,a,b)               IDirectSoundBuffer_Initialize(p,a,b)
  810. #define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g)           IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)
  811. #define IDirectSoundBuffer8_Play(p,a,b,c)                   IDirectSoundBuffer_Play(p,a,b,c)
  812. #define IDirectSoundBuffer8_SetCurrentPosition(p,a)         IDirectSoundBuffer_SetCurrentPosition(p,a)
  813. #define IDirectSoundBuffer8_SetFormat(p,a)                  IDirectSoundBuffer_SetFormat(p,a)
  814. #define IDirectSoundBuffer8_SetVolume(p,a)                  IDirectSoundBuffer_SetVolume(p,a)
  815. #define IDirectSoundBuffer8_SetPan(p,a)                     IDirectSoundBuffer_SetPan(p,a)
  816. #define IDirectSoundBuffer8_SetFrequency(p,a)               IDirectSoundBuffer_SetFrequency(p,a)
  817. #define IDirectSoundBuffer8_Stop(p)                         IDirectSoundBuffer_Stop(p)
  818. #define IDirectSoundBuffer8_Unlock(p,a,b,c,d)               IDirectSoundBuffer_Unlock(p,a,b,c,d)
  819. #define IDirectSoundBuffer8_Restore(p)                      IDirectSoundBuffer_Restore(p)
  820.  
  821. #if !defined(__cplusplus) || defined(CINTERFACE)
  822. #define IDirectSoundBuffer8_SetFX(p,a,b,c)                  (p)->lpVtbl->SetFX(p,a,b,c)
  823. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)       (p)->lpVtbl->AcquireResources(p,a,b,c)
  824. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)      (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  825. #else // !defined(__cplusplus) || defined(CINTERFACE)
  826. #define IDirectSoundBuffer8_SetFX(p,a,b,c)                  (p)->SetFX(a,b,c)
  827. #define IDirectSoundBuffer8_AcquireResources(p,a,b,c)       (p)->AcquireResources(a,b,c)
  828. #define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d)      (p)->GetObjectInPath(a,b,c,d)
  829. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  830.  
  831. #endif // DIRECTSOUND_VERSION >= 0x0800
  832.  
  833. //
  834. // IDirectSound3DListener
  835. //
  836.  
  837. DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  838.  
  839. #undef INTERFACE
  840. #define INTERFACE IDirectSound3DListener
  841.  
  842. DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
  843. {
  844.     // IUnknown methods
  845.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID *) PURE;
  846.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  847.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  848.  
  849.     // IDirectSound3DListener methods
  850.     STDMETHOD(GetAllParameters)         (THIS_ LPDS3DLISTENER pListener) PURE;
  851.     STDMETHOD(GetDistanceFactor)        (THIS_ D3DVALUE* pflDistanceFactor) PURE;
  852.     STDMETHOD(GetDopplerFactor)         (THIS_ D3DVALUE* pflDopplerFactor) PURE;
  853.     STDMETHOD(GetOrientation)           (THIS_ D3DVECTOR* pvOrientFront, D3DVECTOR* pvOrientTop) PURE;
  854.     STDMETHOD(GetPosition)              (THIS_ D3DVECTOR* pvPosition) PURE;
  855.     STDMETHOD(GetRolloffFactor)         (THIS_ D3DVALUE* pflRolloffFactor) PURE;
  856.     STDMETHOD(GetVelocity)              (THIS_ D3DVECTOR* pvVelocity) PURE;
  857.     STDMETHOD(SetAllParameters)         (THIS_ LPCDS3DLISTENER pcListener, DWORD dwApply) PURE;
  858.     STDMETHOD(SetDistanceFactor)        (THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
  859.     STDMETHOD(SetDopplerFactor)         (THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
  860.     STDMETHOD(SetOrientation)           (THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront,
  861.                                                D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
  862.     STDMETHOD(SetPosition)              (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  863.     STDMETHOD(SetRolloffFactor)         (THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
  864.     STDMETHOD(SetVelocity)              (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  865.     STDMETHOD(CommitDeferredSettings)   (THIS) PURE;
  866. };
  867.  
  868. #define IDirectSound3DListener_QueryInterface(p,a,b)            IUnknown_QueryInterface(p,a,b)
  869. #define IDirectSound3DListener_AddRef(p)                        IUnknown_AddRef(p)
  870. #define IDirectSound3DListener_Release(p)                       IUnknown_Release(p)
  871.  
  872. #if !defined(__cplusplus) || defined(CINTERFACE)
  873. #define IDirectSound3DListener_GetAllParameters(p,a)            (p)->lpVtbl->GetAllParameters(p,a)
  874. #define IDirectSound3DListener_GetDistanceFactor(p,a)           (p)->lpVtbl->GetDistanceFactor(p,a)
  875. #define IDirectSound3DListener_GetDopplerFactor(p,a)            (p)->lpVtbl->GetDopplerFactor(p,a)
  876. #define IDirectSound3DListener_GetOrientation(p,a,b)            (p)->lpVtbl->GetOrientation(p,a,b)
  877. #define IDirectSound3DListener_GetPosition(p,a)                 (p)->lpVtbl->GetPosition(p,a)
  878. #define IDirectSound3DListener_GetRolloffFactor(p,a)            (p)->lpVtbl->GetRolloffFactor(p,a)
  879. #define IDirectSound3DListener_GetVelocity(p,a)                 (p)->lpVtbl->GetVelocity(p,a)
  880. #define IDirectSound3DListener_SetAllParameters(p,a,b)          (p)->lpVtbl->SetAllParameters(p,a,b)
  881. #define IDirectSound3DListener_SetDistanceFactor(p,a,b)         (p)->lpVtbl->SetDistanceFactor(p,a,b)
  882. #define IDirectSound3DListener_SetDopplerFactor(p,a,b)          (p)->lpVtbl->SetDopplerFactor(p,a,b)
  883. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g)  (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
  884. #define IDirectSound3DListener_SetPosition(p,a,b,c,d)           (p)->lpVtbl->SetPosition(p,a,b,c,d)
  885. #define IDirectSound3DListener_SetRolloffFactor(p,a,b)          (p)->lpVtbl->SetRolloffFactor(p,a,b)
  886. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)           (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  887. #define IDirectSound3DListener_CommitDeferredSettings(p)        (p)->lpVtbl->CommitDeferredSettings(p)
  888. #else // !defined(__cplusplus) || defined(CINTERFACE)
  889. #define IDirectSound3DListener_GetAllParameters(p,a)            (p)->GetAllParameters(a)
  890. #define IDirectSound3DListener_GetDistanceFactor(p,a)           (p)->GetDistanceFactor(a)
  891. #define IDirectSound3DListener_GetDopplerFactor(p,a)            (p)->GetDopplerFactor(a)
  892. #define IDirectSound3DListener_GetOrientation(p,a,b)            (p)->GetOrientation(a,b)
  893. #define IDirectSound3DListener_GetPosition(p,a)                 (p)->GetPosition(a)
  894. #define IDirectSound3DListener_GetRolloffFactor(p,a)            (p)->GetRolloffFactor(a)
  895. #define IDirectSound3DListener_GetVelocity(p,a)                 (p)->GetVelocity(a)
  896. #define IDirectSound3DListener_SetAllParameters(p,a,b)          (p)->SetAllParameters(a,b)
  897. #define IDirectSound3DListener_SetDistanceFactor(p,a,b)         (p)->SetDistanceFactor(a,b)
  898. #define IDirectSound3DListener_SetDopplerFactor(p,a,b)          (p)->SetDopplerFactor(a,b)
  899. #define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g)  (p)->SetOrientation(a,b,c,d,e,f,g)
  900. #define IDirectSound3DListener_SetPosition(p,a,b,c,d)           (p)->SetPosition(a,b,c,d)
  901. #define IDirectSound3DListener_SetRolloffFactor(p,a,b)          (p)->SetRolloffFactor(a,b)
  902. #define IDirectSound3DListener_SetVelocity(p,a,b,c,d)           (p)->SetVelocity(a,b,c,d)
  903. #define IDirectSound3DListener_CommitDeferredSettings(p)        (p)->CommitDeferredSettings()
  904. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  905.  
  906. //
  907. // IDirectSound3DBuffer
  908. //
  909.  
  910. DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
  911.  
  912. #undef INTERFACE
  913. #define INTERFACE IDirectSound3DBuffer
  914.  
  915. DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
  916. {
  917.     // IUnknown methods
  918.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  919.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  920.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  921.  
  922.     // IDirectSound3DBuffer methods
  923.     STDMETHOD(GetAllParameters)     (THIS_ LPDS3DBUFFER pDs3dBuffer) PURE;
  924.     STDMETHOD(GetConeAngles)        (THIS_ LPDWORD pdwInsideConeAngle, LPDWORD pdwOutsideConeAngle) PURE;
  925.     STDMETHOD(GetConeOrientation)   (THIS_ D3DVECTOR* pvOrientation) PURE;
  926.     STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG plConeOutsideVolume) PURE;
  927.     STDMETHOD(GetMaxDistance)       (THIS_ D3DVALUE* pflMaxDistance) PURE;
  928.     STDMETHOD(GetMinDistance)       (THIS_ D3DVALUE* pflMinDistance) PURE;
  929.     STDMETHOD(GetMode)              (THIS_ LPDWORD pdwMode) PURE;
  930.     STDMETHOD(GetPosition)          (THIS_ D3DVECTOR* pvPosition) PURE;
  931.     STDMETHOD(GetVelocity)          (THIS_ D3DVECTOR* pvVelocity) PURE;
  932.     STDMETHOD(SetAllParameters)     (THIS_ LPCDS3DBUFFER pcDs3dBuffer, DWORD dwApply) PURE;
  933.     STDMETHOD(SetConeAngles)        (THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
  934.     STDMETHOD(SetConeOrientation)   (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  935.     STDMETHOD(SetConeOutsideVolume) (THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
  936.     STDMETHOD(SetMaxDistance)       (THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
  937.     STDMETHOD(SetMinDistance)       (THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
  938.     STDMETHOD(SetMode)              (THIS_ DWORD dwMode, DWORD dwApply) PURE;
  939.     STDMETHOD(SetPosition)          (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  940.     STDMETHOD(SetVelocity)          (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
  941. };
  942.  
  943. #define IDirectSound3DBuffer_QueryInterface(p,a,b)          IUnknown_QueryInterface(p,a,b)
  944. #define IDirectSound3DBuffer_AddRef(p)                      IUnknown_AddRef(p)
  945. #define IDirectSound3DBuffer_Release(p)                     IUnknown_Release(p)
  946.  
  947. #if !defined(__cplusplus) || defined(CINTERFACE)
  948. #define IDirectSound3DBuffer_GetAllParameters(p,a)          (p)->lpVtbl->GetAllParameters(p,a)
  949. #define IDirectSound3DBuffer_GetConeAngles(p,a,b)           (p)->lpVtbl->GetConeAngles(p,a,b)
  950. #define IDirectSound3DBuffer_GetConeOrientation(p,a)        (p)->lpVtbl->GetConeOrientation(p,a)
  951. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)      (p)->lpVtbl->GetConeOutsideVolume(p,a)
  952. #define IDirectSound3DBuffer_GetPosition(p,a)               (p)->lpVtbl->GetPosition(p,a)
  953. #define IDirectSound3DBuffer_GetMinDistance(p,a)            (p)->lpVtbl->GetMinDistance(p,a)
  954. #define IDirectSound3DBuffer_GetMaxDistance(p,a)            (p)->lpVtbl->GetMaxDistance(p,a)
  955. #define IDirectSound3DBuffer_GetMode(p,a)                   (p)->lpVtbl->GetMode(p,a)
  956. #define IDirectSound3DBuffer_GetVelocity(p,a)               (p)->lpVtbl->GetVelocity(p,a)
  957. #define IDirectSound3DBuffer_SetAllParameters(p,a,b)        (p)->lpVtbl->SetAllParameters(p,a,b)
  958. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)         (p)->lpVtbl->SetConeAngles(p,a,b,c)
  959. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d)  (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
  960. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)    (p)->lpVtbl->SetConeOutsideVolume(p,a,b)
  961. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)         (p)->lpVtbl->SetPosition(p,a,b,c,d)
  962. #define IDirectSound3DBuffer_SetMinDistance(p,a,b)          (p)->lpVtbl->SetMinDistance(p,a,b)
  963. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)          (p)->lpVtbl->SetMaxDistance(p,a,b)
  964. #define IDirectSound3DBuffer_SetMode(p,a,b)                 (p)->lpVtbl->SetMode(p,a,b)
  965. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)         (p)->lpVtbl->SetVelocity(p,a,b,c,d)
  966. #else // !defined(__cplusplus) || defined(CINTERFACE)
  967. #define IDirectSound3DBuffer_GetAllParameters(p,a)          (p)->GetAllParameters(a)
  968. #define IDirectSound3DBuffer_GetConeAngles(p,a,b)           (p)->GetConeAngles(a,b)
  969. #define IDirectSound3DBuffer_GetConeOrientation(p,a)        (p)->GetConeOrientation(a)
  970. #define IDirectSound3DBuffer_GetConeOutsideVolume(p,a)      (p)->GetConeOutsideVolume(a)
  971. #define IDirectSound3DBuffer_GetPosition(p,a)               (p)->GetPosition(a)
  972. #define IDirectSound3DBuffer_GetMinDistance(p,a)            (p)->GetMinDistance(a)
  973. #define IDirectSound3DBuffer_GetMaxDistance(p,a)            (p)->GetMaxDistance(a)
  974. #define IDirectSound3DBuffer_GetMode(p,a)                   (p)->GetMode(a)
  975. #define IDirectSound3DBuffer_GetVelocity(p,a)               (p)->GetVelocity(a)
  976. #define IDirectSound3DBuffer_SetAllParameters(p,a,b)        (p)->SetAllParameters(a,b)
  977. #define IDirectSound3DBuffer_SetConeAngles(p,a,b,c)         (p)->SetConeAngles(a,b,c)
  978. #define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d)  (p)->SetConeOrientation(a,b,c,d)
  979. #define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)    (p)->SetConeOutsideVolume(a,b)
  980. #define IDirectSound3DBuffer_SetPosition(p,a,b,c,d)         (p)->SetPosition(a,b,c,d)
  981. #define IDirectSound3DBuffer_SetMinDistance(p,a,b)          (p)->SetMinDistance(a,b)
  982. #define IDirectSound3DBuffer_SetMaxDistance(p,a,b)          (p)->SetMaxDistance(a,b)
  983. #define IDirectSound3DBuffer_SetMode(p,a,b)                 (p)->SetMode(a,b)
  984. #define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d)         (p)->SetVelocity(a,b,c,d)
  985. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  986.  
  987. //
  988. // IDirectSoundCapture
  989. //
  990.  
  991. DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  992.  
  993. #undef INTERFACE
  994. #define INTERFACE IDirectSoundCapture
  995.  
  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.  
  1003.     // IDirectSoundCapture methods
  1004.     STDMETHOD(CreateCaptureBuffer)  (THIS_ LPCDSCBUFFERDESC pcDSCBufferDesc, LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, LPUNKNOWN pUnkOuter) PURE;
  1005.     STDMETHOD(GetCaps)              (THIS_ LPDSCCAPS pDSCCaps) PURE;
  1006.     STDMETHOD(Initialize)           (THIS_ LPCGUID pcGuidDevice) PURE;
  1007. };
  1008.  
  1009. #define IDirectSoundCapture_QueryInterface(p,a,b)           IUnknown_QueryInterface(p,a,b)
  1010. #define IDirectSoundCapture_AddRef(p)                       IUnknown_AddRef(p)
  1011. #define IDirectSoundCapture_Release(p)                      IUnknown_Release(p)
  1012.  
  1013. #if !defined(__cplusplus) || defined(CINTERFACE)
  1014. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c)    (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
  1015. #define IDirectSoundCapture_GetCaps(p,a)                    (p)->lpVtbl->GetCaps(p,a)
  1016. #define IDirectSoundCapture_Initialize(p,a)                 (p)->lpVtbl->Initialize(p,a)
  1017. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1018. #define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c)    (p)->CreateCaptureBuffer(a,b,c)
  1019. #define IDirectSoundCapture_GetCaps(p,a)                    (p)->GetCaps(a)
  1020. #define IDirectSoundCapture_Initialize(p,a)                 (p)->Initialize(a)
  1021. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1022.  
  1023. //
  1024. // IDirectSoundCaptureBuffer
  1025. //
  1026.  
  1027. DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  1028.  
  1029. #undef INTERFACE
  1030. #define INTERFACE IDirectSoundCaptureBuffer
  1031.  
  1032. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
  1033. {
  1034.     // IUnknown methods
  1035.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1036.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1037.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1038.  
  1039.     // IDirectSoundCaptureBuffer methods
  1040.     STDMETHOD(GetCaps)              (THIS_ LPDSCBCAPS pDSCBCaps) PURE;
  1041.     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE;
  1042.     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  1043.     STDMETHOD(GetStatus)            (THIS_ LPDWORD pdwStatus) PURE;
  1044.     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
  1045.     STDMETHOD(Lock)                 (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  1046.                                            LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  1047.     STDMETHOD(Start)                (THIS_ DWORD dwFlags) PURE;
  1048.     STDMETHOD(Stop)                 (THIS) PURE;
  1049.     STDMETHOD(Unlock)               (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  1050. };
  1051.  
  1052. #define IDirectSoundCaptureBuffer_QueryInterface(p,a,b)         IUnknown_QueryInterface(p,a,b)
  1053. #define IDirectSoundCaptureBuffer_AddRef(p)                     IUnknown_AddRef(p)
  1054. #define IDirectSoundCaptureBuffer_Release(p)                    IUnknown_Release(p)
  1055.  
  1056. #if !defined(__cplusplus) || defined(CINTERFACE)
  1057. #define IDirectSoundCaptureBuffer_GetCaps(p,a)                  (p)->lpVtbl->GetCaps(p,a)
  1058. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)     (p)->lpVtbl->GetCurrentPosition(p,a,b)
  1059. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)            (p)->lpVtbl->GetFormat(p,a,b,c)
  1060. #define IDirectSoundCaptureBuffer_GetStatus(p,a)                (p)->lpVtbl->GetStatus(p,a)
  1061. #define IDirectSoundCaptureBuffer_Initialize(p,a,b)             (p)->lpVtbl->Initialize(p,a,b)
  1062. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)         (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
  1063. #define IDirectSoundCaptureBuffer_Start(p,a)                    (p)->lpVtbl->Start(p,a)
  1064. #define IDirectSoundCaptureBuffer_Stop(p)                       (p)->lpVtbl->Stop(p)
  1065. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)             (p)->lpVtbl->Unlock(p,a,b,c,d)
  1066. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1067. #define IDirectSoundCaptureBuffer_GetCaps(p,a)                  (p)->GetCaps(a)
  1068. #define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)     (p)->GetCurrentPosition(a,b)
  1069. #define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)            (p)->GetFormat(a,b,c)
  1070. #define IDirectSoundCaptureBuffer_GetStatus(p,a)                (p)->GetStatus(a)
  1071. #define IDirectSoundCaptureBuffer_Initialize(p,a,b)             (p)->Initialize(a,b)
  1072. #define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)         (p)->Lock(a,b,c,d,e,f,g)
  1073. #define IDirectSoundCaptureBuffer_Start(p,a)                    (p)->Start(a)
  1074. #define IDirectSoundCaptureBuffer_Stop(p)                       (p)->Stop()
  1075. #define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)             (p)->Unlock(a,b,c,d)
  1076. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1077.  
  1078.  
  1079. #if DIRECTSOUND_VERSION >= 0x0800
  1080.  
  1081. //
  1082. // IDirectSoundCaptureBuffer8
  1083. //
  1084.  
  1085. DEFINE_GUID(IID_IDirectSoundCaptureBuffer8, 0x990df4, 0xdbb, 0x4872, 0x83, 0x3e, 0x6d, 0x30, 0x3e, 0x80, 0xae, 0xb6);
  1086.  
  1087. #undef INTERFACE
  1088. #define INTERFACE IDirectSoundCaptureBuffer8
  1089.  
  1090. DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8, IDirectSoundCaptureBuffer)
  1091. {
  1092.     // IUnknown methods
  1093.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1094.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1095.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1096.  
  1097.     // IDirectSoundCaptureBuffer methods
  1098.     STDMETHOD(GetCaps)              (THIS_ LPDSCBCAPS pDSCBCaps) PURE;
  1099.     STDMETHOD(GetCurrentPosition)   (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE;
  1100.     STDMETHOD(GetFormat)            (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE;
  1101.     STDMETHOD(GetStatus)            (THIS_ LPDWORD pdwStatus) PURE;
  1102.     STDMETHOD(Initialize)           (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
  1103.     STDMETHOD(Lock)                 (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1,
  1104.                                            LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
  1105.     STDMETHOD(Start)                (THIS_ DWORD dwFlags) PURE;
  1106.     STDMETHOD(Stop)                 (THIS) PURE;
  1107.     STDMETHOD(Unlock)               (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
  1108.  
  1109.     // IDirectSoundCaptureBuffer8 methods
  1110.     STDMETHOD(GetObjectInPath)      (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
  1111.     STDMETHOD(GetFXStatus)          (DWORD dwFXCount, LPDWORD pdwFXStatus) PURE;
  1112. };
  1113.  
  1114. #define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b)            IUnknown_QueryInterface(p,a,b)
  1115. #define IDirectSoundCaptureBuffer8_AddRef(p)                        IUnknown_AddRef(p)
  1116. #define IDirectSoundCaptureBuffer8_Release(p)                       IUnknown_Release(p)
  1117.  
  1118. #define IDirectSoundCaptureBuffer8_GetCaps(p,a)                     IDirectSoundCaptureBuffer_GetCaps(p,a)
  1119. #define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b)        IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)
  1120. #define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c)               IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)
  1121. #define IDirectSoundCaptureBuffer8_GetStatus(p,a)                   IDirectSoundCaptureBuffer_GetStatus(p,a)
  1122. #define IDirectSoundCaptureBuffer8_Initialize(p,a,b)                IDirectSoundCaptureBuffer_Initialize(p,a,b)
  1123. #define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g)            IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)
  1124. #define IDirectSoundCaptureBuffer8_Start(p,a)                       IDirectSoundCaptureBuffer_Start(p,a)
  1125. #define IDirectSoundCaptureBuffer8_Stop(p)                          IDirectSoundCaptureBuffer_Stop(p))
  1126. #define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d)                IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)
  1127.  
  1128. #if !defined(__cplusplus) || defined(CINTERFACE)
  1129. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d)       (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
  1130. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)               (p)->lpVtbl->GetFXStatus(p,a,b)
  1131. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1132. #define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d)       (p)->GetObjectInPath(a,b,c,d)
  1133. #define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b)               (p)->GetFXStatus(a,b)
  1134. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1135.  
  1136. #endif // DIRECTSOUND_VERSION >= 0x0800
  1137.  
  1138. //
  1139. // IDirectSoundNotify
  1140. //
  1141.  
  1142. DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
  1143.  
  1144. #undef INTERFACE
  1145. #define INTERFACE IDirectSoundNotify
  1146.  
  1147. DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
  1148. {
  1149.     // IUnknown methods
  1150.     STDMETHOD(QueryInterface)           (THIS_ REFIID, LPVOID *) PURE;
  1151.     STDMETHOD_(ULONG,AddRef)            (THIS) PURE;
  1152.     STDMETHOD_(ULONG,Release)           (THIS) PURE;
  1153.  
  1154.     // IDirectSoundNotify methods
  1155.     STDMETHOD(SetNotificationPositions) (THIS_ DWORD dwPositionNotifies, LPCDSBPOSITIONNOTIFY pcPositionNotifies) PURE;
  1156. };
  1157.  
  1158. #define IDirectSoundNotify_QueryInterface(p,a,b)            IUnknown_QueryInterface(p,a,b)
  1159. #define IDirectSoundNotify_AddRef(p)                        IUnknown_AddRef(p)
  1160. #define IDirectSoundNotify_Release(p)                       IUnknown_Release(p)
  1161.  
  1162. #if !defined(__cplusplus) || defined(CINTERFACE)
  1163. #define IDirectSoundNotify_SetNotificationPositions(p,a,b)  (p)->lpVtbl->SetNotificationPositions(p,a,b)
  1164. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1165. #define IDirectSoundNotify_SetNotificationPositions(p,a,b)  (p)->SetNotificationPositions(a,b)
  1166. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1167.  
  1168. //
  1169. // IKsPropertySet
  1170. //
  1171.  
  1172. #ifndef _IKsPropertySet_
  1173. #define _IKsPropertySet_
  1174.  
  1175. #ifdef __cplusplus
  1176. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  1177. struct IKsPropertySet;
  1178. #endif // __cplusplus
  1179.  
  1180. typedef struct IKsPropertySet *LPKSPROPERTYSET;
  1181.  
  1182. #define KSPROPERTY_SUPPORT_GET  0x00000001
  1183. #define KSPROPERTY_SUPPORT_SET  0x00000002
  1184.  
  1185. DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
  1186.  
  1187. #undef INTERFACE
  1188. #define INTERFACE IKsPropertySet
  1189.  
  1190. DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
  1191. {
  1192.     // IUnknown methods
  1193.     STDMETHOD(QueryInterface)   (THIS_ REFIID, LPVOID *) PURE;
  1194.     STDMETHOD_(ULONG,AddRef)    (THIS) PURE;
  1195.     STDMETHOD_(ULONG,Release)   (THIS) PURE;
  1196.  
  1197.     // IKsPropertySet methods
  1198.     STDMETHOD(Get)              (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength,
  1199.                                        LPVOID pPropertyData, ULONG ulDataLength, PULONG pulBytesReturned) PURE;
  1200.     STDMETHOD(Set)              (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength,
  1201.                                        LPVOID pPropertyData, ULONG ulDataLength) PURE;
  1202.     STDMETHOD(QuerySupport)     (THIS_ REFGUID rguidPropSet, ULONG ulId, PULONG pulTypeSupport) PURE;
  1203. };
  1204.  
  1205. #define IKsPropertySet_QueryInterface(p,a,b)       IUnknown_QueryInterface(p,a,b)
  1206. #define IKsPropertySet_AddRef(p)                   IUnknown_AddRef(p)
  1207. #define IKsPropertySet_Release(p)                  IUnknown_Release(p)
  1208.  
  1209. #if !defined(__cplusplus) || defined(CINTERFACE)
  1210. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)        (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
  1211. #define IKsPropertySet_Set(p,a,b,c,d,e,f)          (p)->lpVtbl->Set(p,a,b,c,d,e,f)
  1212. #define IKsPropertySet_QuerySupport(p,a,b,c)       (p)->lpVtbl->QuerySupport(p,a,b,c)
  1213. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1214. #define IKsPropertySet_Get(p,a,b,c,d,e,f,g)        (p)->Get(a,b,c,d,e,f,g)
  1215. #define IKsPropertySet_Set(p,a,b,c,d,e,f)          (p)->Set(a,b,c,d,e,f)
  1216. #define IKsPropertySet_QuerySupport(p,a,b,c)       (p)->QuerySupport(a,b,c)
  1217. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1218.  
  1219. #endif // _IKsPropertySet_
  1220.  
  1221. #if DIRECTSOUND_VERSION >= 0x0800
  1222.  
  1223. //
  1224. // IDirectSoundFXGargle
  1225. //
  1226.  
  1227. DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352, 0xd622, 0x11ce, 0xaa, 0xc5, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3);
  1228.  
  1229. typedef struct _DSFXGargle
  1230. {
  1231.     DWORD       dwRateHz;               // Rate of modulation in hz
  1232.     DWORD       dwWaveShape;            // DSFXGARGLE_WAVE_xxx
  1233. } DSFXGargle, *LPDSFXGargle;
  1234.  
  1235. #define DSFXGARGLE_WAVE_TRIANGLE        0
  1236. #define DSFXGARGLE_WAVE_SQUARE          1
  1237.  
  1238. typedef const DSFXGargle *LPCDSFXGargle;
  1239.  
  1240. #define DSFXGARGLE_RATEHZ_MIN           1
  1241. #define DSFXGARGLE_RATEHZ_MAX           1000
  1242.  
  1243. #undef INTERFACE
  1244. #define INTERFACE IDirectSoundFXGargle
  1245.  
  1246. DECLARE_INTERFACE_(IDirectSoundFXGargle, IUnknown)
  1247. {
  1248.     // IUnknown methods
  1249.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1250.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1251.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1252.  
  1253.     // IDirectSoundFXGargle methods
  1254.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXGargle pcDsFxGargle) PURE;
  1255.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXGargle pDsFxGargle) PURE;
  1256. };
  1257.  
  1258. #define IDirectSoundFXGargle_QueryInterface(p,a,b)          IUnknown_QueryInterface(p,a,b)
  1259. #define IDirectSoundFXGargle_AddRef(p)                      IUnknown_AddRef(p)
  1260. #define IDirectSoundFXGargle_Release(p)                     IUnknown_Release(p)
  1261.  
  1262. #if !defined(__cplusplus) || defined(CINTERFACE)
  1263. #define IDirectSoundFXGargle_SetAllParameters(p,a)          (p)->lpVtbl->SetAllParameters(p,a)
  1264. #define IDirectSoundFXGargle_GetAllParameters(p,a)          (p)->lpVtbl->GetAllParameters(p,a)
  1265. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1266. #define IDirectSoundFXGargle_SetAllParameters(p,a)          (p)->SetAllParameters(a)
  1267. #define IDirectSoundFXGargle_GetAllParameters(p,a)          (p)->GetAllParameters(a)
  1268. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1269.  
  1270. //
  1271. // IDirectSoundFXChorus
  1272. //
  1273.  
  1274. DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3, 0x145f, 0x43e6, 0xa9, 0x34, 0xa7, 0x18, 0x06, 0xe5, 0x05, 0x47);
  1275.  
  1276. typedef struct _DSFXChorus
  1277. {
  1278.     FLOAT       fWetDryMix;
  1279.     FLOAT       fDepth;
  1280.     FLOAT       fFeedback;
  1281.     FLOAT       fFrequency;
  1282.     LONG        lWaveform;          // LFO shape; DSFXCHORUS_WAVE_xxx
  1283.     FLOAT       fDelay;
  1284.     LONG        lPhase;
  1285. } DSFXChorus, *LPDSFXChorus;
  1286.  
  1287. typedef const DSFXChorus *LPCDSFXChorus;
  1288.  
  1289. #define DSFXCHORUS_WAVE_TRIANGLE        0
  1290. #define DSFXCHORUS_WAVE_SIN             1
  1291.  
  1292. #define DSFXCHORUS_WETDRYMIX_MIN        0.0f
  1293. #define DSFXCHORUS_WETDRYMIX_MAX        100.0f
  1294. #define DSFXCHORUS_DEPTH_MIN            0.0f
  1295. #define DSFXCHORUS_DEPTH_MAX            100.0f
  1296. #define DSFXCHORUS_FEEDBACK_MIN         -99.0f
  1297. #define DSFXCHORUS_FEEDBACK_MAX         99.0f
  1298. #define DSFXCHORUS_FREQUENCY_MIN        0.0f
  1299. #define DSFXCHORUS_FREQUENCY_MAX        10.0f
  1300. #define DSFXCHORUS_DELAY_MIN            0.0f
  1301. #define DSFXCHORUS_DELAY_MAX            20.0f
  1302. #define DSFXCHORUS_PHASE_MIN            0
  1303. #define DSFXCHORUS_PHASE_MAX            4
  1304.  
  1305. #define DSFXCHORUS_PHASE_NEG_180        0
  1306. #define DSFXCHORUS_PHASE_NEG_90         1
  1307. #define DSFXCHORUS_PHASE_ZERO           2
  1308. #define DSFXCHORUS_PHASE_90             3
  1309. #define DSFXCHORUS_PHASE_180            4
  1310.  
  1311. #undef INTERFACE
  1312. #define INTERFACE IDirectSoundFXChorus
  1313.  
  1314. DECLARE_INTERFACE_(IDirectSoundFXChorus, IUnknown)
  1315. {
  1316.     // IUnknown methods
  1317.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1318.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1319.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1320.  
  1321.     // IDirectSoundFXChorus methods
  1322.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXChorus pcDsFxChorus) PURE;
  1323.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXChorus pDsFxChorus) PURE;
  1324. };
  1325.  
  1326. #define IDirectSoundFXChorus_QueryInterface(p,a,b)          IUnknown_QueryInterface(p,a,b)
  1327. #define IDirectSoundFXChorus_AddRef(p)                      IUnknown_AddRef(p)
  1328. #define IDirectSoundFXChorus_Release(p)                     IUnknown_Release(p)
  1329.  
  1330. #if !defined(__cplusplus) || defined(CINTERFACE)
  1331. #define IDirectSoundFXChorus_SetAllParameters(p,a)          (p)->lpVtbl->SetAllParameters(p,a)
  1332. #define IDirectSoundFXChorus_GetAllParameters(p,a)          (p)->lpVtbl->GetAllParameters(p,a)
  1333. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1334. #define IDirectSoundFXChorus_SetAllParameters(p,a)          (p)->SetAllParameters(a)
  1335. #define IDirectSoundFXChorus_GetAllParameters(p,a)          (p)->GetAllParameters(a)
  1336. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1337.  
  1338. //
  1339. // IDirectSoundFXFlanger
  1340. //
  1341.  
  1342. DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878, 0x2c92, 0x4072, 0x9b, 0x2c, 0xea, 0x68, 0xf5, 0x39, 0x67, 0x83);
  1343.  
  1344. typedef struct _DSFXFlanger
  1345. {
  1346.     FLOAT       fWetDryMix;
  1347.     FLOAT       fDepth;
  1348.     FLOAT       fFeedback;
  1349.     FLOAT       fFrequency;
  1350.     LONG        lWaveform;
  1351.     FLOAT       fDelay;
  1352.     LONG        lPhase;
  1353. } DSFXFlanger, *LPDSFXFlanger;
  1354.  
  1355. typedef const DSFXFlanger *LPCDSFXFlanger;
  1356.  
  1357. #define DSFXFLANGER_WAVE_TRIANGLE       0
  1358. #define DSFXFLANGER_WAVE_SIN            1
  1359.  
  1360. #define DSFXFLANGER_WETDRYMIX_MIN       0.0f
  1361. #define DSFXFLANGER_WETDRYMIX_MAX       100.0f
  1362. #define DSFXFLANGER_FREQUENCY_MIN       0.0f
  1363. #define DSFXFLANGER_FREQUENCY_MAX       10.0f
  1364. #define DSFXFLANGER_DEPTH_MIN           0.0f
  1365. #define DSFXFLANGER_DEPTH_MAX           100.0f
  1366. #define DSFXFLANGER_PHASE_MIN           0
  1367. #define DSFXFLANGER_PHASE_MAX           4
  1368. #define DSFXFLANGER_FEEDBACK_MIN        -99.0f
  1369. #define DSFXFLANGER_FEEDBACK_MAX        99.0f
  1370. #define DSFXFLANGER_DELAY_MIN           0.0f
  1371. #define DSFXFLANGER_DELAY_MAX           4.0f
  1372.  
  1373. #define DSFXFLANGER_PHASE_NEG_180       0
  1374. #define DSFXFLANGER_PHASE_NEG_90        1
  1375. #define DSFXFLANGER_PHASE_ZERO          2
  1376. #define DSFXFLANGER_PHASE_90            3
  1377. #define DSFXFLANGER_PHASE_180           4
  1378.  
  1379. #undef INTERFACE
  1380. #define INTERFACE IDirectSoundFXFlanger
  1381.  
  1382. DECLARE_INTERFACE_(IDirectSoundFXFlanger, IUnknown)
  1383. {
  1384.     // IUnknown methods
  1385.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1386.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1387.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1388.  
  1389.     // IDirectSoundFXFlanger methods
  1390.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXFlanger pcDsFxFlanger) PURE;
  1391.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXFlanger pDsFxFlanger) PURE;
  1392. };
  1393.  
  1394. #define IDirectSoundFXFlanger_QueryInterface(p,a,b)         IUnknown_QueryInterface(p,a,b)
  1395. #define IDirectSoundFXFlanger_AddRef(p)                     IUnknown_AddRef(p)
  1396. #define IDirectSoundFXFlanger_Release(p)                    IUnknown_Release(p)
  1397.  
  1398. #if !defined(__cplusplus) || defined(CINTERFACE)
  1399. #define IDirectSoundFXFlanger_SetAllParameters(p,a)         (p)->lpVtbl->SetAllParameters(p,a)
  1400. #define IDirectSoundFXFlanger_GetAllParameters(p,a)         (p)->lpVtbl->GetAllParameters(p,a)
  1401. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1402. #define IDirectSoundFXFlanger_SetAllParameters(p,a)         (p)->SetAllParameters(a)
  1403. #define IDirectSoundFXFlanger_GetAllParameters(p,a)         (p)->GetAllParameters(a)
  1404. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1405.  
  1406. //
  1407. // IDirectSoundFXEcho
  1408. //
  1409.  
  1410. DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf, 0x50db, 0x4e92, 0xa2, 0xbd, 0x44, 0x54, 0x88, 0xd1, 0xed, 0x42);
  1411.  
  1412. typedef struct _DSFXEcho
  1413. {
  1414.     FLOAT   fWetDryMix;
  1415.     FLOAT   fFeedback;
  1416.     FLOAT   fLeftDelay;
  1417.     FLOAT   fRightDelay;
  1418.     LONG    lPanDelay;
  1419. } DSFXEcho, *LPDSFXEcho;
  1420.  
  1421. typedef const DSFXEcho *LPCDSFXEcho;
  1422.  
  1423. #define DSFXECHO_WETDRYMIX_MIN      0.0f
  1424. #define DSFXECHO_WETDRYMIX_MAX      100.0f
  1425. #define DSFXECHO_FEEDBACK_MIN       0.0f
  1426. #define DSFXECHO_FEEDBACK_MAX       100.0f
  1427. #define DSFXECHO_LEFTDELAY_MIN      1.0f
  1428. #define DSFXECHO_LEFTDELAY_MAX      2000.0f
  1429. #define DSFXECHO_RIGHTDELAY_MIN     1.0f
  1430. #define DSFXECHO_RIGHTDELAY_MAX     2000.0f
  1431. #define DSFXECHO_PANDELAY_MIN       0
  1432. #define DSFXECHO_PANDELAY_MAX       1
  1433.  
  1434. #undef INTERFACE
  1435. #define INTERFACE IDirectSoundFXEcho
  1436.  
  1437. DECLARE_INTERFACE_(IDirectSoundFXEcho, IUnknown)
  1438. {
  1439.     // IUnknown methods
  1440.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1441.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1442.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1443.  
  1444.     // IDirectSoundFXEcho methods
  1445.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXEcho pcDsFxEcho) PURE;
  1446.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXEcho pDsFxEcho) PURE;
  1447. };
  1448.  
  1449. #define IDirectSoundFXEcho_QueryInterface(p,a,b)            IUnknown_QueryInterface(p,a,b)
  1450. #define IDirectSoundFXEcho_AddRef(p)                        IUnknown_AddRef(p)
  1451. #define IDirectSoundFXEcho_Release(p)                       IUnknown_Release(p)
  1452.  
  1453. #if !defined(__cplusplus) || defined(CINTERFACE)
  1454. #define IDirectSoundFXEcho_SetAllParameters(p,a)            (p)->lpVtbl->SetAllParameters(p,a)
  1455. #define IDirectSoundFXEcho_GetAllParameters(p,a)            (p)->lpVtbl->GetAllParameters(p,a)
  1456. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1457. #define IDirectSoundFXEcho_SetAllParameters(p,a)            (p)->SetAllParameters(a)
  1458. #define IDirectSoundFXEcho_GetAllParameters(p,a)            (p)->GetAllParameters(a)
  1459. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1460.  
  1461. //
  1462. // IDirectSoundFXDistortion
  1463. //
  1464.  
  1465. DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326, 0x455f, 0x4d8b, 0xbd, 0xa9, 0x8d, 0x5d, 0x3e, 0x9e, 0x3e, 0x0b);
  1466.  
  1467. typedef struct _DSFXDistortion
  1468. {
  1469.     FLOAT   fGain;
  1470.     FLOAT   fEdge;
  1471.     FLOAT   fPostEQCenterFrequency;
  1472.     FLOAT   fPostEQBandwidth;
  1473.     FLOAT   fPreLowpassCutoff;
  1474. } DSFXDistortion, *LPDSFXDistortion;
  1475.  
  1476. typedef const DSFXDistortion *LPCDSFXDistortion;
  1477.  
  1478. #define DSFXDISTORTION_GAIN_MIN                     -60.0f
  1479. #define DSFXDISTORTION_GAIN_MAX                     0.0f
  1480. #define DSFXDISTORTION_EDGE_MIN                     0.0f
  1481. #define DSFXDISTORTION_EDGE_MAX                     100.0f
  1482. #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN    100.0f
  1483. #define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX    8000.0f
  1484. #define DSFXDISTORTION_POSTEQBANDWIDTH_MIN          100.0f
  1485. #define DSFXDISTORTION_POSTEQBANDWIDTH_MAX          8000.0f
  1486. #define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN         100.0f
  1487. #define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX         8000.0f
  1488.  
  1489. #undef INTERFACE
  1490. #define INTERFACE IDirectSoundFXDistortion
  1491.  
  1492. DECLARE_INTERFACE_(IDirectSoundFXDistortion, IUnknown)
  1493. {
  1494.     // IUnknown methods
  1495.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1496.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1497.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1498.  
  1499.     // IDirectSoundFXDistortion methods
  1500.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXDistortion pcDsFxDistortion) PURE;
  1501.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXDistortion pDsFxDistortion) PURE;
  1502. };
  1503.  
  1504. #define IDirectSoundFXDistortion_QueryInterface(p,a,b)      IUnknown_QueryInterface(p,a,b)
  1505. #define IDirectSoundFXDistortion_AddRef(p)                  IUnknown_AddRef(p)
  1506. #define IDirectSoundFXDistortion_Release(p)                 IUnknown_Release(p)
  1507.  
  1508. #if !defined(__cplusplus) || defined(CINTERFACE)
  1509. #define IDirectSoundFXDistortion_SetAllParameters(p,a)      (p)->lpVtbl->SetAllParameters(p,a)
  1510. #define IDirectSoundFXDistortion_GetAllParameters(p,a)      (p)->lpVtbl->GetAllParameters(p,a)
  1511. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1512. #define IDirectSoundFXDistortion_SetAllParameters(p,a)      (p)->SetAllParameters(a)
  1513. #define IDirectSoundFXDistortion_GetAllParameters(p,a)      (p)->GetAllParameters(a)
  1514. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1515.  
  1516. //
  1517. // IDirectSoundFXCompressor
  1518. //
  1519.  
  1520. DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154, 0x62f6, 0x4e2c, 0xa1, 0x5c, 0xd3, 0xb6, 0xc4, 0x17, 0xf7, 0xa0);
  1521.  
  1522. typedef struct _DSFXCompressor
  1523. {
  1524.     FLOAT   fGain;
  1525.     FLOAT   fAttack;
  1526.     FLOAT   fRelease;
  1527.     FLOAT   fThreshold;
  1528.     FLOAT   fRatio;
  1529.     FLOAT   fPredelay;
  1530. } DSFXCompressor, *LPDSFXCompressor;
  1531.  
  1532. typedef const DSFXCompressor *LPCDSFXCompressor;
  1533.  
  1534. #define DSFXCOMPRESSOR_GAIN_MIN             -60.0f
  1535. #define DSFXCOMPRESSOR_GAIN_MAX             60.0f
  1536. #define DSFXCOMPRESSOR_ATTACK_MIN           0.01f
  1537. #define DSFXCOMPRESSOR_ATTACK_MAX           500.0f
  1538. #define DSFXCOMPRESSOR_RELEASE_MIN          50.0f
  1539. #define DSFXCOMPRESSOR_RELEASE_MAX          3000.0f
  1540. #define DSFXCOMPRESSOR_THRESHOLD_MIN        -60.0f
  1541. #define DSFXCOMPRESSOR_THRESHOLD_MAX        0.0f
  1542. #define DSFXCOMPRESSOR_RATIO_MIN            1.0f
  1543. #define DSFXCOMPRESSOR_RATIO_MAX            100.0f
  1544. #define DSFXCOMPRESSOR_PREDELAY_MIN         0.0f
  1545. #define DSFXCOMPRESSOR_PREDELAY_MAX         4.0f
  1546.  
  1547. #undef INTERFACE
  1548. #define INTERFACE IDirectSoundFXCompressor
  1549.  
  1550. DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown)
  1551. {
  1552.     // IUnknown methods
  1553.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1554.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1555.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1556.  
  1557.     // IDirectSoundFXCompressor methods
  1558.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXCompressor pcDsFxCompressor) PURE;
  1559.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXCompressor pDsFxCompressor) PURE;
  1560. };
  1561.  
  1562. #define IDirectSoundFXCompressor_QueryInterface(p,a,b)      IUnknown_QueryInterface(p,a,b)
  1563. #define IDirectSoundFXCompressor_AddRef(p)                  IUnknown_AddRef(p)
  1564. #define IDirectSoundFXCompressor_Release(p)                 IUnknown_Release(p)
  1565.  
  1566. #if !defined(__cplusplus) || defined(CINTERFACE)
  1567. #define IDirectSoundFXCompressor_SetAllParameters(p,a)      (p)->lpVtbl->SetAllParameters(p,a)
  1568. #define IDirectSoundFXCompressor_GetAllParameters(p,a)      (p)->lpVtbl->GetAllParameters(p,a)
  1569. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1570. #define IDirectSoundFXCompressor_SetAllParameters(p,a)      (p)->SetAllParameters(a)
  1571. #define IDirectSoundFXCompressor_GetAllParameters(p,a)      (p)->GetAllParameters(a)
  1572. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1573.  
  1574. //
  1575. // IDirectSoundFXParamEq
  1576. //
  1577.  
  1578. DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe, 0xfe90, 0x4204, 0x80, 0x78, 0x82, 0x33, 0x4c, 0xd1, 0x77, 0xda);
  1579.  
  1580. typedef struct _DSFXParamEq
  1581. {
  1582.     FLOAT   fCenter;
  1583.     FLOAT   fBandwidth;
  1584.     FLOAT   fGain;
  1585. } DSFXParamEq, *LPDSFXParamEq;
  1586.  
  1587. typedef const DSFXParamEq *LPCDSFXParamEq;
  1588.  
  1589. #define DSFXPARAMEQ_CENTER_MIN      80.0f
  1590. #define DSFXPARAMEQ_CENTER_MAX      16000.0f
  1591. #define DSFXPARAMEQ_BANDWIDTH_MIN   1.0f
  1592. #define DSFXPARAMEQ_BANDWIDTH_MAX   36.0f
  1593. #define DSFXPARAMEQ_GAIN_MIN        -15.0f
  1594. #define DSFXPARAMEQ_GAIN_MAX        15.0f
  1595.  
  1596. #undef INTERFACE
  1597. #define INTERFACE IDirectSoundFXParamEq
  1598.  
  1599. DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown)
  1600. {
  1601.     // IUnknown methods
  1602.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1603.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1604.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1605.  
  1606.     // IDirectSoundFXParamEq methods
  1607.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXParamEq pcDsFxParamEq) PURE;
  1608.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXParamEq pDsFxParamEq) PURE;
  1609. };
  1610.  
  1611. #define IDirectSoundFXParamEq_QueryInterface(p,a,b)      IUnknown_QueryInterface(p,a,b)
  1612. #define IDirectSoundFXParamEq_AddRef(p)                  IUnknown_AddRef(p)
  1613. #define IDirectSoundFXParamEq_Release(p)                 IUnknown_Release(p)
  1614.  
  1615. #if !defined(__cplusplus) || defined(CINTERFACE)
  1616. #define IDirectSoundFXParamEq_SetAllParameters(p,a)      (p)->lpVtbl->SetAllParameters(p,a)
  1617. #define IDirectSoundFXParamEq_GetAllParameters(p,a)      (p)->lpVtbl->GetAllParameters(p,a)
  1618. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1619. #define IDirectSoundFXParamEq_SetAllParameters(p,a)      (p)->SetAllParameters(a)
  1620. #define IDirectSoundFXParamEq_GetAllParameters(p,a)      (p)->GetAllParameters(a)
  1621. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1622.  
  1623.  
  1624. //
  1625. // IDirectSoundFXI3DL2Reverb
  1626. //
  1627.  
  1628. DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
  1629.  
  1630. typedef struct _DSFXI3DL2Reverb
  1631. {
  1632.     LONG    lRoom;                  // [-10000, 0]      default: -1000 mB
  1633.     LONG    lRoomHF;                // [-10000, 0]      default: 0 mB
  1634.     FLOAT   flRoomRolloffFactor;    // [0.0, 10.0]      default: 0.0
  1635.     FLOAT   flDecayTime;            // [0.1, 20.0]      default: 1.49s
  1636.     FLOAT   flDecayHFRatio;         // [0.1, 2.0]       default: 0.83
  1637.     LONG    lReflections;           // [-10000, 1000]   default: -2602 mB
  1638.     FLOAT   flReflectionsDelay;     // [0.0, 0.3]       default: 0.007 s
  1639.     LONG    lReverb;                // [-10000, 2000]   default: 200 mB
  1640.     FLOAT   flReverbDelay;          // [0.0, 0.1]       default: 0.011 s
  1641.     FLOAT   flDiffusion;            // [0.0, 100.0]     default: 100.0 %
  1642.     FLOAT   flDensity;              // [0.0, 100.0]     default: 100.0 %
  1643.     FLOAT   flHFReference;          // [20.0, 20000.0]  default: 5000.0 Hz
  1644. } DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb;
  1645.  
  1646. typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb;
  1647.  
  1648. #define DSFX_I3DL2REVERB_ROOM_MIN                   (-10000)
  1649. #define DSFX_I3DL2REVERB_ROOM_MAX                   0
  1650. #define DSFX_I3DL2REVERB_ROOM_DEFAULT               (-1000)
  1651.                                                     
  1652. #define DSFX_I3DL2REVERB_ROOMHF_MIN                 (-10000)
  1653. #define DSFX_I3DL2REVERB_ROOMHF_MAX                 0
  1654. #define DSFX_I3DL2REVERB_ROOMHF_DEFAULT             (-100)
  1655.                                                     
  1656. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN      0.0f
  1657. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX      10.0f
  1658. #define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT  0.0f
  1659.  
  1660. #define DSFX_I3DL2REVERB_DECAYTIME_MIN              0.1f
  1661. #define DSFX_I3DL2REVERB_DECAYTIME_MAX              20.0f
  1662. #define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT          1.49f
  1663.                                                     
  1664. #define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN           0.1f
  1665. #define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX           2.0f
  1666. #define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT       0.83f
  1667.                                                     
  1668. #define DSFX_I3DL2REVERB_REFLECTIONS_MIN            (-10000)
  1669. #define DSFX_I3DL2REVERB_REFLECTIONS_MAX            1000
  1670. #define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT        (-2602)
  1671.                                                     
  1672. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN       0.0f
  1673. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX       0.3f
  1674. #define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT   0.007f
  1675.  
  1676. #define DSFX_I3DL2REVERB_REVERB_MIN                 (-10000)
  1677. #define DSFX_I3DL2REVERB_REVERB_MAX                 2000
  1678. #define DSFX_I3DL2REVERB_REVERB_DEFAULT             (200)
  1679.                                                     
  1680. #define DSFX_I3DL2REVERB_REVERBDELAY_MIN            0.0f
  1681. #define DSFX_I3DL2REVERB_REVERBDELAY_MAX            0.1f
  1682. #define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT        0.011f
  1683.                                                     
  1684. #define DSFX_I3DL2REVERB_DIFFUSION_MIN              0.0f
  1685. #define DSFX_I3DL2REVERB_DIFFUSION_MAX              100.0f
  1686. #define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT          100.0f
  1687.                                                     
  1688. #define DSFX_I3DL2REVERB_DENSITY_MIN                0.0f
  1689. #define DSFX_I3DL2REVERB_DENSITY_MAX                100.0f
  1690. #define DSFX_I3DL2REVERB_DENSITY_DEFAULT            100.0f
  1691.                                                     
  1692. #define DSFX_I3DL2REVERB_HFREFERENCE_MIN            20.0f
  1693. #define DSFX_I3DL2REVERB_HFREFERENCE_MAX            20000.0f
  1694. #define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT        5000.0f
  1695.                                                     
  1696. #define DSFX_I3DL2REVERB_QUALITY_MIN                0
  1697. #define DSFX_I3DL2REVERB_QUALITY_MAX                3
  1698. #define DSFX_I3DL2REVERB_QUALITY_DEFAULT            2
  1699.  
  1700. #undef INTERFACE
  1701. #define INTERFACE IDirectSoundFXI3DL2Reverb
  1702.  
  1703. DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb, IUnknown)
  1704. {
  1705.     // IUnknown methods
  1706.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1707.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1708.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1709.  
  1710.     // IDirectSoundFXI3DL2Reverb methods
  1711.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXI3DL2Reverb pcDsFxI3DL2Reverb) PURE;
  1712.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXI3DL2Reverb pDsFxI3DL2Reverb) PURE;
  1713.     STDMETHOD(SetPreset)            (THIS_ DWORD dwPreset) PURE;
  1714.     STDMETHOD(GetPreset)            (THIS_ LPDWORD pdwPreset) PURE;
  1715.     STDMETHOD(SetQuality)           (THIS_ LONG lQuality) PURE;
  1716.     STDMETHOD(GetQuality)           (THIS_ LONG *plQuality) PURE;
  1717. };
  1718.  
  1719. #define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b)     IUnknown_QueryInterface(p,a,b)
  1720. #define IDirectSoundFXI3DL2Reverb_AddRef(p)                 IUnknown_AddRef(p)
  1721. #define IDirectSoundFXI3DL2Reverb_Release(p)                IUnknown_Release(p)
  1722.  
  1723. #if !defined(__cplusplus) || defined(CINTERFACE)
  1724. #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a)     (p)->lpVtbl->SetAllParameters(p,a)
  1725. #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a)     (p)->lpVtbl->GetAllParameters(p,a)
  1726. #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a)            (p)->lpVtbl->SetPreset(p,a)
  1727. #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a)            (p)->lpVtbl->GetPreset(p,a)
  1728. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1729. #define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a)     (p)->SetAllParameters(a)
  1730. #define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a)     (p)->GetAllParameters(a)
  1731. #define IDirectSoundFXI3DL2Reverb_SetPreset(p,a)            (p)->SetPreset(a)
  1732. #define IDirectSoundFXI3DL2Reverb_GetPreset(p,a)            (p)->GetPreset(a)
  1733. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1734.  
  1735.  
  1736. //
  1737. // IDirectSoundFXWavesReverb
  1738. //
  1739.  
  1740. DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
  1741.  
  1742. typedef struct _DSFXWavesReverb
  1743. {
  1744.     FLOAT   fInGain;                // [-96.0,0.0]            default: 0.0 dB
  1745.     FLOAT   fReverbMix;             // [-96.0,0.0]            default: 0.0 db
  1746.     FLOAT   fReverbTime;            // [0.001,3000.0]         default: 1000.0 ms
  1747.     FLOAT   fHighFreqRTRatio;       // [0.001,0.999]          default: 0.001
  1748. } DSFXWavesReverb, *LPDSFXWavesReverb;
  1749.  
  1750. typedef const DSFXWavesReverb *LPCDSFXWavesReverb;
  1751.  
  1752. #define DSFX_WAVESREVERB_INGAIN_MIN                 -96.0f
  1753. #define DSFX_WAVESREVERB_INGAIN_MAX                 0.0f
  1754. #define DSFX_WAVESREVERB_INGAIN_DEFAULT             0.0f
  1755. #define DSFX_WAVESREVERB_REVERBMIX_MIN              -96.0f
  1756. #define DSFX_WAVESREVERB_REVERBMIX_MAX              0.0f
  1757. #define DSFX_WAVESREVERB_REVERBMIX_DEFAULT          0.0f
  1758. #define DSFX_WAVESREVERB_REVERBTIME_MIN             0.001f
  1759. #define DSFX_WAVESREVERB_REVERBTIME_MAX             3000.0f
  1760. #define DSFX_WAVESREVERB_REVERBTIME_DEFAULT         1000.0f
  1761. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN        0.001f
  1762. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX        0.999f
  1763. #define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT    0.001f
  1764.  
  1765. #undef INTERFACE
  1766. #define INTERFACE IDirectSoundFXWavesReverb
  1767.  
  1768. DECLARE_INTERFACE_(IDirectSoundFXWavesReverb, IUnknown)
  1769. {
  1770.     // IUnknown methods
  1771.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1772.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1773.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1774.  
  1775.     // IDirectSoundFXWavesReverb methods
  1776.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSFXWavesReverb pcDsFxWavesReverb) PURE;
  1777.     STDMETHOD(GetAllParameters)     (THIS_ LPDSFXWavesReverb pDsFxWavesReverb) PURE;
  1778. };
  1779.  
  1780. #define IDirectSoundFXWavesReverb_QueryInterface(p,a,b)     IUnknown_QueryInterface(p,a,b)
  1781. #define IDirectSoundFXWavesReverb_AddRef(p)                 IUnknown_AddRef(p)
  1782. #define IDirectSoundFXWavesReverb_Release(p)                IUnknown_Release(p)
  1783.  
  1784. #if !defined(__cplusplus) || defined(CINTERFACE)
  1785. #define IDirectSoundFXWavesReverb_SetAllParameters(p,a)     (p)->lpVtbl->SetAllParameters(p,a)
  1786. #define IDirectSoundFXWavesReverb_GetAllParameters(p,a)     (p)->lpVtbl->GetAllParameters(p,a)
  1787. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1788. #define IDirectSoundFXWavesReverb_SetAllParameters(p,a)     (p)->SetAllParameters(a)
  1789. #define IDirectSoundFXWavesReverb_GetAllParameters(p,a)     (p)->GetAllParameters(a)
  1790. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1791.  
  1792. //
  1793. // IDirectSoundCaptureFXAec
  1794. //
  1795.  
  1796. DEFINE_GUID(IID_IDirectSoundCaptureFXAec, 0x174d3eb9, 0x6696, 0x4fac, 0xa4, 0x6c, 0xa0, 0xac, 0x7b, 0xc9, 0xe2, 0xf);
  1797.  
  1798. typedef struct _DSCFXAec
  1799. {
  1800.     BOOL    fEnable;
  1801.     BOOL    fReset;
  1802. } DSCFXAec, *LPDSCFXAec;
  1803.  
  1804. typedef const DSCFXAec *LPCDSCFXAec;
  1805.  
  1806. #undef INTERFACE
  1807. #define INTERFACE IDirectSoundCaptureFXAec
  1808.  
  1809. DECLARE_INTERFACE_(IDirectSoundCaptureFXAec, IUnknown)
  1810. {
  1811.     // IUnknown methods
  1812.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1813.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1814.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1815.  
  1816.     // IDirectSoundCaptureFXAec methods
  1817.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSCFXAec pDscFxAec) PURE;
  1818.     STDMETHOD(GetAllParameters)     (THIS_ LPDSCFXAec pDscFxAec) PURE;
  1819. };
  1820.  
  1821. #define IDirectSoundCaptureFXAec_QueryInterface(p,a,b)     IUnknown_QueryInterface(p,a,b)
  1822. #define IDirectSoundCaptureFXAec_AddRef(p)                 IUnknown_AddRef(p)
  1823. #define IDirectSoundCaptureFXAec_Release(p)                IUnknown_Release(p)
  1824.  
  1825. #if !defined(__cplusplus) || defined(CINTERFACE)
  1826. #define IDirectSoundCaptureFXAec_SetAllParameters(p,a)     (p)->lpVtbl->SetAllParameters(p,a)
  1827. #define IDirectSoundCaptureFXAec_GetAllParameters(p,a)     (p)->lpVtbl->GetAllParameters(p,a)
  1828. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1829. #define IDirectSoundCaptureFXAec_SetAllParameters(p,a)     (p)->SetAllParameters(a)
  1830. #define IDirectSoundCaptureFXAec_GetAllParameters(p,a)     (p)->GetAllParameters(a)
  1831. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1832.  
  1833.  
  1834. //
  1835. // IDirectSoundCaptureFXNoiseSuppress
  1836. //
  1837.  
  1838. DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress, 0xed311e41, 0xfbae, 0x4175, 0x96, 0x25, 0xcd, 0x8, 0x54, 0xf6, 0x93, 0xca);
  1839.  
  1840. typedef struct _DSCFXNoiseSuppress
  1841. {
  1842.     BOOL    fEnable;
  1843.     BOOL    fReset;
  1844. } DSCFXNoiseSuppress, *LPDSCFXNoiseSuppress;
  1845.  
  1846. typedef const DSCFXNoiseSuppress *LPCDSCFXNoiseSuppress;
  1847.  
  1848. #undef INTERFACE
  1849. #define INTERFACE IDirectSoundCaptureFXNoiseSuppress
  1850.  
  1851. DECLARE_INTERFACE_(IDirectSoundCaptureFXNoiseSuppress, IUnknown)
  1852. {
  1853.     // IUnknown methods
  1854.     STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID *) PURE;
  1855.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  1856.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  1857.  
  1858.     // IDirectSoundCaptureFXNoiseSuppress methods
  1859.     STDMETHOD(SetAllParameters)     (THIS_ LPCDSCFXNoiseSuppress pcDscFxNoiseSuppress) PURE;
  1860.     STDMETHOD(GetAllParameters)     (THIS_ LPDSCFXNoiseSuppress pDscFxNoiseSuppress) PURE;
  1861. };
  1862.  
  1863. #define IDirectSoundCaptureFXNoiseSuppress_QueryInterface(p,a,b)     IUnknown_QueryInterface(p,a,b)
  1864. #define IDirectSoundCaptureFXNoiseSuppress_AddRef(p)                 IUnknown_AddRef(p)
  1865. #define IDirectSoundCaptureFXNoiseSuppress_Release(p)                IUnknown_Release(p)
  1866.  
  1867. #if !defined(__cplusplus) || defined(CINTERFACE)
  1868. #define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a)     (p)->lpVtbl->SetAllParameters(p,a)
  1869. #define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a)     (p)->lpVtbl->GetAllParameters(p,a)
  1870. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1871. #define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a)     (p)->SetAllParameters(a)
  1872. #define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a)     (p)->GetAllParameters(a)
  1873. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1874.  
  1875.  
  1876. //
  1877. // IDirectSoundFullDuplex
  1878. //
  1879.  
  1880. #ifndef _IDirectSoundFullDuplex_
  1881. #define _IDirectSoundFullDuplex_
  1882.  
  1883. #ifdef __cplusplus
  1884. // 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
  1885. struct IDirectSoundFullDuplex;
  1886. #endif // __cplusplus
  1887.  
  1888. typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
  1889.  
  1890. DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xedcb4c7a, 0xdaab, 0x4216, 0xa4, 0x2e, 0x6c, 0x50, 0x59, 0x6d, 0xdc, 0x1d);
  1891.  
  1892. #undef INTERFACE
  1893. #define INTERFACE IDirectSoundFullDuplex
  1894.  
  1895. DECLARE_INTERFACE_(IDirectSoundFullDuplex, IUnknown)
  1896. {
  1897.     // IUnknown methods
  1898.     STDMETHOD(QueryInterface)   (THIS_ REFIID, LPVOID *) PURE;
  1899.     STDMETHOD_(ULONG,AddRef)    (THIS) PURE;
  1900.     STDMETHOD_(ULONG,Release)   (THIS) PURE;
  1901.  
  1902.     // IDirectSoundFullDuplex methods 
  1903.     STDMETHOD(Initialize)     (THIS_ LPCGUID pCaptureGuid, LPCGUID pRenderGuid, LPCDSCBUFFERDESC lpDscBufferDesc, LPCDSBUFFERDESC lpDsBufferDesc, HWND hWnd, DWORD dwLevel, LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
  1904. };
  1905.  
  1906. #define IDirectSoundFullDuplex_QueryInterface(p,a,b)    IUnknown_QueryInterface(p,a,b)
  1907. #define IDirectSoundFullDuplex_AddRef(p)                IUnknown_AddRef(p)
  1908. #define IDirectSoundFullDuplex_Release(p)               IUnknown_Release(p)
  1909.  
  1910. #if !defined(__cplusplus) || defined(CINTERFACE)
  1911. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)     (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
  1912. #else // !defined(__cplusplus) || defined(CINTERFACE)
  1913. #define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h)     (p)->Initialize(a,b,c,d,e,f,g,h)
  1914. #endif // !defined(__cplusplus) || defined(CINTERFACE)
  1915.  
  1916. #endif // _IDirectSoundFullDuplex_
  1917.  
  1918. #endif // DIRECTSOUND_VERSION >= 0x0800
  1919.  
  1920. //
  1921. // Return Codes
  1922. //
  1923.  
  1924. // The function completed successfully
  1925. #define DS_OK                           S_OK
  1926.  
  1927. // The call succeeded, but we had to substitute the 3D algorithm
  1928. #define DS_NO_VIRTUALIZATION            MAKE_HRESULT(0, _FACDS, 10)
  1929.  
  1930. // The call succeeded, but not all of the optional effects were obtained.
  1931. #define DS_INCOMPLETE                   MAKE_HRESULT(0, _FACDS, 20)
  1932.  
  1933. // The call failed because resources (such as a priority level)
  1934. // were already being used by another caller
  1935. #define DSERR_ALLOCATED                 MAKE_DSHRESULT(10)
  1936.  
  1937. // The control (vol, pan, etc.) requested by the caller is not available
  1938. #define DSERR_CONTROLUNAVAIL            MAKE_DSHRESULT(30)
  1939.  
  1940. // An invalid parameter was passed to the returning function
  1941. #define DSERR_INVALIDPARAM              E_INVALIDARG
  1942.  
  1943. // This call is not valid for the current state of this object
  1944. #define DSERR_INVALIDCALL               MAKE_DSHRESULT(50)
  1945.  
  1946. // An undetermined error occurred inside the DirectSound subsystem
  1947. #define DSERR_GENERIC                   E_FAIL
  1948.  
  1949. // The caller does not have the priority level required for the function to
  1950. // succeed
  1951. #define DSERR_PRIOLEVELNEEDED           MAKE_DSHRESULT(70)
  1952.  
  1953. // Not enough free memory is available to complete the operation
  1954. #define DSERR_OUTOFMEMORY               E_OUTOFMEMORY
  1955.  
  1956. // The specified WAVE format is not supported
  1957. #define DSERR_BADFORMAT                 MAKE_DSHRESULT(100)
  1958.  
  1959. // The function called is not supported at this time
  1960. #define DSERR_UNSUPPORTED               E_NOTIMPL
  1961.  
  1962. // No sound driver is available for use
  1963. #define DSERR_NODRIVER                  MAKE_DSHRESULT(120)
  1964.  
  1965. // This object is already initialized
  1966. #define DSERR_ALREADYINITIALIZED        MAKE_DSHRESULT(130)
  1967.  
  1968. // This object does not support aggregation
  1969. #define DSERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
  1970.  
  1971. // The buffer memory has been lost, and must be restored
  1972. #define DSERR_BUFFERLOST                MAKE_DSHRESULT(150)
  1973.  
  1974. // Another app has a higher priority level, preventing this call from
  1975. // succeeding
  1976. #define DSERR_OTHERAPPHASPRIO           MAKE_DSHRESULT(160)
  1977.  
  1978. // This object has not been initialized
  1979. #define DSERR_UNINITIALIZED             MAKE_DSHRESULT(170)
  1980.  
  1981. // The requested COM interface is not available
  1982. #define DSERR_NOINTERFACE               E_NOINTERFACE
  1983.  
  1984. // Access is denied
  1985. #define DSERR_ACCESSDENIED              E_ACCESSDENIED
  1986.  
  1987. // Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds
  1988. #define DSERR_BUFFERTOOSMALL            MAKE_DSHRESULT(180)
  1989.  
  1990. // Attempt to use DirectSound 8 functionality on an older DirectSound object
  1991. #define DSERR_DS8_REQUIRED              MAKE_DSHRESULT(190)
  1992.  
  1993. // A circular loop of send effects was detected
  1994. #define DSERR_SENDLOOP                  MAKE_DSHRESULT(200)
  1995.  
  1996. // The GUID specified in an audiopath file does not match a valid MIXIN buffer
  1997. #define DSERR_BADSENDBUFFERGUID         MAKE_DSHRESULT(210)
  1998.  
  1999. // The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)
  2000. #define DSERR_OBJECTNOTFOUND            MAKE_DSHRESULT(4449)
  2001.  
  2002. //
  2003. // Flags
  2004. //
  2005.  
  2006. #define DSCAPS_PRIMARYMONO          0x00000001
  2007. #define DSCAPS_PRIMARYSTEREO        0x00000002
  2008. #define DSCAPS_PRIMARY8BIT          0x00000004
  2009. #define DSCAPS_PRIMARY16BIT         0x00000008
  2010. #define DSCAPS_CONTINUOUSRATE       0x00000010
  2011. #define DSCAPS_EMULDRIVER           0x00000020
  2012. #define DSCAPS_CERTIFIED            0x00000040
  2013. #define DSCAPS_SECONDARYMONO        0x00000100
  2014. #define DSCAPS_SECONDARYSTEREO      0x00000200
  2015. #define DSCAPS_SECONDARY8BIT        0x00000400
  2016. #define DSCAPS_SECONDARY16BIT       0x00000800
  2017.  
  2018. #define DSSCL_NORMAL                0x00000001
  2019. #define DSSCL_PRIORITY              0x00000002
  2020. #define DSSCL_EXCLUSIVE             0x00000003
  2021. #define DSSCL_WRITEPRIMARY          0x00000004
  2022.  
  2023. #define DSSPEAKER_HEADPHONE         0x00000001
  2024. #define DSSPEAKER_MONO              0x00000002
  2025. #define DSSPEAKER_QUAD              0x00000003
  2026. #define DSSPEAKER_STEREO            0x00000004
  2027. #define DSSPEAKER_SURROUND          0x00000005
  2028. #define DSSPEAKER_5POINT1           0x00000006
  2029.  
  2030. #define DSSPEAKER_GEOMETRY_MIN      0x00000005  //   5 degrees
  2031. #define DSSPEAKER_GEOMETRY_NARROW   0x0000000A  //  10 degrees
  2032. #define DSSPEAKER_GEOMETRY_WIDE     0x00000014  //  20 degrees
  2033. #define DSSPEAKER_GEOMETRY_MAX      0x000000B4  // 180 degrees
  2034.  
  2035. #define DSSPEAKER_COMBINED(c, g)    ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
  2036. #define DSSPEAKER_CONFIG(a)         ((BYTE)(a))
  2037. #define DSSPEAKER_GEOMETRY(a)       ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
  2038.  
  2039. #define DSBCAPS_PRIMARYBUFFER       0x00000001
  2040. #define DSBCAPS_STATIC              0x00000002
  2041. #define DSBCAPS_LOCHARDWARE         0x00000004
  2042. #define DSBCAPS_LOCSOFTWARE         0x00000008
  2043. #define DSBCAPS_CTRL3D              0x00000010
  2044. #define DSBCAPS_CTRLFREQUENCY       0x00000020
  2045. #define DSBCAPS_CTRLPAN             0x00000040
  2046. #define DSBCAPS_CTRLVOLUME          0x00000080
  2047. #define DSBCAPS_CTRLPOSITIONNOTIFY  0x00000100
  2048. #define DSBCAPS_CTRLFX              0x00000200
  2049. #define DSBCAPS_STICKYFOCUS         0x00004000
  2050. #define DSBCAPS_GLOBALFOCUS         0x00008000
  2051. #define DSBCAPS_GETCURRENTPOSITION2 0x00010000
  2052. #define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
  2053. #define DSBCAPS_LOCDEFER            0x00040000
  2054.  
  2055. #define DSBPLAY_LOOPING             0x00000001
  2056. #define DSBPLAY_LOCHARDWARE         0x00000002
  2057. #define DSBPLAY_LOCSOFTWARE         0x00000004
  2058. #define DSBPLAY_TERMINATEBY_TIME    0x00000008
  2059. #define DSBPLAY_TERMINATEBY_DISTANCE    0x000000010
  2060. #define DSBPLAY_TERMINATEBY_PRIORITY    0x000000020
  2061.  
  2062. #define DSBSTATUS_PLAYING           0x00000001
  2063. #define DSBSTATUS_BUFFERLOST        0x00000002
  2064. #define DSBSTATUS_LOOPING           0x00000004
  2065. #define DSBSTATUS_LOCHARDWARE       0x00000008
  2066. #define DSBSTATUS_LOCSOFTWARE       0x00000010
  2067. #define DSBSTATUS_TERMINATED        0x00000020
  2068.  
  2069. #define DSBLOCK_FROMWRITECURSOR     0x00000001
  2070. #define DSBLOCK_ENTIREBUFFER        0x00000002
  2071.  
  2072. #define DSBFREQUENCY_MIN            100
  2073. #define DSBFREQUENCY_MAX            100000
  2074. #define DSBFREQUENCY_ORIGINAL       0
  2075.  
  2076. #define DSBPAN_LEFT                 -10000
  2077. #define DSBPAN_CENTER               0
  2078. #define DSBPAN_RIGHT                10000
  2079.  
  2080. #define DSBVOLUME_MIN               -10000
  2081. #define DSBVOLUME_MAX               0
  2082.  
  2083. #define DSBSIZE_MIN                 4
  2084. #define DSBSIZE_MAX                 0x0FFFFFFF
  2085. #define DSBSIZE_FX_MIN              150  // NOTE: Milliseconds, not bytes
  2086.  
  2087. #define DS3DMODE_NORMAL             0x00000000
  2088. #define DS3DMODE_HEADRELATIVE       0x00000001
  2089. #define DS3DMODE_DISABLE            0x00000002
  2090.  
  2091. #define DS3D_IMMEDIATE              0x00000000
  2092. #define DS3D_DEFERRED               0x00000001
  2093.  
  2094. #define DS3D_MINDISTANCEFACTOR      FLT_MIN
  2095. #define DS3D_MAXDISTANCEFACTOR      FLT_MAX
  2096. #define DS3D_DEFAULTDISTANCEFACTOR  1.0f
  2097.  
  2098. #define DS3D_MINROLLOFFFACTOR       0.0f
  2099. #define DS3D_MAXROLLOFFFACTOR       10.0f
  2100. #define DS3D_DEFAULTROLLOFFFACTOR   1.0f
  2101.  
  2102. #define DS3D_MINDOPPLERFACTOR       0.0f
  2103. #define DS3D_MAXDOPPLERFACTOR       10.0f
  2104. #define DS3D_DEFAULTDOPPLERFACTOR   1.0f
  2105.  
  2106. #define DS3D_DEFAULTMINDISTANCE     1.0f
  2107. #define DS3D_DEFAULTMAXDISTANCE     1000000000.0f
  2108.  
  2109. #define DS3D_MINCONEANGLE           0
  2110. #define DS3D_MAXCONEANGLE           360
  2111. #define DS3D_DEFAULTCONEANGLE       360
  2112.  
  2113. #define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
  2114.  
  2115. // IDirectSoundCapture attributes
  2116.  
  2117. #define DSCCAPS_EMULDRIVER          DSCAPS_EMULDRIVER
  2118. #define DSCCAPS_CERTIFIED           DSCAPS_CERTIFIED
  2119.  
  2120. // IDirectSoundCaptureBuffer attributes
  2121.  
  2122. #define DSCBCAPS_WAVEMAPPED         0x80000000
  2123.  
  2124. #if DIRECTSOUND_VERSION >= 0x0800
  2125. #define DSCBCAPS_CTRLFX             0x00000200
  2126. #endif
  2127.  
  2128.  
  2129. #define DSCBLOCK_ENTIREBUFFER       0x00000001
  2130.  
  2131. #define DSCBSTATUS_CAPTURING        0x00000001
  2132. #define DSCBSTATUS_LOOPING          0x00000002
  2133.  
  2134. #define DSCBSTART_LOOPING           0x00000001
  2135.  
  2136. #define DSBPN_OFFSETSTOP            0xFFFFFFFF
  2137.  
  2138. #define DS_CERTIFIED                0x00000000
  2139. #define DS_UNCERTIFIED              0x00000001
  2140.  
  2141. // Dsound SYSTEM resource constants
  2142. // Matches the KSAUDIO_CPU_RESOURCES_xxx_HOST_CPU values defined 
  2143. // in ksmedia.h.
  2144. #define DS_SYSTEM_RESOURCES_NO_HOST_RESOURCES  0x00000000
  2145. #define DS_SYSTEM_RESOURCES_ALL_HOST_RESOURCES 0x7FFFFFFF
  2146. #define DS_SYSTEM_RESOURCES_UNDEFINED          0x80000000
  2147.  
  2148.  
  2149. //
  2150. // I3DL2 Material Presets
  2151. //
  2152.  
  2153. enum
  2154. {
  2155.     DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW,
  2156.     DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW,
  2157.     DSFX_I3DL2_MATERIAL_PRESET_THINDOOR,
  2158.     DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR,
  2159.     DSFX_I3DL2_MATERIAL_PRESET_WOODWALL,
  2160.     DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL,
  2161.     DSFX_I3DL2_MATERIAL_PRESET_STONEWALL,
  2162.     DSFX_I3DL2_MATERIAL_PRESET_CURTAIN
  2163. };
  2164.  
  2165. #define I3DL2_MATERIAL_PRESET_SINGLEWINDOW    -2800,0.71f
  2166. #define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW    -5000,0.40f
  2167. #define I3DL2_MATERIAL_PRESET_THINDOOR        -1800,0.66f
  2168. #define I3DL2_MATERIAL_PRESET_THICKDOOR       -4400,0.64f
  2169. #define I3DL2_MATERIAL_PRESET_WOODWALL        -4000,0.50f
  2170. #define I3DL2_MATERIAL_PRESET_BRICKWALL       -5000,0.60f
  2171. #define I3DL2_MATERIAL_PRESET_STONEWALL       -6000,0.68f
  2172. #define I3DL2_MATERIAL_PRESET_CURTAIN         -1200,0.15f
  2173.  
  2174.  
  2175. enum
  2176. {
  2177.     DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT,
  2178.     DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC,
  2179.     DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL,
  2180.     DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM,
  2181.     DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM,
  2182.     DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM,
  2183.     DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM,
  2184.     DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM,
  2185.     DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL,
  2186.     DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE,
  2187.     DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA,
  2188.     DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR,
  2189.     DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY,
  2190.     DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY,
  2191.     DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR,
  2192.     DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY,
  2193.     DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST,
  2194.     DSFX_I3DL2_ENVIRONMENT_PRESET_CITY,
  2195.     DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS,
  2196.     DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY,
  2197.     DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN,
  2198.     DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT,
  2199.     DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE,
  2200.     DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER,
  2201.     DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM,
  2202.     DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM,
  2203.     DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM,
  2204.     DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL,
  2205.     DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL,
  2206.     DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE
  2207. };
  2208.  
  2209. //
  2210. // I3DL2 Reverberation Presets Values
  2211. //
  2212.  
  2213. #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
  2214. #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
  2215. #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
  2216. #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
  2217. #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
  2218. #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
  2219. #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
  2220. #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
  2221. #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
  2222. #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
  2223. #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
  2224. #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
  2225. #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
  2226. #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
  2227. #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
  2228. #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
  2229. #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
  2230. #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
  2231. #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
  2232. #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
  2233. #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
  2234. #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
  2235. #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
  2236. #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
  2237.  
  2238. //
  2239. // Examples simulating 'musical' reverb presets
  2240. //
  2241. // Name       Decay time   Description
  2242. // Small Room    1.1s      A small size room with a length of 5m or so.
  2243. // Medium Room   1.3s      A medium size room with a length of 10m or so.
  2244. // Large Room    1.5s      A large size room suitable for live performances.
  2245. // Medium Hall   1.8s      A medium size concert hall.
  2246. // Large Hall    1.8s      A large size concert hall suitable for a full orchestra.
  2247. // Plate         1.3s      A plate reverb simulation.
  2248. //
  2249.  
  2250. #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
  2251. #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
  2252. #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
  2253. #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
  2254. #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
  2255. #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
  2256.  
  2257. //
  2258. // DirectSound3D Algorithms
  2259. //
  2260.  
  2261. // Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000}
  2262. #define DS3DALG_DEFAULT GUID_NULL
  2263.  
  2264. // No virtualization (Pan3D) {C241333F-1C1B-11d2-94F5-00C04FC28ACA}
  2265. DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2266.  
  2267. // High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA}
  2268. DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2269.  
  2270. // Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA}
  2271. DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  2272.  
  2273.  
  2274. #if DIRECTSOUND_VERSION >= 0x0800
  2275.  
  2276. //
  2277. // DirectSound Internal Effect Algorithms
  2278. //
  2279.  
  2280.  
  2281. // Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF}
  2282. DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xdafd8210, 0x5711, 0x4b91, 0x9f, 0xe3, 0xf7, 0x5b, 0x7a, 0xe2, 0x79, 0xbf);
  2283.  
  2284. // Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6}
  2285. DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xefe6629c, 0x81f7, 0x4281, 0xbd, 0x91, 0xc9, 0xd6, 0x04, 0xa9, 0x5a, 0xf6);
  2286.  
  2287. // Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98}
  2288. DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xefca3d92, 0xdfd8, 0x4672, 0xa6, 0x03, 0x74, 0x20, 0x89, 0x4b, 0xad, 0x98);
  2289.  
  2290. // Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}
  2291. DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xef3e932c, 0xd40b, 0x4f51, 0x8c, 0xcf, 0x3f, 0x98, 0xf1, 0xb2, 0x9d, 0x5d);
  2292.  
  2293. // Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21}
  2294. DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xef114c90, 0xcd1d, 0x484e, 0x96, 0xe5, 0x09, 0xcf, 0xaf, 0x91, 0x2a, 0x21);
  2295.  
  2296. // Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57}
  2297. DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xef011f79, 0x4000, 0x406d, 0x87, 0xaf, 0xbf, 0xfb, 0x3f, 0xc3, 0x9d, 0x57);
  2298.  
  2299. // Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231}
  2300. DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120ced89, 0x3bf4, 0x4173, 0xa1, 0x32, 0x3c, 0xb4, 0x06, 0xcf, 0x32, 0x31);
  2301.  
  2302.  
  2303. // I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}
  2304. DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xef985e71, 0xd5c7, 0x42d4, 0xba, 0x4d, 0x2d, 0x07, 0x3e, 0x2e, 0x96, 0xf4);
  2305.  
  2306. // Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C}
  2307. DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87fc0268, 0x9a55, 0x4360, 0x95, 0xaa, 0x00, 0x4a, 0x1d, 0x9d, 0xe2, 0x6c);
  2308.  
  2309. //
  2310. // DirectSound Capture Effect Algorithms
  2311. //
  2312.  
  2313.  
  2314. // Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1}
  2315. // Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h
  2316. DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
  2317.  
  2318. // Microsoft AEC {CDEBB919-379A-488a-8765-F53CFD36DE40}
  2319. DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xcdebb919, 0x379a, 0x488a, 0x87, 0x65, 0xf5, 0x3c, 0xfd, 0x36, 0xde, 0x40);
  2320.  
  2321. // System AEC {1C22C56D-9879-4f5b-A389-27996DDC2810}
  2322. DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1c22c56d, 0x9879, 0x4f5b, 0xa3, 0x89, 0x27, 0x99, 0x6d, 0xdc, 0x28, 0x10);
  2323.  
  2324. // Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5}
  2325. // Matches KSNODETYPE_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h
  2326. DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5);
  2327.  
  2328. // Microsoft Noise Suppresion {11C5C73B-66E9-4ba1-A0BA-E814C6EED92D}
  2329. DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11c5c73b, 0x66e9, 0x4ba1, 0xa0, 0xba, 0xe8, 0x14, 0xc6, 0xee, 0xd9, 0x2d);
  2330.  
  2331. // System Noise Suppresion {5AB0882E-7274-4516-877D-4EEE99BA4FD0}
  2332. DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e, 0xee, 0x99, 0xba, 0x4f, 0xd0);
  2333.  
  2334.  
  2335. #endif // DIRECTSOUND_VERSION >= 0x0800
  2336.  
  2337. #endif // __DSOUND_INCLUDED__
  2338.  
  2339.  
  2340.  
  2341. #ifdef __cplusplus
  2342. };
  2343. #endif // __cplusplus
  2344.  
  2345.  
  2346.