🛠️🐜 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.

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