🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

1491 lines
48 KiB

  1. #ifndef EAX_API_INCLUDED
  2. #define EAX_API_INCLUDED
  3. //
  4. // EAX API.
  5. //
  6. // Based on headers `eax[2-5].h` included in Doom 3 source code:
  7. // https://github.com/id-Software/DOOM-3/tree/master/neo/openal/include
  8. //
  9. #include <cfloat>
  10. #include <cstdint>
  11. #include <cstring>
  12. #include <array>
  13. #include "AL/al.h"
  14. #ifndef GUID_DEFINED
  15. #define GUID_DEFINED
  16. typedef struct _GUID {
  17. std::uint32_t Data1;
  18. std::uint16_t Data2;
  19. std::uint16_t Data3;
  20. std::uint8_t Data4[8];
  21. } GUID;
  22. inline bool operator==(const GUID& lhs, const GUID& rhs) noexcept
  23. { return std::memcmp(&lhs, &rhs, sizeof(GUID)) == 0; }
  24. inline bool operator!=(const GUID& lhs, const GUID& rhs) noexcept
  25. { return !(lhs == rhs); }
  26. #endif // GUID_DEFINED
  27. extern const GUID DSPROPSETID_EAX_ReverbProperties;
  28. enum DSPROPERTY_EAX_REVERBPROPERTY : unsigned int {
  29. DSPROPERTY_EAX_ALL,
  30. DSPROPERTY_EAX_ENVIRONMENT,
  31. DSPROPERTY_EAX_VOLUME,
  32. DSPROPERTY_EAX_DECAYTIME,
  33. DSPROPERTY_EAX_DAMPING,
  34. }; // DSPROPERTY_EAX_REVERBPROPERTY
  35. struct EAX_REVERBPROPERTIES {
  36. unsigned long environment;
  37. float fVolume;
  38. float fDecayTime_sec;
  39. float fDamping;
  40. }; // EAX_REVERBPROPERTIES
  41. extern const GUID DSPROPSETID_EAXBUFFER_ReverbProperties;
  42. enum DSPROPERTY_EAXBUFFER_REVERBPROPERTY : unsigned int {
  43. DSPROPERTY_EAXBUFFER_ALL,
  44. DSPROPERTY_EAXBUFFER_REVERBMIX,
  45. }; // DSPROPERTY_EAXBUFFER_REVERBPROPERTY
  46. struct EAXBUFFER_REVERBPROPERTIES {
  47. float fMix;
  48. };
  49. constexpr auto EAX_BUFFER_MINREVERBMIX = 0.0F;
  50. constexpr auto EAX_BUFFER_MAXREVERBMIX = 1.0F;
  51. constexpr auto EAX_REVERBMIX_USEDISTANCE = -1.0F;
  52. extern const GUID DSPROPSETID_EAX20_ListenerProperties;
  53. enum DSPROPERTY_EAX20_LISTENERPROPERTY : unsigned int {
  54. DSPROPERTY_EAX20LISTENER_NONE,
  55. DSPROPERTY_EAX20LISTENER_ALLPARAMETERS,
  56. DSPROPERTY_EAX20LISTENER_ROOM,
  57. DSPROPERTY_EAX20LISTENER_ROOMHF,
  58. DSPROPERTY_EAX20LISTENER_ROOMROLLOFFFACTOR,
  59. DSPROPERTY_EAX20LISTENER_DECAYTIME,
  60. DSPROPERTY_EAX20LISTENER_DECAYHFRATIO,
  61. DSPROPERTY_EAX20LISTENER_REFLECTIONS,
  62. DSPROPERTY_EAX20LISTENER_REFLECTIONSDELAY,
  63. DSPROPERTY_EAX20LISTENER_REVERB,
  64. DSPROPERTY_EAX20LISTENER_REVERBDELAY,
  65. DSPROPERTY_EAX20LISTENER_ENVIRONMENT,
  66. DSPROPERTY_EAX20LISTENER_ENVIRONMENTSIZE,
  67. DSPROPERTY_EAX20LISTENER_ENVIRONMENTDIFFUSION,
  68. DSPROPERTY_EAX20LISTENER_AIRABSORPTIONHF,
  69. DSPROPERTY_EAX20LISTENER_FLAGS
  70. }; // DSPROPERTY_EAX20_LISTENERPROPERTY
  71. struct EAX20LISTENERPROPERTIES {
  72. long lRoom; // room effect level at low frequencies
  73. long lRoomHF; // room effect high-frequency level re. low frequency level
  74. float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
  75. float flDecayTime; // reverberation decay time at low frequencies
  76. float flDecayHFRatio; // high-frequency to low-frequency decay time ratio
  77. long lReflections; // early reflections level relative to room effect
  78. float flReflectionsDelay; // initial reflection delay time
  79. long lReverb; // late reverberation level relative to room effect
  80. float flReverbDelay; // late reverberation delay time relative to initial reflection
  81. unsigned long dwEnvironment; // sets all listener properties
  82. float flEnvironmentSize; // environment size in meters
  83. float flEnvironmentDiffusion; // environment diffusion
  84. float flAirAbsorptionHF; // change in level per meter at 5 kHz
  85. unsigned long dwFlags; // modifies the behavior of properties
  86. }; // EAX20LISTENERPROPERTIES
  87. enum : unsigned long {
  88. EAX2_ENVIRONMENT_GENERIC,
  89. EAX2_ENVIRONMENT_PADDEDCELL,
  90. EAX2_ENVIRONMENT_ROOM,
  91. EAX2_ENVIRONMENT_BATHROOM,
  92. EAX2_ENVIRONMENT_LIVINGROOM,
  93. EAX2_ENVIRONMENT_STONEROOM,
  94. EAX2_ENVIRONMENT_AUDITORIUM,
  95. EAX2_ENVIRONMENT_CONCERTHALL,
  96. EAX2_ENVIRONMENT_CAVE,
  97. EAX2_ENVIRONMENT_ARENA,
  98. EAX2_ENVIRONMENT_HANGAR,
  99. EAX2_ENVIRONMENT_CARPETEDHALLWAY,
  100. EAX2_ENVIRONMENT_HALLWAY,
  101. EAX2_ENVIRONMENT_STONECORRIDOR,
  102. EAX2_ENVIRONMENT_ALLEY,
  103. EAX2_ENVIRONMENT_FOREST,
  104. EAX2_ENVIRONMENT_CITY,
  105. EAX2_ENVIRONMENT_MOUNTAINS,
  106. EAX2_ENVIRONMENT_QUARRY,
  107. EAX2_ENVIRONMENT_PLAIN,
  108. EAX2_ENVIRONMENT_PARKINGLOT,
  109. EAX2_ENVIRONMENT_SEWERPIPE,
  110. EAX2_ENVIRONMENT_UNDERWATER,
  111. EAX2_ENVIRONMENT_DRUGGED,
  112. EAX2_ENVIRONMENT_DIZZY,
  113. EAX2_ENVIRONMENT_PSYCHOTIC,
  114. EAX2_ENVIRONMENT_COUNT,
  115. };
  116. constexpr auto EAX2LISTENERFLAGS_DECAYTIMESCALE = 0x00000001UL;
  117. constexpr auto EAX2LISTENERFLAGS_REFLECTIONSSCALE = 0x00000002UL;
  118. constexpr auto EAX2LISTENERFLAGS_REFLECTIONSDELAYSCALE = 0x00000004UL;
  119. constexpr auto EAX2LISTENERFLAGS_REVERBSCALE = 0x00000008UL;
  120. constexpr auto EAX2LISTENERFLAGS_REVERBDELAYSCALE = 0x00000010UL;
  121. constexpr auto EAX2LISTENERFLAGS_DECAYHFLIMIT = 0x00000020UL;
  122. constexpr auto EAX2LISTENERFLAGS_RESERVED = 0xFFFFFFC0UL;
  123. constexpr auto EAX2LISTENER_MINROOM = -10'000L;
  124. constexpr auto EAX2LISTENER_MAXROOM = 0L;
  125. constexpr auto EAX2LISTENER_DEFAULTROOM = -1'000L;
  126. constexpr auto EAX2LISTENER_MINROOMHF = -10'000L;
  127. constexpr auto EAX2LISTENER_MAXROOMHF = 0L;
  128. constexpr auto EAX2LISTENER_DEFAULTROOMHF = -100L;
  129. constexpr auto EAX2LISTENER_MINROOMROLLOFFFACTOR = 0.0F;
  130. constexpr auto EAX2LISTENER_MAXROOMROLLOFFFACTOR = 10.0F;
  131. constexpr auto EAX2LISTENER_DEFAULTROOMROLLOFFFACTOR = 0.0F;
  132. constexpr auto EAX2LISTENER_MINDECAYTIME = 0.1F;
  133. constexpr auto EAX2LISTENER_MAXDECAYTIME = 20.0F;
  134. constexpr auto EAX2LISTENER_DEFAULTDECAYTIME = 1.49F;
  135. constexpr auto EAX2LISTENER_MINDECAYHFRATIO = 0.1F;
  136. constexpr auto EAX2LISTENER_MAXDECAYHFRATIO = 2.0F;
  137. constexpr auto EAX2LISTENER_DEFAULTDECAYHFRATIO = 0.83F;
  138. constexpr auto EAX2LISTENER_MINREFLECTIONS = -10'000L;
  139. constexpr auto EAX2LISTENER_MAXREFLECTIONS = 1'000L;
  140. constexpr auto EAX2LISTENER_DEFAULTREFLECTIONS = -2'602L;
  141. constexpr auto EAX2LISTENER_MINREFLECTIONSDELAY = 0.0F;
  142. constexpr auto EAX2LISTENER_MAXREFLECTIONSDELAY = 0.3F;
  143. constexpr auto EAX2LISTENER_DEFAULTREFLECTIONSDELAY = 0.007F;
  144. constexpr auto EAX2LISTENER_MINREVERB = -10'000L;
  145. constexpr auto EAX2LISTENER_MAXREVERB = 2'000L;
  146. constexpr auto EAX2LISTENER_DEFAULTREVERB = 200L;
  147. constexpr auto EAX2LISTENER_MINREVERBDELAY = 0.0F;
  148. constexpr auto EAX2LISTENER_MAXREVERBDELAY = 0.1F;
  149. constexpr auto EAX2LISTENER_DEFAULTREVERBDELAY = 0.011F;
  150. constexpr auto EAX2LISTENER_MINENVIRONMENT = 0UL;
  151. constexpr auto EAX2LISTENER_MAXENVIRONMENT = EAX2_ENVIRONMENT_COUNT - 1;
  152. constexpr auto EAX2LISTENER_DEFAULTENVIRONMENT = EAX2_ENVIRONMENT_GENERIC;
  153. constexpr auto EAX2LISTENER_MINENVIRONMENTSIZE = 1.0F;
  154. constexpr auto EAX2LISTENER_MAXENVIRONMENTSIZE = 100.0F;
  155. constexpr auto EAX2LISTENER_DEFAULTENVIRONMENTSIZE = 7.5F;
  156. constexpr auto EAX2LISTENER_MINENVIRONMENTDIFFUSION = 0.0F;
  157. constexpr auto EAX2LISTENER_MAXENVIRONMENTDIFFUSION = 1.0F;
  158. constexpr auto EAX2LISTENER_DEFAULTENVIRONMENTDIFFUSION = 1.0F;
  159. constexpr auto EAX2LISTENER_MINAIRABSORPTIONHF = -100.0F;
  160. constexpr auto EAX2LISTENER_MAXAIRABSORPTIONHF = 0.0F;
  161. constexpr auto EAX2LISTENER_DEFAULTAIRABSORPTIONHF = -5.0F;
  162. constexpr auto EAX2LISTENER_DEFAULTFLAGS =
  163. EAX2LISTENERFLAGS_DECAYTIMESCALE |
  164. EAX2LISTENERFLAGS_REFLECTIONSSCALE |
  165. EAX2LISTENERFLAGS_REFLECTIONSDELAYSCALE |
  166. EAX2LISTENERFLAGS_REVERBSCALE |
  167. EAX2LISTENERFLAGS_REVERBDELAYSCALE |
  168. EAX2LISTENERFLAGS_DECAYHFLIMIT;
  169. extern const GUID DSPROPSETID_EAX20_BufferProperties;
  170. enum DSPROPERTY_EAX20_BUFFERPROPERTY : unsigned int {
  171. DSPROPERTY_EAX20BUFFER_NONE,
  172. DSPROPERTY_EAX20BUFFER_ALLPARAMETERS,
  173. DSPROPERTY_EAX20BUFFER_DIRECT,
  174. DSPROPERTY_EAX20BUFFER_DIRECTHF,
  175. DSPROPERTY_EAX20BUFFER_ROOM,
  176. DSPROPERTY_EAX20BUFFER_ROOMHF,
  177. DSPROPERTY_EAX20BUFFER_ROOMROLLOFFFACTOR,
  178. DSPROPERTY_EAX20BUFFER_OBSTRUCTION,
  179. DSPROPERTY_EAX20BUFFER_OBSTRUCTIONLFRATIO,
  180. DSPROPERTY_EAX20BUFFER_OCCLUSION,
  181. DSPROPERTY_EAX20BUFFER_OCCLUSIONLFRATIO,
  182. DSPROPERTY_EAX20BUFFER_OCCLUSIONROOMRATIO,
  183. DSPROPERTY_EAX20BUFFER_OUTSIDEVOLUMEHF,
  184. DSPROPERTY_EAX20BUFFER_AIRABSORPTIONFACTOR,
  185. DSPROPERTY_EAX20BUFFER_FLAGS
  186. }; // DSPROPERTY_EAX20_BUFFERPROPERTY
  187. struct EAX20BUFFERPROPERTIES {
  188. long lDirect; // direct path level
  189. long lDirectHF; // direct path level at high frequencies
  190. long lRoom; // room effect level
  191. long lRoomHF; // room effect level at high frequencies
  192. float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
  193. long lObstruction; // main obstruction control (attenuation at high frequencies)
  194. float flObstructionLFRatio; // obstruction low-frequency level re. main control
  195. long lOcclusion; // main occlusion control (attenuation at high frequencies)
  196. float flOcclusionLFRatio; // occlusion low-frequency level re. main control
  197. float flOcclusionRoomRatio; // occlusion room effect level re. main control
  198. long lOutsideVolumeHF; // outside sound cone level at high frequencies
  199. float flAirAbsorptionFactor; // multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF
  200. unsigned long dwFlags; // modifies the behavior of properties
  201. }; // EAX20BUFFERPROPERTIES
  202. extern const GUID DSPROPSETID_EAX30_ListenerProperties;
  203. extern const GUID DSPROPSETID_EAX30_BufferProperties;
  204. constexpr auto EAX_MAX_FXSLOTS = 4;
  205. constexpr auto EAX40_MAX_ACTIVE_FXSLOTS = 2;
  206. constexpr auto EAX50_MAX_ACTIVE_FXSLOTS = 4;
  207. constexpr auto EAX_OK = 0L;
  208. constexpr auto EAXERR_INVALID_OPERATION = -1L;
  209. constexpr auto EAXERR_INVALID_VALUE = -2L;
  210. constexpr auto EAXERR_NO_EFFECT_LOADED = -3L;
  211. constexpr auto EAXERR_UNKNOWN_EFFECT = -4L;
  212. constexpr auto EAXERR_INCOMPATIBLE_SOURCE_TYPE = -5L;
  213. constexpr auto EAXERR_INCOMPATIBLE_EAX_VERSION = -6L;
  214. extern const GUID EAX_NULL_GUID;
  215. extern const GUID EAX_PrimaryFXSlotID;
  216. struct EAXVECTOR {
  217. float x;
  218. float y;
  219. float z;
  220. }; // EAXVECTOR
  221. inline bool operator==(const EAXVECTOR& lhs, const EAXVECTOR& rhs) noexcept
  222. { return std::memcmp(&lhs, &rhs, sizeof(EAXVECTOR)) == 0; }
  223. inline bool operator!=(const EAXVECTOR& lhs, const EAXVECTOR& rhs) noexcept
  224. { return !(lhs == rhs); }
  225. extern const GUID EAXPROPERTYID_EAX40_Context;
  226. extern const GUID EAXPROPERTYID_EAX50_Context;
  227. // EAX50
  228. enum : unsigned long
  229. {
  230. HEADPHONES = 0,
  231. SPEAKERS_2,
  232. SPEAKERS_4,
  233. SPEAKERS_5, // 5.1 speakers
  234. SPEAKERS_6, // 6.1 speakers
  235. SPEAKERS_7, // 7.1 speakers
  236. };
  237. // EAX50
  238. enum : unsigned long {
  239. EAX_40 = 5, // EAX 4.0
  240. EAX_50 = 6, // EAX 5.0
  241. };
  242. constexpr auto EAXCONTEXT_MINEAXSESSION = EAX_40;
  243. constexpr auto EAXCONTEXT_MAXEAXSESSION = EAX_50;
  244. constexpr auto EAXCONTEXT_DEFAULTEAXSESSION = EAX_40;
  245. constexpr auto EAXCONTEXT_MINMAXACTIVESENDS = 2UL;
  246. constexpr auto EAXCONTEXT_MAXMAXACTIVESENDS = 4UL;
  247. constexpr auto EAXCONTEXT_DEFAULTMAXACTIVESENDS = 2UL;
  248. // EAX50
  249. struct EAXSESSIONPROPERTIES {
  250. unsigned long ulEAXVersion;
  251. unsigned long ulMaxActiveSends;
  252. }; // EAXSESSIONPROPERTIES
  253. enum EAXCONTEXT_PROPERTY : unsigned int {
  254. EAXCONTEXT_NONE = 0,
  255. EAXCONTEXT_ALLPARAMETERS,
  256. EAXCONTEXT_PRIMARYFXSLOTID,
  257. EAXCONTEXT_DISTANCEFACTOR,
  258. EAXCONTEXT_AIRABSORPTIONHF,
  259. EAXCONTEXT_HFREFERENCE,
  260. EAXCONTEXT_LASTERROR,
  261. // EAX50
  262. EAXCONTEXT_SPEAKERCONFIG,
  263. EAXCONTEXT_EAXSESSION,
  264. EAXCONTEXT_MACROFXFACTOR,
  265. }; // EAXCONTEXT_PROPERTY
  266. struct EAX40CONTEXTPROPERTIES {
  267. GUID guidPrimaryFXSlotID;
  268. float flDistanceFactor;
  269. float flAirAbsorptionHF;
  270. float flHFReference;
  271. }; // EAX40CONTEXTPROPERTIES
  272. struct EAX50CONTEXTPROPERTIES : public EAX40CONTEXTPROPERTIES {
  273. float flMacroFXFactor;
  274. }; // EAX50CONTEXTPROPERTIES
  275. constexpr auto EAXCONTEXT_MINDISTANCEFACTOR = FLT_MIN;
  276. constexpr auto EAXCONTEXT_MAXDISTANCEFACTOR = FLT_MAX;
  277. constexpr auto EAXCONTEXT_DEFAULTDISTANCEFACTOR = 1.0F;
  278. constexpr auto EAXCONTEXT_MINAIRABSORPTIONHF = -100.0F;
  279. constexpr auto EAXCONTEXT_MAXAIRABSORPTIONHF = 0.0F;
  280. constexpr auto EAXCONTEXT_DEFAULTAIRABSORPTIONHF = -5.0F;
  281. constexpr auto EAXCONTEXT_MINHFREFERENCE = 1000.0F;
  282. constexpr auto EAXCONTEXT_MAXHFREFERENCE = 20000.0F;
  283. constexpr auto EAXCONTEXT_DEFAULTHFREFERENCE = 5000.0F;
  284. constexpr auto EAXCONTEXT_MINMACROFXFACTOR = 0.0F;
  285. constexpr auto EAXCONTEXT_MAXMACROFXFACTOR = 1.0F;
  286. constexpr auto EAXCONTEXT_DEFAULTMACROFXFACTOR = 0.0F;
  287. extern const GUID EAXPROPERTYID_EAX40_FXSlot0;
  288. extern const GUID EAXPROPERTYID_EAX50_FXSlot0;
  289. extern const GUID EAXPROPERTYID_EAX40_FXSlot1;
  290. extern const GUID EAXPROPERTYID_EAX50_FXSlot1;
  291. extern const GUID EAXPROPERTYID_EAX40_FXSlot2;
  292. extern const GUID EAXPROPERTYID_EAX50_FXSlot2;
  293. extern const GUID EAXPROPERTYID_EAX40_FXSlot3;
  294. extern const GUID EAXPROPERTYID_EAX50_FXSlot3;
  295. extern const GUID EAXCONTEXT_DEFAULTPRIMARYFXSLOTID;
  296. enum EAXFXSLOT_PROPERTY : unsigned int {
  297. EAXFXSLOT_PARAMETER = 0,
  298. EAXFXSLOT_NONE = 0x10000,
  299. EAXFXSLOT_ALLPARAMETERS,
  300. EAXFXSLOT_LOADEFFECT,
  301. EAXFXSLOT_VOLUME,
  302. EAXFXSLOT_LOCK,
  303. EAXFXSLOT_FLAGS,
  304. // EAX50
  305. EAXFXSLOT_OCCLUSION,
  306. EAXFXSLOT_OCCLUSIONLFRATIO,
  307. }; // EAXFXSLOT_PROPERTY
  308. constexpr auto EAXFXSLOTFLAGS_ENVIRONMENT = 0x00000001UL;
  309. // EAX50
  310. constexpr auto EAXFXSLOTFLAGS_UPMIX = 0x00000002UL;
  311. constexpr auto EAX40FXSLOTFLAGS_RESERVED = 0xFFFFFFFEUL; // reserved future use
  312. constexpr auto EAX50FXSLOTFLAGS_RESERVED = 0xFFFFFFFCUL; // reserved future use
  313. constexpr auto EAXFXSLOT_MINVOLUME = -10'000L;
  314. constexpr auto EAXFXSLOT_MAXVOLUME = 0L;
  315. constexpr auto EAXFXSLOT_DEFAULTVOLUME = 0L;
  316. constexpr auto EAXFXSLOT_MINLOCK = 0L;
  317. constexpr auto EAXFXSLOT_MAXLOCK = 1L;
  318. enum : long {
  319. EAXFXSLOT_UNLOCKED = 0,
  320. EAXFXSLOT_LOCKED = 1
  321. };
  322. constexpr auto EAXFXSLOT_MINOCCLUSION = -10'000L;
  323. constexpr auto EAXFXSLOT_MAXOCCLUSION = 0L;
  324. constexpr auto EAXFXSLOT_DEFAULTOCCLUSION = 0L;
  325. constexpr auto EAXFXSLOT_MINOCCLUSIONLFRATIO = 0.0F;
  326. constexpr auto EAXFXSLOT_MAXOCCLUSIONLFRATIO = 1.0F;
  327. constexpr auto EAXFXSLOT_DEFAULTOCCLUSIONLFRATIO = 0.25F;
  328. constexpr auto EAX40FXSLOT_DEFAULTFLAGS = EAXFXSLOTFLAGS_ENVIRONMENT;
  329. constexpr auto EAX50FXSLOT_DEFAULTFLAGS =
  330. EAXFXSLOTFLAGS_ENVIRONMENT |
  331. EAXFXSLOTFLAGS_UPMIX; // ignored for reverb;
  332. struct EAX40FXSLOTPROPERTIES {
  333. GUID guidLoadEffect;
  334. long lVolume;
  335. long lLock;
  336. unsigned long ulFlags;
  337. }; // EAX40FXSLOTPROPERTIES
  338. struct EAX50FXSLOTPROPERTIES : public EAX40FXSLOTPROPERTIES {
  339. long lOcclusion;
  340. float flOcclusionLFRatio;
  341. }; // EAX50FXSLOTPROPERTIES
  342. extern const GUID EAXPROPERTYID_EAX40_Source;
  343. extern const GUID EAXPROPERTYID_EAX50_Source;
  344. // Source object properties
  345. enum EAXSOURCE_PROPERTY : unsigned int {
  346. // EAX30
  347. EAXSOURCE_NONE,
  348. EAXSOURCE_ALLPARAMETERS,
  349. EAXSOURCE_OBSTRUCTIONPARAMETERS,
  350. EAXSOURCE_OCCLUSIONPARAMETERS,
  351. EAXSOURCE_EXCLUSIONPARAMETERS,
  352. EAXSOURCE_DIRECT,
  353. EAXSOURCE_DIRECTHF,
  354. EAXSOURCE_ROOM,
  355. EAXSOURCE_ROOMHF,
  356. EAXSOURCE_OBSTRUCTION,
  357. EAXSOURCE_OBSTRUCTIONLFRATIO,
  358. EAXSOURCE_OCCLUSION,
  359. EAXSOURCE_OCCLUSIONLFRATIO,
  360. EAXSOURCE_OCCLUSIONROOMRATIO,
  361. EAXSOURCE_OCCLUSIONDIRECTRATIO,
  362. EAXSOURCE_EXCLUSION,
  363. EAXSOURCE_EXCLUSIONLFRATIO,
  364. EAXSOURCE_OUTSIDEVOLUMEHF,
  365. EAXSOURCE_DOPPLERFACTOR,
  366. EAXSOURCE_ROLLOFFFACTOR,
  367. EAXSOURCE_ROOMROLLOFFFACTOR,
  368. EAXSOURCE_AIRABSORPTIONFACTOR,
  369. EAXSOURCE_FLAGS,
  370. // EAX40
  371. EAXSOURCE_SENDPARAMETERS,
  372. EAXSOURCE_ALLSENDPARAMETERS,
  373. EAXSOURCE_OCCLUSIONSENDPARAMETERS,
  374. EAXSOURCE_EXCLUSIONSENDPARAMETERS,
  375. EAXSOURCE_ACTIVEFXSLOTID,
  376. // EAX50
  377. EAXSOURCE_MACROFXFACTOR,
  378. EAXSOURCE_SPEAKERLEVELS,
  379. EAXSOURCE_ALL2DPARAMETERS,
  380. }; // EAXSOURCE_PROPERTY
  381. constexpr auto EAXSOURCEFLAGS_DIRECTHFAUTO = 0x00000001UL; // relates to EAXSOURCE_DIRECTHF
  382. constexpr auto EAXSOURCEFLAGS_ROOMAUTO = 0x00000002UL; // relates to EAXSOURCE_ROOM
  383. constexpr auto EAXSOURCEFLAGS_ROOMHFAUTO = 0x00000004UL; // relates to EAXSOURCE_ROOMHF
  384. // EAX50
  385. constexpr auto EAXSOURCEFLAGS_3DELEVATIONFILTER = 0x00000008UL;
  386. constexpr auto EAXSOURCEFLAGS_UPMIX = 0x00000010UL;
  387. constexpr auto EAXSOURCEFLAGS_APPLYSPEAKERLEVELS = 0x00000020UL;
  388. constexpr auto EAX20SOURCEFLAGS_RESERVED = 0xFFFFFFF8UL; // reserved future use
  389. constexpr auto EAX50SOURCEFLAGS_RESERVED = 0xFFFFFFC0UL; // reserved future use
  390. constexpr auto EAXSOURCE_MINSEND = -10'000L;
  391. constexpr auto EAXSOURCE_MAXSEND = 0L;
  392. constexpr auto EAXSOURCE_DEFAULTSEND = 0L;
  393. constexpr auto EAXSOURCE_MINSENDHF = -10'000L;
  394. constexpr auto EAXSOURCE_MAXSENDHF = 0L;
  395. constexpr auto EAXSOURCE_DEFAULTSENDHF = 0L;
  396. constexpr auto EAXSOURCE_MINDIRECT = -10'000L;
  397. constexpr auto EAXSOURCE_MAXDIRECT = 1'000L;
  398. constexpr auto EAXSOURCE_DEFAULTDIRECT = 0L;
  399. constexpr auto EAXSOURCE_MINDIRECTHF = -10'000L;
  400. constexpr auto EAXSOURCE_MAXDIRECTHF = 0L;
  401. constexpr auto EAXSOURCE_DEFAULTDIRECTHF = 0L;
  402. constexpr auto EAXSOURCE_MINROOM = -10'000L;
  403. constexpr auto EAXSOURCE_MAXROOM = 1'000L;
  404. constexpr auto EAXSOURCE_DEFAULTROOM = 0L;
  405. constexpr auto EAXSOURCE_MINROOMHF = -10'000L;
  406. constexpr auto EAXSOURCE_MAXROOMHF = 0L;
  407. constexpr auto EAXSOURCE_DEFAULTROOMHF = 0L;
  408. constexpr auto EAXSOURCE_MINOBSTRUCTION = -10'000L;
  409. constexpr auto EAXSOURCE_MAXOBSTRUCTION = 0L;
  410. constexpr auto EAXSOURCE_DEFAULTOBSTRUCTION = 0L;
  411. constexpr auto EAXSOURCE_MINOBSTRUCTIONLFRATIO = 0.0F;
  412. constexpr auto EAXSOURCE_MAXOBSTRUCTIONLFRATIO = 1.0F;
  413. constexpr auto EAXSOURCE_DEFAULTOBSTRUCTIONLFRATIO = 0.0F;
  414. constexpr auto EAXSOURCE_MINOCCLUSION = -10'000L;
  415. constexpr auto EAXSOURCE_MAXOCCLUSION = 0L;
  416. constexpr auto EAXSOURCE_DEFAULTOCCLUSION = 0L;
  417. constexpr auto EAXSOURCE_MINOCCLUSIONLFRATIO = 0.0F;
  418. constexpr auto EAXSOURCE_MAXOCCLUSIONLFRATIO = 1.0F;
  419. constexpr auto EAXSOURCE_DEFAULTOCCLUSIONLFRATIO = 0.25F;
  420. constexpr auto EAXSOURCE_MINOCCLUSIONROOMRATIO = 0.0F;
  421. constexpr auto EAXSOURCE_MAXOCCLUSIONROOMRATIO = 10.0F;
  422. constexpr auto EAXSOURCE_DEFAULTOCCLUSIONROOMRATIO = 1.5F;
  423. constexpr auto EAXSOURCE_MINOCCLUSIONDIRECTRATIO = 0.0F;
  424. constexpr auto EAXSOURCE_MAXOCCLUSIONDIRECTRATIO = 10.0F;
  425. constexpr auto EAXSOURCE_DEFAULTOCCLUSIONDIRECTRATIO = 1.0F;
  426. constexpr auto EAXSOURCE_MINEXCLUSION = -10'000L;
  427. constexpr auto EAXSOURCE_MAXEXCLUSION = 0L;
  428. constexpr auto EAXSOURCE_DEFAULTEXCLUSION = 0L;
  429. constexpr auto EAXSOURCE_MINEXCLUSIONLFRATIO = 0.0F;
  430. constexpr auto EAXSOURCE_MAXEXCLUSIONLFRATIO = 1.0F;
  431. constexpr auto EAXSOURCE_DEFAULTEXCLUSIONLFRATIO = 1.0F;
  432. constexpr auto EAXSOURCE_MINOUTSIDEVOLUMEHF = -10'000L;
  433. constexpr auto EAXSOURCE_MAXOUTSIDEVOLUMEHF = 0L;
  434. constexpr auto EAXSOURCE_DEFAULTOUTSIDEVOLUMEHF = 0L;
  435. constexpr auto EAXSOURCE_MINDOPPLERFACTOR = 0.0F;
  436. constexpr auto EAXSOURCE_MAXDOPPLERFACTOR = 10.0F;
  437. constexpr auto EAXSOURCE_DEFAULTDOPPLERFACTOR = 1.0F;
  438. constexpr auto EAXSOURCE_MINROLLOFFFACTOR = 0.0F;
  439. constexpr auto EAXSOURCE_MAXROLLOFFFACTOR = 10.0F;
  440. constexpr auto EAXSOURCE_DEFAULTROLLOFFFACTOR = 0.0F;
  441. constexpr auto EAXSOURCE_MINROOMROLLOFFFACTOR = 0.0F;
  442. constexpr auto EAXSOURCE_MAXROOMROLLOFFFACTOR = 10.0F;
  443. constexpr auto EAXSOURCE_DEFAULTROOMROLLOFFFACTOR = 0.0F;
  444. constexpr auto EAXSOURCE_MINAIRABSORPTIONFACTOR = 0.0F;
  445. constexpr auto EAXSOURCE_MAXAIRABSORPTIONFACTOR = 10.0F;
  446. constexpr auto EAXSOURCE_DEFAULTAIRABSORPTIONFACTOR = 0.0F;
  447. // EAX50
  448. constexpr auto EAXSOURCE_MINMACROFXFACTOR = 0.0F;
  449. constexpr auto EAXSOURCE_MAXMACROFXFACTOR = 1.0F;
  450. constexpr auto EAXSOURCE_DEFAULTMACROFXFACTOR = 1.0F;
  451. constexpr auto EAXSOURCE_MINSPEAKERLEVEL = -10'000L;
  452. constexpr auto EAXSOURCE_MAXSPEAKERLEVEL = 0L;
  453. constexpr auto EAXSOURCE_DEFAULTSPEAKERLEVEL = -10'000L;
  454. constexpr auto EAXSOURCE_DEFAULTFLAGS =
  455. EAXSOURCEFLAGS_DIRECTHFAUTO |
  456. EAXSOURCEFLAGS_ROOMAUTO |
  457. EAXSOURCEFLAGS_ROOMHFAUTO;
  458. enum : long {
  459. EAXSPEAKER_FRONT_LEFT = 1,
  460. EAXSPEAKER_FRONT_CENTER = 2,
  461. EAXSPEAKER_FRONT_RIGHT = 3,
  462. EAXSPEAKER_SIDE_RIGHT = 4,
  463. EAXSPEAKER_REAR_RIGHT = 5,
  464. EAXSPEAKER_REAR_CENTER = 6,
  465. EAXSPEAKER_REAR_LEFT = 7,
  466. EAXSPEAKER_SIDE_LEFT = 8,
  467. EAXSPEAKER_LOW_FREQUENCY = 9
  468. };
  469. // EAXSOURCEFLAGS_DIRECTHFAUTO, EAXSOURCEFLAGS_ROOMAUTO and EAXSOURCEFLAGS_ROOMHFAUTO are ignored for 2D sources
  470. // EAXSOURCEFLAGS_UPMIX is ignored for 3D sources
  471. constexpr auto EAX50SOURCE_DEFAULTFLAGS =
  472. EAXSOURCEFLAGS_DIRECTHFAUTO |
  473. EAXSOURCEFLAGS_ROOMAUTO |
  474. EAXSOURCEFLAGS_ROOMHFAUTO |
  475. EAXSOURCEFLAGS_UPMIX;
  476. struct EAX30SOURCEPROPERTIES {
  477. long lDirect; // direct path level (at low and mid frequencies)
  478. long lDirectHF; // relative direct path level at high frequencies
  479. long lRoom; // room effect level (at low and mid frequencies)
  480. long lRoomHF; // relative room effect level at high frequencies
  481. long lObstruction; // main obstruction control (attenuation at high frequencies)
  482. float flObstructionLFRatio; // obstruction low-frequency level re. main control
  483. long lOcclusion; // main occlusion control (attenuation at high frequencies)
  484. float flOcclusionLFRatio; // occlusion low-frequency level re. main control
  485. float flOcclusionRoomRatio; // relative occlusion control for room effect
  486. float flOcclusionDirectRatio; // relative occlusion control for direct path
  487. long lExclusion; // main exlusion control (attenuation at high frequencies)
  488. float flExclusionLFRatio; // exclusion low-frequency level re. main control
  489. long lOutsideVolumeHF; // outside sound cone level at high frequencies
  490. float flDopplerFactor; // like DS3D flDopplerFactor but per source
  491. float flRolloffFactor; // like DS3D flRolloffFactor but per source
  492. float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
  493. float flAirAbsorptionFactor; // multiplies EAXREVERB_AIRABSORPTIONHF
  494. unsigned long ulFlags; // modifies the behavior of properties
  495. }; // EAX30SOURCEPROPERTIES
  496. struct EAX50SOURCEPROPERTIES : public EAX30SOURCEPROPERTIES {
  497. float flMacroFXFactor;
  498. }; // EAX50SOURCEPROPERTIES
  499. struct EAXSOURCEALLSENDPROPERTIES {
  500. GUID guidReceivingFXSlotID;
  501. long lSend; // send level (at low and mid frequencies)
  502. long lSendHF; // relative send level at high frequencies
  503. long lOcclusion;
  504. float flOcclusionLFRatio;
  505. float flOcclusionRoomRatio;
  506. float flOcclusionDirectRatio;
  507. long lExclusion;
  508. float flExclusionLFRatio;
  509. }; // EAXSOURCEALLSENDPROPERTIES
  510. struct EAXSOURCE2DPROPERTIES {
  511. long lDirect; // direct path level (at low and mid frequencies)
  512. long lDirectHF; // relative direct path level at high frequencies
  513. long lRoom; // room effect level (at low and mid frequencies)
  514. long lRoomHF; // relative room effect level at high frequencies
  515. unsigned long ulFlags; // modifies the behavior of properties
  516. }; // EAXSOURCE2DPROPERTIES
  517. struct EAXSPEAKERLEVELPROPERTIES {
  518. long lSpeakerID;
  519. long lLevel;
  520. }; // EAXSPEAKERLEVELPROPERTIES
  521. struct EAX40ACTIVEFXSLOTS {
  522. GUID guidActiveFXSlots[EAX40_MAX_ACTIVE_FXSLOTS];
  523. }; // EAX40ACTIVEFXSLOTS
  524. struct EAX50ACTIVEFXSLOTS {
  525. GUID guidActiveFXSlots[EAX50_MAX_ACTIVE_FXSLOTS];
  526. }; // EAX50ACTIVEFXSLOTS
  527. // Use this structure for EAXSOURCE_OBSTRUCTIONPARAMETERS property.
  528. struct EAXOBSTRUCTIONPROPERTIES {
  529. long lObstruction;
  530. float flObstructionLFRatio;
  531. }; // EAXOBSTRUCTIONPROPERTIES
  532. // Use this structure for EAXSOURCE_OCCLUSIONPARAMETERS property.
  533. struct EAXOCCLUSIONPROPERTIES {
  534. long lOcclusion;
  535. float flOcclusionLFRatio;
  536. float flOcclusionRoomRatio;
  537. float flOcclusionDirectRatio;
  538. }; // EAXOCCLUSIONPROPERTIES
  539. // Use this structure for EAXSOURCE_EXCLUSIONPARAMETERS property.
  540. struct EAXEXCLUSIONPROPERTIES {
  541. long lExclusion;
  542. float flExclusionLFRatio;
  543. }; // EAXEXCLUSIONPROPERTIES
  544. // Use this structure for EAXSOURCE_SENDPARAMETERS properties.
  545. struct EAXSOURCESENDPROPERTIES {
  546. GUID guidReceivingFXSlotID;
  547. long lSend;
  548. long lSendHF;
  549. }; // EAXSOURCESENDPROPERTIES
  550. // Use this structure for EAXSOURCE_OCCLUSIONSENDPARAMETERS
  551. struct EAXSOURCEOCCLUSIONSENDPROPERTIES {
  552. GUID guidReceivingFXSlotID;
  553. long lOcclusion;
  554. float flOcclusionLFRatio;
  555. float flOcclusionRoomRatio;
  556. float flOcclusionDirectRatio;
  557. }; // EAXSOURCEOCCLUSIONSENDPROPERTIES
  558. // Use this structure for EAXSOURCE_EXCLUSIONSENDPARAMETERS
  559. struct EAXSOURCEEXCLUSIONSENDPROPERTIES {
  560. GUID guidReceivingFXSlotID;
  561. long lExclusion;
  562. float flExclusionLFRatio;
  563. }; // EAXSOURCEEXCLUSIONSENDPROPERTIES
  564. extern const EAX40ACTIVEFXSLOTS EAX40SOURCE_DEFAULTACTIVEFXSLOTID;
  565. extern const EAX50ACTIVEFXSLOTS EAX50SOURCE_3DDEFAULTACTIVEFXSLOTID;
  566. extern const EAX50ACTIVEFXSLOTS EAX50SOURCE_2DDEFAULTACTIVEFXSLOTID;
  567. // EAX Reverb Effect
  568. extern const GUID EAX_REVERB_EFFECT;
  569. // Reverb effect properties
  570. enum EAXREVERB_PROPERTY : unsigned int {
  571. EAXREVERB_NONE,
  572. EAXREVERB_ALLPARAMETERS,
  573. EAXREVERB_ENVIRONMENT,
  574. EAXREVERB_ENVIRONMENTSIZE,
  575. EAXREVERB_ENVIRONMENTDIFFUSION,
  576. EAXREVERB_ROOM,
  577. EAXREVERB_ROOMHF,
  578. EAXREVERB_ROOMLF,
  579. EAXREVERB_DECAYTIME,
  580. EAXREVERB_DECAYHFRATIO,
  581. EAXREVERB_DECAYLFRATIO,
  582. EAXREVERB_REFLECTIONS,
  583. EAXREVERB_REFLECTIONSDELAY,
  584. EAXREVERB_REFLECTIONSPAN,
  585. EAXREVERB_REVERB,
  586. EAXREVERB_REVERBDELAY,
  587. EAXREVERB_REVERBPAN,
  588. EAXREVERB_ECHOTIME,
  589. EAXREVERB_ECHODEPTH,
  590. EAXREVERB_MODULATIONTIME,
  591. EAXREVERB_MODULATIONDEPTH,
  592. EAXREVERB_AIRABSORPTIONHF,
  593. EAXREVERB_HFREFERENCE,
  594. EAXREVERB_LFREFERENCE,
  595. EAXREVERB_ROOMROLLOFFFACTOR,
  596. EAXREVERB_FLAGS,
  597. }; // EAXREVERB_PROPERTY
  598. // used by EAXREVERB_ENVIRONMENT
  599. enum : unsigned long {
  600. EAX_ENVIRONMENT_GENERIC,
  601. EAX_ENVIRONMENT_PADDEDCELL,
  602. EAX_ENVIRONMENT_ROOM,
  603. EAX_ENVIRONMENT_BATHROOM,
  604. EAX_ENVIRONMENT_LIVINGROOM,
  605. EAX_ENVIRONMENT_STONEROOM,
  606. EAX_ENVIRONMENT_AUDITORIUM,
  607. EAX_ENVIRONMENT_CONCERTHALL,
  608. EAX_ENVIRONMENT_CAVE,
  609. EAX_ENVIRONMENT_ARENA,
  610. EAX_ENVIRONMENT_HANGAR,
  611. EAX_ENVIRONMENT_CARPETEDHALLWAY,
  612. EAX_ENVIRONMENT_HALLWAY,
  613. EAX_ENVIRONMENT_STONECORRIDOR,
  614. EAX_ENVIRONMENT_ALLEY,
  615. EAX_ENVIRONMENT_FOREST,
  616. EAX_ENVIRONMENT_CITY,
  617. EAX_ENVIRONMENT_MOUNTAINS,
  618. EAX_ENVIRONMENT_QUARRY,
  619. EAX_ENVIRONMENT_PLAIN,
  620. EAX_ENVIRONMENT_PARKINGLOT,
  621. EAX_ENVIRONMENT_SEWERPIPE,
  622. EAX_ENVIRONMENT_UNDERWATER,
  623. EAX_ENVIRONMENT_DRUGGED,
  624. EAX_ENVIRONMENT_DIZZY,
  625. EAX_ENVIRONMENT_PSYCHOTIC,
  626. EAX1_ENVIRONMENT_COUNT,
  627. // EAX30
  628. EAX_ENVIRONMENT_UNDEFINED = EAX1_ENVIRONMENT_COUNT,
  629. EAX3_ENVIRONMENT_COUNT,
  630. };
  631. // reverberation decay time
  632. constexpr auto EAXREVERBFLAGS_DECAYTIMESCALE = 0x00000001UL;
  633. // reflection level
  634. constexpr auto EAXREVERBFLAGS_REFLECTIONSSCALE = 0x00000002UL;
  635. // initial reflection delay time
  636. constexpr auto EAXREVERBFLAGS_REFLECTIONSDELAYSCALE = 0x00000004UL;
  637. // reflections level
  638. constexpr auto EAXREVERBFLAGS_REVERBSCALE = 0x00000008UL;
  639. // late reverberation delay time
  640. constexpr auto EAXREVERBFLAGS_REVERBDELAYSCALE = 0x00000010UL;
  641. // echo time
  642. // EAX30+
  643. constexpr auto EAXREVERBFLAGS_ECHOTIMESCALE = 0x00000040UL;
  644. // modulation time
  645. // EAX30+
  646. constexpr auto EAXREVERBFLAGS_MODULATIONTIMESCALE = 0x00000080UL;
  647. // This flag limits high-frequency decay time according to air absorption.
  648. constexpr auto EAXREVERBFLAGS_DECAYHFLIMIT = 0x00000020UL;
  649. constexpr auto EAXREVERBFLAGS_RESERVED = 0xFFFFFF00UL; // reserved future use
  650. struct EAXREVERBPROPERTIES {
  651. unsigned long ulEnvironment; // sets all reverb properties
  652. float flEnvironmentSize; // environment size in meters
  653. float flEnvironmentDiffusion; // environment diffusion
  654. long lRoom; // room effect level (at mid frequencies)
  655. long lRoomHF; // relative room effect level at high frequencies
  656. long lRoomLF; // relative room effect level at low frequencies
  657. float flDecayTime; // reverberation decay time at mid frequencies
  658. float flDecayHFRatio; // high-frequency to mid-frequency decay time ratio
  659. float flDecayLFRatio; // low-frequency to mid-frequency decay time ratio
  660. long lReflections; // early reflections level relative to room effect
  661. float flReflectionsDelay; // initial reflection delay time
  662. EAXVECTOR vReflectionsPan; // early reflections panning vector
  663. long lReverb; // late reverberation level relative to room effect
  664. float flReverbDelay; // late reverberation delay time relative to initial reflection
  665. EAXVECTOR vReverbPan; // late reverberation panning vector
  666. float flEchoTime; // echo time
  667. float flEchoDepth; // echo depth
  668. float flModulationTime; // modulation time
  669. float flModulationDepth; // modulation depth
  670. float flAirAbsorptionHF; // change in level per meter at high frequencies
  671. float flHFReference; // reference high frequency
  672. float flLFReference; // reference low frequency
  673. float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
  674. unsigned long ulFlags; // modifies the behavior of properties
  675. }; // EAXREVERBPROPERTIES
  676. constexpr auto EAXREVERB_MINENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_GENERIC);
  677. constexpr auto EAX1REVERB_MAXENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_PSYCHOTIC);
  678. constexpr auto EAX30REVERB_MAXENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_UNDEFINED);
  679. constexpr auto EAXREVERB_DEFAULTENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_GENERIC);
  680. constexpr auto EAXREVERB_MINENVIRONMENTSIZE = 1.0F;
  681. constexpr auto EAXREVERB_MAXENVIRONMENTSIZE = 100.0F;
  682. constexpr auto EAXREVERB_DEFAULTENVIRONMENTSIZE = 7.5F;
  683. constexpr auto EAXREVERB_MINENVIRONMENTDIFFUSION = 0.0F;
  684. constexpr auto EAXREVERB_MAXENVIRONMENTDIFFUSION = 1.0F;
  685. constexpr auto EAXREVERB_DEFAULTENVIRONMENTDIFFUSION = 1.0F;
  686. constexpr auto EAXREVERB_MINROOM = -10'000L;
  687. constexpr auto EAXREVERB_MAXROOM = 0L;
  688. constexpr auto EAXREVERB_DEFAULTROOM = -1'000L;
  689. constexpr auto EAXREVERB_MINROOMHF = -10'000L;
  690. constexpr auto EAXREVERB_MAXROOMHF = 0L;
  691. constexpr auto EAXREVERB_DEFAULTROOMHF = -100L;
  692. constexpr auto EAXREVERB_MINROOMLF = -10'000L;
  693. constexpr auto EAXREVERB_MAXROOMLF = 0L;
  694. constexpr auto EAXREVERB_DEFAULTROOMLF = 0L;
  695. constexpr auto EAXREVERB_MINDECAYTIME = 0.1F;
  696. constexpr auto EAXREVERB_MAXDECAYTIME = 20.0F;
  697. constexpr auto EAXREVERB_DEFAULTDECAYTIME = 1.49F;
  698. constexpr auto EAXREVERB_MINDECAYHFRATIO = 0.1F;
  699. constexpr auto EAXREVERB_MAXDECAYHFRATIO = 2.0F;
  700. constexpr auto EAXREVERB_DEFAULTDECAYHFRATIO = 0.83F;
  701. constexpr auto EAXREVERB_MINDECAYLFRATIO = 0.1F;
  702. constexpr auto EAXREVERB_MAXDECAYLFRATIO = 2.0F;
  703. constexpr auto EAXREVERB_DEFAULTDECAYLFRATIO = 1.0F;
  704. constexpr auto EAXREVERB_MINREFLECTIONS = -10'000L;
  705. constexpr auto EAXREVERB_MAXREFLECTIONS = 1'000L;
  706. constexpr auto EAXREVERB_DEFAULTREFLECTIONS = -2'602L;
  707. constexpr auto EAXREVERB_MINREFLECTIONSDELAY = 0.0F;
  708. constexpr auto EAXREVERB_MAXREFLECTIONSDELAY = 0.3F;
  709. constexpr auto EAXREVERB_DEFAULTREFLECTIONSDELAY = 0.007F;
  710. constexpr auto EAXREVERB_DEFAULTREFLECTIONSPAN = EAXVECTOR{0.0F, 0.0F, 0.0F};
  711. constexpr auto EAXREVERB_MINREVERB = -10'000L;
  712. constexpr auto EAXREVERB_MAXREVERB = 2'000L;
  713. constexpr auto EAXREVERB_DEFAULTREVERB = 200L;
  714. constexpr auto EAXREVERB_MINREVERBDELAY = 0.0F;
  715. constexpr auto EAXREVERB_MAXREVERBDELAY = 0.1F;
  716. constexpr auto EAXREVERB_DEFAULTREVERBDELAY = 0.011F;
  717. constexpr auto EAXREVERB_DEFAULTREVERBPAN = EAXVECTOR{0.0F, 0.0F, 0.0F};
  718. constexpr auto EAXREVERB_MINECHOTIME = 0.075F;
  719. constexpr auto EAXREVERB_MAXECHOTIME = 0.25F;
  720. constexpr auto EAXREVERB_DEFAULTECHOTIME = 0.25F;
  721. constexpr auto EAXREVERB_MINECHODEPTH = 0.0F;
  722. constexpr auto EAXREVERB_MAXECHODEPTH = 1.0F;
  723. constexpr auto EAXREVERB_DEFAULTECHODEPTH = 0.0F;
  724. constexpr auto EAXREVERB_MINMODULATIONTIME = 0.04F;
  725. constexpr auto EAXREVERB_MAXMODULATIONTIME = 4.0F;
  726. constexpr auto EAXREVERB_DEFAULTMODULATIONTIME = 0.25F;
  727. constexpr auto EAXREVERB_MINMODULATIONDEPTH = 0.0F;
  728. constexpr auto EAXREVERB_MAXMODULATIONDEPTH = 1.0F;
  729. constexpr auto EAXREVERB_DEFAULTMODULATIONDEPTH = 0.0F;
  730. constexpr auto EAXREVERB_MINAIRABSORPTIONHF = -100.0F;
  731. constexpr auto EAXREVERB_MAXAIRABSORPTIONHF = 0.0F;
  732. constexpr auto EAXREVERB_DEFAULTAIRABSORPTIONHF = -5.0F;
  733. constexpr auto EAXREVERB_MINHFREFERENCE = 1'000.0F;
  734. constexpr auto EAXREVERB_MAXHFREFERENCE = 20'000.0F;
  735. constexpr auto EAXREVERB_DEFAULTHFREFERENCE = 5'000.0F;
  736. constexpr auto EAXREVERB_MINLFREFERENCE = 20.0F;
  737. constexpr auto EAXREVERB_MAXLFREFERENCE = 1'000.0F;
  738. constexpr auto EAXREVERB_DEFAULTLFREFERENCE = 250.0F;
  739. constexpr auto EAXREVERB_MINROOMROLLOFFFACTOR = 0.0F;
  740. constexpr auto EAXREVERB_MAXROOMROLLOFFFACTOR = 10.0F;
  741. constexpr auto EAXREVERB_DEFAULTROOMROLLOFFFACTOR = 0.0F;
  742. constexpr auto EAX1REVERB_MINVOLUME = 0.0F;
  743. constexpr auto EAX1REVERB_MAXVOLUME = 1.0F;
  744. constexpr auto EAX1REVERB_MINDAMPING = 0.0F;
  745. constexpr auto EAX1REVERB_MAXDAMPING = 2.0F;
  746. constexpr auto EAXREVERB_DEFAULTFLAGS =
  747. EAXREVERBFLAGS_DECAYTIMESCALE |
  748. EAXREVERBFLAGS_REFLECTIONSSCALE |
  749. EAXREVERBFLAGS_REFLECTIONSDELAYSCALE |
  750. EAXREVERBFLAGS_REVERBSCALE |
  751. EAXREVERBFLAGS_REVERBDELAYSCALE |
  752. EAXREVERBFLAGS_DECAYHFLIMIT;
  753. using Eax1ReverbPresets = std::array<EAX_REVERBPROPERTIES, EAX1_ENVIRONMENT_COUNT>;
  754. extern const Eax1ReverbPresets EAX1REVERB_PRESETS;
  755. using Eax2ReverbPresets = std::array<EAX20LISTENERPROPERTIES, EAX2_ENVIRONMENT_COUNT>;
  756. extern const Eax2ReverbPresets EAX2REVERB_PRESETS;
  757. using EaxReverbPresets = std::array<EAXREVERBPROPERTIES, EAX1_ENVIRONMENT_COUNT>;
  758. extern const EaxReverbPresets EAXREVERB_PRESETS;
  759. // AGC Compressor Effect
  760. extern const GUID EAX_AGCCOMPRESSOR_EFFECT;
  761. enum EAXAGCCOMPRESSOR_PROPERTY : unsigned int {
  762. EAXAGCCOMPRESSOR_NONE,
  763. EAXAGCCOMPRESSOR_ALLPARAMETERS,
  764. EAXAGCCOMPRESSOR_ONOFF,
  765. }; // EAXAGCCOMPRESSOR_PROPERTY
  766. struct EAXAGCCOMPRESSORPROPERTIES {
  767. unsigned long ulOnOff; // Switch Compressor on or off
  768. }; // EAXAGCCOMPRESSORPROPERTIES
  769. constexpr auto EAXAGCCOMPRESSOR_MINONOFF = 0UL;
  770. constexpr auto EAXAGCCOMPRESSOR_MAXONOFF = 1UL;
  771. constexpr auto EAXAGCCOMPRESSOR_DEFAULTONOFF = EAXAGCCOMPRESSOR_MAXONOFF;
  772. // Autowah Effect
  773. extern const GUID EAX_AUTOWAH_EFFECT;
  774. enum EAXAUTOWAH_PROPERTY : unsigned int {
  775. EAXAUTOWAH_NONE,
  776. EAXAUTOWAH_ALLPARAMETERS,
  777. EAXAUTOWAH_ATTACKTIME,
  778. EAXAUTOWAH_RELEASETIME,
  779. EAXAUTOWAH_RESONANCE,
  780. EAXAUTOWAH_PEAKLEVEL,
  781. }; // EAXAUTOWAH_PROPERTY
  782. struct EAXAUTOWAHPROPERTIES {
  783. float flAttackTime; // Attack time (seconds)
  784. float flReleaseTime; // Release time (seconds)
  785. long lResonance; // Resonance (mB)
  786. long lPeakLevel; // Peak level (mB)
  787. }; // EAXAUTOWAHPROPERTIES
  788. constexpr auto EAXAUTOWAH_MINATTACKTIME = 0.0001F;
  789. constexpr auto EAXAUTOWAH_MAXATTACKTIME = 1.0F;
  790. constexpr auto EAXAUTOWAH_DEFAULTATTACKTIME = 0.06F;
  791. constexpr auto EAXAUTOWAH_MINRELEASETIME = 0.0001F;
  792. constexpr auto EAXAUTOWAH_MAXRELEASETIME = 1.0F;
  793. constexpr auto EAXAUTOWAH_DEFAULTRELEASETIME = 0.06F;
  794. constexpr auto EAXAUTOWAH_MINRESONANCE = 600L;
  795. constexpr auto EAXAUTOWAH_MAXRESONANCE = 6000L;
  796. constexpr auto EAXAUTOWAH_DEFAULTRESONANCE = 6000L;
  797. constexpr auto EAXAUTOWAH_MINPEAKLEVEL = -9000L;
  798. constexpr auto EAXAUTOWAH_MAXPEAKLEVEL = 9000L;
  799. constexpr auto EAXAUTOWAH_DEFAULTPEAKLEVEL = 2100L;
  800. // Chorus Effect
  801. extern const GUID EAX_CHORUS_EFFECT;
  802. enum EAXCHORUS_PROPERTY : unsigned int {
  803. EAXCHORUS_NONE,
  804. EAXCHORUS_ALLPARAMETERS,
  805. EAXCHORUS_WAVEFORM,
  806. EAXCHORUS_PHASE,
  807. EAXCHORUS_RATE,
  808. EAXCHORUS_DEPTH,
  809. EAXCHORUS_FEEDBACK,
  810. EAXCHORUS_DELAY,
  811. }; // EAXCHORUS_PROPERTY
  812. enum : unsigned long {
  813. EAX_CHORUS_SINUSOID,
  814. EAX_CHORUS_TRIANGLE,
  815. };
  816. struct EAXCHORUSPROPERTIES {
  817. unsigned long ulWaveform; // Waveform selector - see enum above
  818. long lPhase; // Phase (Degrees)
  819. float flRate; // Rate (Hz)
  820. float flDepth; // Depth (0 to 1)
  821. float flFeedback; // Feedback (-1 to 1)
  822. float flDelay; // Delay (seconds)
  823. }; // EAXCHORUSPROPERTIES
  824. constexpr auto EAXCHORUS_MINWAVEFORM = 0UL;
  825. constexpr auto EAXCHORUS_MAXWAVEFORM = 1UL;
  826. constexpr auto EAXCHORUS_DEFAULTWAVEFORM = 1UL;
  827. constexpr auto EAXCHORUS_MINPHASE = -180L;
  828. constexpr auto EAXCHORUS_MAXPHASE = 180L;
  829. constexpr auto EAXCHORUS_DEFAULTPHASE = 90L;
  830. constexpr auto EAXCHORUS_MINRATE = 0.0F;
  831. constexpr auto EAXCHORUS_MAXRATE = 10.0F;
  832. constexpr auto EAXCHORUS_DEFAULTRATE = 1.1F;
  833. constexpr auto EAXCHORUS_MINDEPTH = 0.0F;
  834. constexpr auto EAXCHORUS_MAXDEPTH = 1.0F;
  835. constexpr auto EAXCHORUS_DEFAULTDEPTH = 0.1F;
  836. constexpr auto EAXCHORUS_MINFEEDBACK = -1.0F;
  837. constexpr auto EAXCHORUS_MAXFEEDBACK = 1.0F;
  838. constexpr auto EAXCHORUS_DEFAULTFEEDBACK = 0.25F;
  839. constexpr auto EAXCHORUS_MINDELAY = 0.0002F;
  840. constexpr auto EAXCHORUS_MAXDELAY = 0.016F;
  841. constexpr auto EAXCHORUS_DEFAULTDELAY = 0.016F;
  842. // Distortion Effect
  843. extern const GUID EAX_DISTORTION_EFFECT;
  844. enum EAXDISTORTION_PROPERTY : unsigned int {
  845. EAXDISTORTION_NONE,
  846. EAXDISTORTION_ALLPARAMETERS,
  847. EAXDISTORTION_EDGE,
  848. EAXDISTORTION_GAIN,
  849. EAXDISTORTION_LOWPASSCUTOFF,
  850. EAXDISTORTION_EQCENTER,
  851. EAXDISTORTION_EQBANDWIDTH,
  852. }; // EAXDISTORTION_PROPERTY
  853. struct EAXDISTORTIONPROPERTIES {
  854. float flEdge; // Controls the shape of the distortion (0 to 1)
  855. long lGain; // Controls the post distortion gain (mB)
  856. float flLowPassCutOff; // Controls the cut-off of the filter pre-distortion (Hz)
  857. float flEQCenter; // Controls the center frequency of the EQ post-distortion (Hz)
  858. float flEQBandwidth; // Controls the bandwidth of the EQ post-distortion (Hz)
  859. }; // EAXDISTORTIONPROPERTIES
  860. constexpr auto EAXDISTORTION_MINEDGE = 0.0F;
  861. constexpr auto EAXDISTORTION_MAXEDGE = 1.0F;
  862. constexpr auto EAXDISTORTION_DEFAULTEDGE = 0.2F;
  863. constexpr auto EAXDISTORTION_MINGAIN = -6000L;
  864. constexpr auto EAXDISTORTION_MAXGAIN = 0L;
  865. constexpr auto EAXDISTORTION_DEFAULTGAIN = -2600L;
  866. constexpr auto EAXDISTORTION_MINLOWPASSCUTOFF = 80.0F;
  867. constexpr auto EAXDISTORTION_MAXLOWPASSCUTOFF = 24000.0F;
  868. constexpr auto EAXDISTORTION_DEFAULTLOWPASSCUTOFF = 8000.0F;
  869. constexpr auto EAXDISTORTION_MINEQCENTER = 80.0F;
  870. constexpr auto EAXDISTORTION_MAXEQCENTER = 24000.0F;
  871. constexpr auto EAXDISTORTION_DEFAULTEQCENTER = 3600.0F;
  872. constexpr auto EAXDISTORTION_MINEQBANDWIDTH = 80.0F;
  873. constexpr auto EAXDISTORTION_MAXEQBANDWIDTH = 24000.0F;
  874. constexpr auto EAXDISTORTION_DEFAULTEQBANDWIDTH = 3600.0F;
  875. // Echo Effect
  876. extern const GUID EAX_ECHO_EFFECT;
  877. enum EAXECHO_PROPERTY : unsigned int {
  878. EAXECHO_NONE,
  879. EAXECHO_ALLPARAMETERS,
  880. EAXECHO_DELAY,
  881. EAXECHO_LRDELAY,
  882. EAXECHO_DAMPING,
  883. EAXECHO_FEEDBACK,
  884. EAXECHO_SPREAD,
  885. }; // EAXECHO_PROPERTY
  886. struct EAXECHOPROPERTIES {
  887. float flDelay; // Controls the initial delay time (seconds)
  888. float flLRDelay; // Controls the delay time between the first and second taps (seconds)
  889. float flDamping; // Controls a low-pass filter that dampens the echoes (0 to 1)
  890. float flFeedback; // Controls the duration of echo repetition (0 to 1)
  891. float flSpread; // Controls the left-right spread of the echoes
  892. }; // EAXECHOPROPERTIES
  893. constexpr auto EAXECHO_MINDAMPING = 0.0F;
  894. constexpr auto EAXECHO_MAXDAMPING = 0.99F;
  895. constexpr auto EAXECHO_DEFAULTDAMPING = 0.5F;
  896. constexpr auto EAXECHO_MINDELAY = 0.002F;
  897. constexpr auto EAXECHO_MAXDELAY = 0.207F;
  898. constexpr auto EAXECHO_DEFAULTDELAY = 0.1F;
  899. constexpr auto EAXECHO_MINLRDELAY = 0.0F;
  900. constexpr auto EAXECHO_MAXLRDELAY = 0.404F;
  901. constexpr auto EAXECHO_DEFAULTLRDELAY = 0.1F;
  902. constexpr auto EAXECHO_MINFEEDBACK = 0.0F;
  903. constexpr auto EAXECHO_MAXFEEDBACK = 1.0F;
  904. constexpr auto EAXECHO_DEFAULTFEEDBACK = 0.5F;
  905. constexpr auto EAXECHO_MINSPREAD = -1.0F;
  906. constexpr auto EAXECHO_MAXSPREAD = 1.0F;
  907. constexpr auto EAXECHO_DEFAULTSPREAD = -1.0F;
  908. // Equalizer Effect
  909. extern const GUID EAX_EQUALIZER_EFFECT;
  910. enum EAXEQUALIZER_PROPERTY : unsigned int {
  911. EAXEQUALIZER_NONE,
  912. EAXEQUALIZER_ALLPARAMETERS,
  913. EAXEQUALIZER_LOWGAIN,
  914. EAXEQUALIZER_LOWCUTOFF,
  915. EAXEQUALIZER_MID1GAIN,
  916. EAXEQUALIZER_MID1CENTER,
  917. EAXEQUALIZER_MID1WIDTH,
  918. EAXEQUALIZER_MID2GAIN,
  919. EAXEQUALIZER_MID2CENTER,
  920. EAXEQUALIZER_MID2WIDTH,
  921. EAXEQUALIZER_HIGHGAIN,
  922. EAXEQUALIZER_HIGHCUTOFF,
  923. }; // EAXEQUALIZER_PROPERTY
  924. struct EAXEQUALIZERPROPERTIES {
  925. long lLowGain; // (mB)
  926. float flLowCutOff; // (Hz)
  927. long lMid1Gain; // (mB)
  928. float flMid1Center; // (Hz)
  929. float flMid1Width; // (octaves)
  930. long lMid2Gain; // (mB)
  931. float flMid2Center; // (Hz)
  932. float flMid2Width; // (octaves)
  933. long lHighGain; // (mB)
  934. float flHighCutOff; // (Hz)
  935. }; // EAXEQUALIZERPROPERTIES
  936. constexpr auto EAXEQUALIZER_MINLOWGAIN = -1800L;
  937. constexpr auto EAXEQUALIZER_MAXLOWGAIN = 1800L;
  938. constexpr auto EAXEQUALIZER_DEFAULTLOWGAIN = 0L;
  939. constexpr auto EAXEQUALIZER_MINLOWCUTOFF = 50.0F;
  940. constexpr auto EAXEQUALIZER_MAXLOWCUTOFF = 800.0F;
  941. constexpr auto EAXEQUALIZER_DEFAULTLOWCUTOFF = 200.0F;
  942. constexpr auto EAXEQUALIZER_MINMID1GAIN = -1800L;
  943. constexpr auto EAXEQUALIZER_MAXMID1GAIN = 1800L;
  944. constexpr auto EAXEQUALIZER_DEFAULTMID1GAIN = 0L;
  945. constexpr auto EAXEQUALIZER_MINMID1CENTER = 200.0F;
  946. constexpr auto EAXEQUALIZER_MAXMID1CENTER = 3000.0F;
  947. constexpr auto EAXEQUALIZER_DEFAULTMID1CENTER = 500.0F;
  948. constexpr auto EAXEQUALIZER_MINMID1WIDTH = 0.01F;
  949. constexpr auto EAXEQUALIZER_MAXMID1WIDTH = 1.0F;
  950. constexpr auto EAXEQUALIZER_DEFAULTMID1WIDTH = 1.0F;
  951. constexpr auto EAXEQUALIZER_MINMID2GAIN = -1800L;
  952. constexpr auto EAXEQUALIZER_MAXMID2GAIN = 1800L;
  953. constexpr auto EAXEQUALIZER_DEFAULTMID2GAIN = 0L;
  954. constexpr auto EAXEQUALIZER_MINMID2CENTER = 1000.0F;
  955. constexpr auto EAXEQUALIZER_MAXMID2CENTER = 8000.0F;
  956. constexpr auto EAXEQUALIZER_DEFAULTMID2CENTER = 3000.0F;
  957. constexpr auto EAXEQUALIZER_MINMID2WIDTH = 0.01F;
  958. constexpr auto EAXEQUALIZER_MAXMID2WIDTH = 1.0F;
  959. constexpr auto EAXEQUALIZER_DEFAULTMID2WIDTH = 1.0F;
  960. constexpr auto EAXEQUALIZER_MINHIGHGAIN = -1800L;
  961. constexpr auto EAXEQUALIZER_MAXHIGHGAIN = 1800L;
  962. constexpr auto EAXEQUALIZER_DEFAULTHIGHGAIN = 0L;
  963. constexpr auto EAXEQUALIZER_MINHIGHCUTOFF = 4000.0F;
  964. constexpr auto EAXEQUALIZER_MAXHIGHCUTOFF = 16000.0F;
  965. constexpr auto EAXEQUALIZER_DEFAULTHIGHCUTOFF = 6000.0F;
  966. // Flanger Effect
  967. extern const GUID EAX_FLANGER_EFFECT;
  968. enum EAXFLANGER_PROPERTY : unsigned int {
  969. EAXFLANGER_NONE,
  970. EAXFLANGER_ALLPARAMETERS,
  971. EAXFLANGER_WAVEFORM,
  972. EAXFLANGER_PHASE,
  973. EAXFLANGER_RATE,
  974. EAXFLANGER_DEPTH,
  975. EAXFLANGER_FEEDBACK,
  976. EAXFLANGER_DELAY,
  977. }; // EAXFLANGER_PROPERTY
  978. enum : unsigned long {
  979. EAX_FLANGER_SINUSOID,
  980. EAX_FLANGER_TRIANGLE,
  981. };
  982. struct EAXFLANGERPROPERTIES {
  983. unsigned long ulWaveform; // Waveform selector - see enum above
  984. long lPhase; // Phase (Degrees)
  985. float flRate; // Rate (Hz)
  986. float flDepth; // Depth (0 to 1)
  987. float flFeedback; // Feedback (0 to 1)
  988. float flDelay; // Delay (seconds)
  989. }; // EAXFLANGERPROPERTIES
  990. constexpr auto EAXFLANGER_MINWAVEFORM = 0UL;
  991. constexpr auto EAXFLANGER_MAXWAVEFORM = 1UL;
  992. constexpr auto EAXFLANGER_DEFAULTWAVEFORM = 1UL;
  993. constexpr auto EAXFLANGER_MINPHASE = -180L;
  994. constexpr auto EAXFLANGER_MAXPHASE = 180L;
  995. constexpr auto EAXFLANGER_DEFAULTPHASE = 0L;
  996. constexpr auto EAXFLANGER_MINRATE = 0.0F;
  997. constexpr auto EAXFLANGER_MAXRATE = 10.0F;
  998. constexpr auto EAXFLANGER_DEFAULTRATE = 0.27F;
  999. constexpr auto EAXFLANGER_MINDEPTH = 0.0F;
  1000. constexpr auto EAXFLANGER_MAXDEPTH = 1.0F;
  1001. constexpr auto EAXFLANGER_DEFAULTDEPTH = 1.0F;
  1002. constexpr auto EAXFLANGER_MINFEEDBACK = -1.0F;
  1003. constexpr auto EAXFLANGER_MAXFEEDBACK = 1.0F;
  1004. constexpr auto EAXFLANGER_DEFAULTFEEDBACK = -0.5F;
  1005. constexpr auto EAXFLANGER_MINDELAY = 0.0002F;
  1006. constexpr auto EAXFLANGER_MAXDELAY = 0.004F;
  1007. constexpr auto EAXFLANGER_DEFAULTDELAY = 0.002F;
  1008. // Frequency Shifter Effect
  1009. extern const GUID EAX_FREQUENCYSHIFTER_EFFECT;
  1010. enum EAXFREQUENCYSHIFTER_PROPERTY : unsigned int {
  1011. EAXFREQUENCYSHIFTER_NONE,
  1012. EAXFREQUENCYSHIFTER_ALLPARAMETERS,
  1013. EAXFREQUENCYSHIFTER_FREQUENCY,
  1014. EAXFREQUENCYSHIFTER_LEFTDIRECTION,
  1015. EAXFREQUENCYSHIFTER_RIGHTDIRECTION,
  1016. }; // EAXFREQUENCYSHIFTER_PROPERTY
  1017. enum : unsigned long {
  1018. EAX_FREQUENCYSHIFTER_DOWN,
  1019. EAX_FREQUENCYSHIFTER_UP,
  1020. EAX_FREQUENCYSHIFTER_OFF
  1021. };
  1022. struct EAXFREQUENCYSHIFTERPROPERTIES {
  1023. float flFrequency; // (Hz)
  1024. unsigned long ulLeftDirection; // see enum above
  1025. unsigned long ulRightDirection; // see enum above
  1026. }; // EAXFREQUENCYSHIFTERPROPERTIES
  1027. constexpr auto EAXFREQUENCYSHIFTER_MINFREQUENCY = 0.0F;
  1028. constexpr auto EAXFREQUENCYSHIFTER_MAXFREQUENCY = 24000.0F;
  1029. constexpr auto EAXFREQUENCYSHIFTER_DEFAULTFREQUENCY = EAXFREQUENCYSHIFTER_MINFREQUENCY;
  1030. constexpr auto EAXFREQUENCYSHIFTER_MINLEFTDIRECTION = 0UL;
  1031. constexpr auto EAXFREQUENCYSHIFTER_MAXLEFTDIRECTION = 2UL;
  1032. constexpr auto EAXFREQUENCYSHIFTER_DEFAULTLEFTDIRECTION = EAXFREQUENCYSHIFTER_MINLEFTDIRECTION;
  1033. constexpr auto EAXFREQUENCYSHIFTER_MINRIGHTDIRECTION = 0UL;
  1034. constexpr auto EAXFREQUENCYSHIFTER_MAXRIGHTDIRECTION = 2UL;
  1035. constexpr auto EAXFREQUENCYSHIFTER_DEFAULTRIGHTDIRECTION = EAXFREQUENCYSHIFTER_MINRIGHTDIRECTION;
  1036. // Vocal Morpher Effect
  1037. extern const GUID EAX_VOCALMORPHER_EFFECT;
  1038. enum EAXVOCALMORPHER_PROPERTY : unsigned int {
  1039. EAXVOCALMORPHER_NONE,
  1040. EAXVOCALMORPHER_ALLPARAMETERS,
  1041. EAXVOCALMORPHER_PHONEMEA,
  1042. EAXVOCALMORPHER_PHONEMEACOARSETUNING,
  1043. EAXVOCALMORPHER_PHONEMEB,
  1044. EAXVOCALMORPHER_PHONEMEBCOARSETUNING,
  1045. EAXVOCALMORPHER_WAVEFORM,
  1046. EAXVOCALMORPHER_RATE,
  1047. }; // EAXVOCALMORPHER_PROPERTY
  1048. enum : unsigned long {
  1049. A,
  1050. E,
  1051. I,
  1052. O,
  1053. U,
  1054. AA,
  1055. AE,
  1056. AH,
  1057. AO,
  1058. EH,
  1059. ER,
  1060. IH,
  1061. IY,
  1062. UH,
  1063. UW,
  1064. B,
  1065. D,
  1066. F,
  1067. G,
  1068. J,
  1069. K,
  1070. L,
  1071. M,
  1072. N,
  1073. P,
  1074. R,
  1075. S,
  1076. T,
  1077. V,
  1078. Z,
  1079. };
  1080. enum : unsigned long {
  1081. EAX_VOCALMORPHER_SINUSOID,
  1082. EAX_VOCALMORPHER_TRIANGLE,
  1083. EAX_VOCALMORPHER_SAWTOOTH
  1084. };
  1085. // Use this structure for EAXVOCALMORPHER_ALLPARAMETERS
  1086. struct EAXVOCALMORPHERPROPERTIES {
  1087. unsigned long ulPhonemeA; // see enum above
  1088. long lPhonemeACoarseTuning; // (semitones)
  1089. unsigned long ulPhonemeB; // see enum above
  1090. long lPhonemeBCoarseTuning; // (semitones)
  1091. unsigned long ulWaveform; // Waveform selector - see enum above
  1092. float flRate; // (Hz)
  1093. }; // EAXVOCALMORPHERPROPERTIES
  1094. constexpr auto EAXVOCALMORPHER_MINPHONEMEA = 0UL;
  1095. constexpr auto EAXVOCALMORPHER_MAXPHONEMEA = 29UL;
  1096. constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEA = EAXVOCALMORPHER_MINPHONEMEA;
  1097. constexpr auto EAXVOCALMORPHER_MINPHONEMEACOARSETUNING = -24L;
  1098. constexpr auto EAXVOCALMORPHER_MAXPHONEMEACOARSETUNING = 24L;
  1099. constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEACOARSETUNING = 0L;
  1100. constexpr auto EAXVOCALMORPHER_MINPHONEMEB = 0UL;
  1101. constexpr auto EAXVOCALMORPHER_MAXPHONEMEB = 29UL;
  1102. constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEB = 10UL;
  1103. constexpr auto EAXVOCALMORPHER_MINPHONEMEBCOARSETUNING = -24L;
  1104. constexpr auto EAXVOCALMORPHER_MAXPHONEMEBCOARSETUNING = 24L;
  1105. constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEBCOARSETUNING = 0L;
  1106. constexpr auto EAXVOCALMORPHER_MINWAVEFORM = 0UL;
  1107. constexpr auto EAXVOCALMORPHER_MAXWAVEFORM = 2UL;
  1108. constexpr auto EAXVOCALMORPHER_DEFAULTWAVEFORM = EAXVOCALMORPHER_MINWAVEFORM;
  1109. constexpr auto EAXVOCALMORPHER_MINRATE = 0.0F;
  1110. constexpr auto EAXVOCALMORPHER_MAXRATE = 10.0F;
  1111. constexpr auto EAXVOCALMORPHER_DEFAULTRATE = 1.41F;
  1112. // Pitch Shifter Effect
  1113. extern const GUID EAX_PITCHSHIFTER_EFFECT;
  1114. enum EAXPITCHSHIFTER_PROPERTY : unsigned int {
  1115. EAXPITCHSHIFTER_NONE,
  1116. EAXPITCHSHIFTER_ALLPARAMETERS,
  1117. EAXPITCHSHIFTER_COARSETUNE,
  1118. EAXPITCHSHIFTER_FINETUNE,
  1119. }; // EAXPITCHSHIFTER_PROPERTY
  1120. struct EAXPITCHSHIFTERPROPERTIES {
  1121. long lCoarseTune; // Amount of pitch shift (semitones)
  1122. long lFineTune; // Amount of pitch shift (cents)
  1123. }; // EAXPITCHSHIFTERPROPERTIES
  1124. constexpr auto EAXPITCHSHIFTER_MINCOARSETUNE = -12L;
  1125. constexpr auto EAXPITCHSHIFTER_MAXCOARSETUNE = 12L;
  1126. constexpr auto EAXPITCHSHIFTER_DEFAULTCOARSETUNE = 12L;
  1127. constexpr auto EAXPITCHSHIFTER_MINFINETUNE = -50L;
  1128. constexpr auto EAXPITCHSHIFTER_MAXFINETUNE = 50L;
  1129. constexpr auto EAXPITCHSHIFTER_DEFAULTFINETUNE = 0L;
  1130. // Ring Modulator Effect
  1131. extern const GUID EAX_RINGMODULATOR_EFFECT;
  1132. enum EAXRINGMODULATOR_PROPERTY : unsigned int {
  1133. EAXRINGMODULATOR_NONE,
  1134. EAXRINGMODULATOR_ALLPARAMETERS,
  1135. EAXRINGMODULATOR_FREQUENCY,
  1136. EAXRINGMODULATOR_HIGHPASSCUTOFF,
  1137. EAXRINGMODULATOR_WAVEFORM,
  1138. }; // EAXRINGMODULATOR_PROPERTY
  1139. enum : unsigned long {
  1140. EAX_RINGMODULATOR_SINUSOID,
  1141. EAX_RINGMODULATOR_SAWTOOTH,
  1142. EAX_RINGMODULATOR_SQUARE,
  1143. };
  1144. // Use this structure for EAXRINGMODULATOR_ALLPARAMETERS
  1145. struct EAXRINGMODULATORPROPERTIES {
  1146. float flFrequency; // Frequency of modulation (Hz)
  1147. float flHighPassCutOff; // Cut-off frequency of high-pass filter (Hz)
  1148. unsigned long ulWaveform; // Waveform selector - see enum above
  1149. }; // EAXRINGMODULATORPROPERTIES
  1150. constexpr auto EAXRINGMODULATOR_MINFREQUENCY = 0.0F;
  1151. constexpr auto EAXRINGMODULATOR_MAXFREQUENCY = 8000.0F;
  1152. constexpr auto EAXRINGMODULATOR_DEFAULTFREQUENCY = 440.0F;
  1153. constexpr auto EAXRINGMODULATOR_MINHIGHPASSCUTOFF = 0.0F;
  1154. constexpr auto EAXRINGMODULATOR_MAXHIGHPASSCUTOFF = 24000.0F;
  1155. constexpr auto EAXRINGMODULATOR_DEFAULTHIGHPASSCUTOFF = 800.0F;
  1156. constexpr auto EAXRINGMODULATOR_MINWAVEFORM = 0UL;
  1157. constexpr auto EAXRINGMODULATOR_MAXWAVEFORM = 2UL;
  1158. constexpr auto EAXRINGMODULATOR_DEFAULTWAVEFORM = EAXRINGMODULATOR_MINWAVEFORM;
  1159. using LPEAXSET = ALenum(AL_APIENTRY*)(
  1160. const GUID* property_set_id,
  1161. ALuint property_id,
  1162. ALuint property_source_id,
  1163. ALvoid* property_buffer,
  1164. ALuint property_size);
  1165. using LPEAXGET = ALenum(AL_APIENTRY*)(
  1166. const GUID* property_set_id,
  1167. ALuint property_id,
  1168. ALuint property_source_id,
  1169. ALvoid* property_buffer,
  1170. ALuint property_size);
  1171. #endif // !EAX_API_INCLUDED