dsound.h 109 KB

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