Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dsound.h 106KB

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