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

1213 lines
22 KiB

  1. //
  2. // EAX API.
  3. //
  4. // Based on headers `eax[2-5].h` included in Doom 3 source code:
  5. // https://github.com/id-Software/DOOM-3/tree/master/neo/openal/include
  6. //
  7. #include "config.h"
  8. #include <algorithm>
  9. #include "al/eax_api.h"
  10. const GUID DSPROPSETID_EAX_ReverbProperties =
  11. {
  12. 0x4A4E6FC1,
  13. 0xC341,
  14. 0x11D1,
  15. {0xB7, 0x3A, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}
  16. };
  17. const GUID DSPROPSETID_EAXBUFFER_ReverbProperties =
  18. {
  19. 0x4A4E6FC0,
  20. 0xC341,
  21. 0x11D1,
  22. {0xB7, 0x3A, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}
  23. };
  24. const GUID DSPROPSETID_EAX20_ListenerProperties =
  25. {
  26. 0x306A6A8,
  27. 0xB224,
  28. 0x11D2,
  29. {0x99, 0xE5, 0x00, 0x00, 0xE8, 0xD8, 0xC7, 0x22}
  30. };
  31. const GUID DSPROPSETID_EAX20_BufferProperties =
  32. {
  33. 0x306A6A7,
  34. 0xB224,
  35. 0x11D2,
  36. {0x99, 0xE5, 0x00, 0x00, 0xE8, 0xD8, 0xC7, 0x22}
  37. };
  38. const GUID DSPROPSETID_EAX30_ListenerProperties =
  39. {
  40. 0xA8FA6882,
  41. 0xB476,
  42. 0x11D3,
  43. {0xBD, 0xB9, 0x00, 0xC0, 0xF0, 0x2D, 0xDF, 0x87}
  44. };
  45. const GUID DSPROPSETID_EAX30_BufferProperties =
  46. {
  47. 0xA8FA6881,
  48. 0xB476,
  49. 0x11D3,
  50. {0xBD, 0xB9, 0x00, 0xC0, 0xF0, 0x2D, 0xDF, 0x87}
  51. };
  52. const GUID EAX_NULL_GUID =
  53. {
  54. 0x00000000,
  55. 0x0000,
  56. 0x0000,
  57. {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
  58. };
  59. const GUID EAX_PrimaryFXSlotID =
  60. {
  61. 0xF317866D,
  62. 0x924C,
  63. 0x450C,
  64. {0x86, 0x1B, 0xE6, 0xDA, 0xA2, 0x5E, 0x7C, 0x20}
  65. };
  66. const GUID EAXPROPERTYID_EAX40_Context =
  67. {
  68. 0x1D4870AD,
  69. 0xDEF,
  70. 0x43C0,
  71. {0xA4, 0xC, 0x52, 0x36, 0x32, 0x29, 0x63, 0x42}
  72. };
  73. const GUID EAXPROPERTYID_EAX50_Context =
  74. {
  75. 0x57E13437,
  76. 0xB932,
  77. 0x4AB2,
  78. {0xB8, 0xBD, 0x52, 0x66, 0xC1, 0xA8, 0x87, 0xEE}
  79. };
  80. const GUID EAXPROPERTYID_EAX40_FXSlot0 =
  81. {
  82. 0xC4D79F1E,
  83. 0xF1AC,
  84. 0x436B,
  85. {0xA8, 0x1D, 0xA7, 0x38, 0xE7, 0x04, 0x54, 0x69}
  86. };
  87. const GUID EAXPROPERTYID_EAX50_FXSlot0 =
  88. {
  89. 0x91F9590F,
  90. 0xC388,
  91. 0x407A,
  92. {0x84, 0xB0, 0x1B, 0xAE, 0xE, 0xF7, 0x1A, 0xBC}
  93. };
  94. const GUID EAXPROPERTYID_EAX40_FXSlot1 =
  95. {
  96. 0x8C00E96,
  97. 0x74BE,
  98. 0x4491,
  99. {0x93, 0xAA, 0xE8, 0xAD, 0x35, 0xA4, 0x91, 0x17}
  100. };
  101. const GUID EAXPROPERTYID_EAX50_FXSlot1 =
  102. {
  103. 0x8F5F7ACA,
  104. 0x9608,
  105. 0x4965,
  106. {0x81, 0x37, 0x82, 0x13, 0xC7, 0xB9, 0xD9, 0xDE}
  107. };
  108. const GUID EAXPROPERTYID_EAX40_FXSlot2 =
  109. {
  110. 0x1D433B88,
  111. 0xF0F6,
  112. 0x4637,
  113. {0x91, 0x9F, 0x60, 0xE7, 0xE0, 0x6B, 0x5E, 0xDD}
  114. };
  115. const GUID EAXPROPERTYID_EAX50_FXSlot2 =
  116. {
  117. 0x3C0F5252,
  118. 0x9834,
  119. 0x46F0,
  120. {0xA1, 0xD8, 0x5B, 0x95, 0xC4, 0xA0, 0xA, 0x30}
  121. };
  122. const GUID EAXPROPERTYID_EAX40_FXSlot3 =
  123. {
  124. 0xEFFF08EA,
  125. 0xC7D8,
  126. 0x44AB,
  127. {0x93, 0xAD, 0x6D, 0xBD, 0x5F, 0x91, 0x00, 0x64}
  128. };
  129. const GUID EAXPROPERTYID_EAX50_FXSlot3 =
  130. {
  131. 0xE2EB0EAA,
  132. 0xE806,
  133. 0x45E7,
  134. {0x9F, 0x86, 0x06, 0xC1, 0x57, 0x1A, 0x6F, 0xA3}
  135. };
  136. const GUID EAXPROPERTYID_EAX40_Source =
  137. {
  138. 0x1B86B823,
  139. 0x22DF,
  140. 0x4EAE,
  141. {0x8B, 0x3C, 0x12, 0x78, 0xCE, 0x54, 0x42, 0x27}
  142. };
  143. const GUID EAXPROPERTYID_EAX50_Source =
  144. {
  145. 0x5EDF82F0,
  146. 0x24A7,
  147. 0x4F38,
  148. {0x8E, 0x64, 0x2F, 0x09, 0xCA, 0x05, 0xDE, 0xE1}
  149. };
  150. const GUID EAX_REVERB_EFFECT =
  151. {
  152. 0xCF95C8F,
  153. 0xA3CC,
  154. 0x4849,
  155. {0xB0, 0xB6, 0x83, 0x2E, 0xCC, 0x18, 0x22, 0xDF}
  156. };
  157. const GUID EAX_AGCCOMPRESSOR_EFFECT =
  158. {
  159. 0xBFB7A01E,
  160. 0x7825,
  161. 0x4039,
  162. {0x92, 0x7F, 0x03, 0xAA, 0xBD, 0xA0, 0xC5, 0x60}
  163. };
  164. const GUID EAX_AUTOWAH_EFFECT =
  165. {
  166. 0xEC3130C0,
  167. 0xAC7A,
  168. 0x11D2,
  169. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  170. };
  171. const GUID EAX_CHORUS_EFFECT =
  172. {
  173. 0xDE6D6FE0,
  174. 0xAC79,
  175. 0x11D2,
  176. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  177. };
  178. const GUID EAX_DISTORTION_EFFECT =
  179. {
  180. 0x975A4CE0,
  181. 0xAC7E,
  182. 0x11D2,
  183. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  184. };
  185. const GUID EAX_ECHO_EFFECT =
  186. {
  187. 0xE9F1BC0,
  188. 0xAC82,
  189. 0x11D2,
  190. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  191. };
  192. const GUID EAX_EQUALIZER_EFFECT =
  193. {
  194. 0x65F94CE0,
  195. 0x9793,
  196. 0x11D3,
  197. {0x93, 0x9D, 0x00, 0xC0, 0xF0, 0x2D, 0xD6, 0xF0}
  198. };
  199. const GUID EAX_FLANGER_EFFECT =
  200. {
  201. 0xA70007C0,
  202. 0x7D2,
  203. 0x11D3,
  204. {0x9B, 0x1E, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  205. };
  206. const GUID EAX_FREQUENCYSHIFTER_EFFECT =
  207. {
  208. 0xDC3E1880,
  209. 0x9212,
  210. 0x11D3,
  211. {0x93, 0x9D, 0x00, 0xC0, 0xF0, 0x2D, 0xD6, 0xF0}
  212. };
  213. const GUID EAX_VOCALMORPHER_EFFECT =
  214. {
  215. 0xE41CF10C,
  216. 0x3383,
  217. 0x11D2,
  218. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  219. };
  220. const GUID EAX_PITCHSHIFTER_EFFECT =
  221. {
  222. 0xE7905100,
  223. 0xAFB2,
  224. 0x11D2,
  225. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  226. };
  227. const GUID EAX_RINGMODULATOR_EFFECT =
  228. {
  229. 0xB89FE60,
  230. 0xAFB5,
  231. 0x11D2,
  232. {0x88, 0xDD, 0x00, 0xA0, 0x24, 0xD1, 0x3C, 0xE1}
  233. };
  234. bool operator==(
  235. const EAX40CONTEXTPROPERTIES& lhs,
  236. const EAX40CONTEXTPROPERTIES& rhs) noexcept
  237. {
  238. return
  239. lhs.guidPrimaryFXSlotID == rhs.guidPrimaryFXSlotID &&
  240. lhs.flDistanceFactor == rhs.flDistanceFactor &&
  241. lhs.flAirAbsorptionHF == rhs.flAirAbsorptionHF &&
  242. lhs.flHFReference == rhs.flHFReference;
  243. }
  244. bool operator==(
  245. const EAX50CONTEXTPROPERTIES& lhs,
  246. const EAX50CONTEXTPROPERTIES& rhs) noexcept
  247. {
  248. return
  249. static_cast<const EAX40CONTEXTPROPERTIES&>(lhs) == static_cast<const EAX40CONTEXTPROPERTIES&>(rhs) &&
  250. lhs.flMacroFXFactor == rhs.flMacroFXFactor;
  251. }
  252. const GUID EAXCONTEXT_DEFAULTPRIMARYFXSLOTID = EAXPROPERTYID_EAX40_FXSlot0;
  253. bool operator==(
  254. const EAX40FXSLOTPROPERTIES& lhs,
  255. const EAX40FXSLOTPROPERTIES& rhs) noexcept
  256. {
  257. return
  258. lhs.guidLoadEffect == rhs.guidLoadEffect &&
  259. lhs.lVolume == rhs.lVolume &&
  260. lhs.lLock == rhs.lLock &&
  261. lhs.ulFlags == rhs.ulFlags;
  262. }
  263. bool operator==(
  264. const EAX50FXSLOTPROPERTIES& lhs,
  265. const EAX50FXSLOTPROPERTIES& rhs) noexcept
  266. {
  267. return
  268. static_cast<const EAX40FXSLOTPROPERTIES&>(lhs) == static_cast<const EAX40FXSLOTPROPERTIES&>(rhs) &&
  269. lhs.lOcclusion == rhs.lOcclusion &&
  270. lhs.flOcclusionLFRatio == rhs.flOcclusionLFRatio;
  271. }
  272. const EAX50ACTIVEFXSLOTS EAX40SOURCE_DEFAULTACTIVEFXSLOTID = EAX50ACTIVEFXSLOTS
  273. {{
  274. EAX_NULL_GUID,
  275. EAXPROPERTYID_EAX40_FXSlot0,
  276. }};
  277. bool operator==(
  278. const EAX50ACTIVEFXSLOTS& lhs,
  279. const EAX50ACTIVEFXSLOTS& rhs) noexcept
  280. {
  281. return std::equal(
  282. std::cbegin(lhs.guidActiveFXSlots),
  283. std::cend(lhs.guidActiveFXSlots),
  284. std::begin(rhs.guidActiveFXSlots));
  285. }
  286. bool operator!=(
  287. const EAX50ACTIVEFXSLOTS& lhs,
  288. const EAX50ACTIVEFXSLOTS& rhs) noexcept
  289. {
  290. return !(lhs == rhs);
  291. }
  292. const EAX50ACTIVEFXSLOTS EAX50SOURCE_3DDEFAULTACTIVEFXSLOTID = EAX50ACTIVEFXSLOTS
  293. {{
  294. EAX_NULL_GUID,
  295. EAX_PrimaryFXSlotID,
  296. EAX_NULL_GUID,
  297. EAX_NULL_GUID,
  298. }};
  299. const EAX50ACTIVEFXSLOTS EAX50SOURCE_2DDEFAULTACTIVEFXSLOTID = EAX50ACTIVEFXSLOTS
  300. {{
  301. EAX_NULL_GUID,
  302. EAX_NULL_GUID,
  303. EAX_NULL_GUID,
  304. EAX_NULL_GUID,
  305. }};
  306. bool operator==(
  307. const EAXREVERBPROPERTIES& lhs,
  308. const EAXREVERBPROPERTIES& rhs) noexcept
  309. {
  310. return
  311. lhs.ulEnvironment == rhs.ulEnvironment &&
  312. lhs.flEnvironmentSize == rhs.flEnvironmentSize &&
  313. lhs.flEnvironmentDiffusion == rhs.flEnvironmentDiffusion &&
  314. lhs.lRoom == rhs.lRoom &&
  315. lhs.lRoomHF == rhs.lRoomHF &&
  316. lhs.lRoomLF == rhs.lRoomLF &&
  317. lhs.flDecayTime == rhs.flDecayTime &&
  318. lhs.flDecayHFRatio == rhs.flDecayHFRatio &&
  319. lhs.flDecayLFRatio == rhs.flDecayLFRatio &&
  320. lhs.lReflections == rhs.lReflections &&
  321. lhs.flReflectionsDelay == rhs.flReflectionsDelay &&
  322. lhs.vReflectionsPan == rhs.vReflectionsPan &&
  323. lhs.lReverb == rhs.lReverb &&
  324. lhs.flReverbDelay == rhs.flReverbDelay &&
  325. lhs.vReverbPan == rhs.vReverbPan &&
  326. lhs.flEchoTime == rhs.flEchoTime &&
  327. lhs.flEchoDepth == rhs.flEchoDepth &&
  328. lhs.flModulationTime == rhs.flModulationTime &&
  329. lhs.flModulationDepth == rhs.flModulationDepth &&
  330. lhs.flAirAbsorptionHF == rhs.flAirAbsorptionHF &&
  331. lhs.flHFReference == rhs.flHFReference &&
  332. lhs.flLFReference == rhs.flLFReference &&
  333. lhs.flRoomRolloffFactor == rhs.flRoomRolloffFactor &&
  334. lhs.ulFlags == rhs.ulFlags;
  335. }
  336. bool operator!=(
  337. const EAXREVERBPROPERTIES& lhs,
  338. const EAXREVERBPROPERTIES& rhs) noexcept
  339. {
  340. return !(lhs == rhs);
  341. }
  342. namespace {
  343. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_GENERIC =
  344. {
  345. EAXREVERB_DEFAULTENVIRONMENT,
  346. EAXREVERB_DEFAULTENVIRONMENTSIZE,
  347. EAXREVERB_DEFAULTENVIRONMENTDIFFUSION,
  348. EAXREVERB_DEFAULTROOM,
  349. EAXREVERB_DEFAULTROOMHF,
  350. EAXREVERB_DEFAULTROOMLF,
  351. EAXREVERB_DEFAULTDECAYTIME,
  352. EAXREVERB_DEFAULTDECAYHFRATIO,
  353. EAXREVERB_DEFAULTDECAYLFRATIO,
  354. EAXREVERB_DEFAULTREFLECTIONS,
  355. EAXREVERB_DEFAULTREFLECTIONSDELAY,
  356. EAXREVERB_DEFAULTREFLECTIONSPAN,
  357. EAXREVERB_DEFAULTREVERB,
  358. EAXREVERB_DEFAULTREVERBDELAY,
  359. EAXREVERB_DEFAULTREVERBPAN,
  360. EAXREVERB_DEFAULTECHOTIME,
  361. EAXREVERB_DEFAULTECHODEPTH,
  362. EAXREVERB_DEFAULTMODULATIONTIME,
  363. EAXREVERB_DEFAULTMODULATIONDEPTH,
  364. EAXREVERB_DEFAULTAIRABSORPTIONHF,
  365. EAXREVERB_DEFAULTHFREFERENCE,
  366. EAXREVERB_DEFAULTLFREFERENCE,
  367. EAXREVERB_DEFAULTROOMROLLOFFFACTOR,
  368. EAXREVERB_DEFAULTFLAGS,
  369. };
  370. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_PADDEDCELL =
  371. {
  372. EAX_ENVIRONMENT_PADDEDCELL,
  373. 1.4F,
  374. 1.0F,
  375. -1'000L,
  376. -6'000L,
  377. 0L,
  378. 0.17F,
  379. 0.10F,
  380. 1.0F,
  381. -1'204L,
  382. 0.001F,
  383. EAXVECTOR{},
  384. 207L,
  385. 0.002F,
  386. EAXVECTOR{},
  387. 0.250F,
  388. 0.0F,
  389. 0.250F,
  390. 0.0F,
  391. -5.0F,
  392. 5'000.0F,
  393. 250.0F,
  394. 0.0F,
  395. 0x3FUL,
  396. };
  397. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_ROOM =
  398. {
  399. EAX_ENVIRONMENT_ROOM,
  400. 1.9F,
  401. 1.0F,
  402. -1'000L,
  403. -454L,
  404. 0L,
  405. 0.40F,
  406. 0.83F,
  407. 1.0F,
  408. -1'646L,
  409. 0.002F,
  410. EAXVECTOR{},
  411. 53L,
  412. 0.003F,
  413. EAXVECTOR{},
  414. 0.250F,
  415. 0.0F,
  416. 0.250F,
  417. 0.0F,
  418. -5.0F,
  419. 5'000.0F,
  420. 250.0F,
  421. 0.0F,
  422. 0x3FUL,
  423. };
  424. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_BATHROOM =
  425. {
  426. EAX_ENVIRONMENT_BATHROOM,
  427. 1.4F,
  428. 1.0F,
  429. -1'000L,
  430. -1'200L,
  431. 0L,
  432. 1.49F,
  433. 0.54F,
  434. 1.0F,
  435. -370L,
  436. 0.007F,
  437. EAXVECTOR{},
  438. 1'030L,
  439. 0.011F,
  440. EAXVECTOR{},
  441. 0.250F,
  442. 0.0F,
  443. 0.250F,
  444. 0.0F,
  445. -5.0F,
  446. 5'000.0F,
  447. 250.0F,
  448. 0.0F,
  449. 0x3FUL,
  450. };
  451. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_LIVINGROOM =
  452. {
  453. EAX_ENVIRONMENT_LIVINGROOM,
  454. 2.5F,
  455. 1.0F,
  456. -1'000L,
  457. -6'000L,
  458. 0L,
  459. 0.50F,
  460. 0.10F,
  461. 1.0F,
  462. -1'376,
  463. 0.003F,
  464. EAXVECTOR{},
  465. -1'104L,
  466. 0.004F,
  467. EAXVECTOR{},
  468. 0.250F,
  469. 0.0F,
  470. 0.250F,
  471. 0.0F,
  472. -5.0F,
  473. 5'000.0F,
  474. 250.0F,
  475. 0.0F,
  476. 0x3FUL,
  477. };
  478. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_STONEROOM =
  479. {
  480. EAX_ENVIRONMENT_STONEROOM,
  481. 11.6F,
  482. 1.0F,
  483. -1'000L,
  484. -300L,
  485. 0L,
  486. 2.31F,
  487. 0.64F,
  488. 1.0F,
  489. -711L,
  490. 0.012F,
  491. EAXVECTOR{},
  492. 83L,
  493. 0.017F,
  494. EAXVECTOR{},
  495. 0.250F,
  496. 0.0F,
  497. 0.250F,
  498. 0.0F,
  499. -5.0F,
  500. 5'000.0F,
  501. 250.0F,
  502. 0.0F,
  503. 0x3FUL,
  504. };
  505. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_AUDITORIUM =
  506. {
  507. EAX_ENVIRONMENT_AUDITORIUM,
  508. 21.6F,
  509. 1.0F,
  510. -1'000L,
  511. -476L,
  512. 0L,
  513. 4.32F,
  514. 0.59F,
  515. 1.0F,
  516. -789L,
  517. 0.020F,
  518. EAXVECTOR{},
  519. -289L,
  520. 0.030F,
  521. EAXVECTOR{},
  522. 0.250F,
  523. 0.0F,
  524. 0.250F,
  525. 0.0F,
  526. -5.0F,
  527. 5'000.0F,
  528. 250.0F,
  529. 0.0F,
  530. 0x3FUL,
  531. };
  532. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_CONCERTHALL =
  533. {
  534. EAX_ENVIRONMENT_CONCERTHALL,
  535. 19.6F,
  536. 1.0F,
  537. -1'000L,
  538. -500L,
  539. 0L,
  540. 3.92F,
  541. 0.70F,
  542. 1.0F,
  543. -1'230L,
  544. 0.020F,
  545. EAXVECTOR{},
  546. -2L,
  547. 0.029F,
  548. EAXVECTOR{},
  549. 0.250F,
  550. 0.0F,
  551. 0.250F,
  552. 0.0F,
  553. -5.0F,
  554. 5'000.0F,
  555. 250.0F,
  556. 0.0F,
  557. 0x3FUL,
  558. };
  559. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_CAVE =
  560. {
  561. EAX_ENVIRONMENT_CAVE,
  562. 14.6F,
  563. 1.0F,
  564. -1'000L,
  565. 0L,
  566. 0L,
  567. 2.91F,
  568. 1.30F,
  569. 1.0F,
  570. -602L,
  571. 0.015F,
  572. EAXVECTOR{},
  573. -302L,
  574. 0.022F,
  575. EAXVECTOR{},
  576. 0.250F,
  577. 0.0F,
  578. 0.250F,
  579. 0.0F,
  580. -5.0F,
  581. 5'000.0F,
  582. 250.0F,
  583. 0.0F,
  584. 0x1FUL,
  585. };
  586. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_ARENA =
  587. {
  588. EAX_ENVIRONMENT_ARENA,
  589. 36.2F,
  590. 1.0F,
  591. -1'000L,
  592. -698L,
  593. 0L,
  594. 7.24F,
  595. 0.33F,
  596. 1.0F,
  597. -1'166L,
  598. 0.020F,
  599. EAXVECTOR{},
  600. 16L,
  601. 0.030F,
  602. EAXVECTOR{},
  603. 0.250F,
  604. 0.0F,
  605. 0.250F,
  606. 0.0F,
  607. -5.0F,
  608. 5'000.0F,
  609. 250.0F,
  610. 0.0F,
  611. 0x3FUL,
  612. };
  613. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_HANGAR =
  614. {
  615. EAX_ENVIRONMENT_HANGAR,
  616. 50.3F,
  617. 1.0F,
  618. -1'000L,
  619. -1'000L,
  620. 0L,
  621. 10.05F,
  622. 0.23F,
  623. 1.0F,
  624. -602L,
  625. 0.020F,
  626. EAXVECTOR{},
  627. 198L,
  628. 0.030F,
  629. EAXVECTOR{},
  630. 0.250F,
  631. 0.0F,
  632. 0.250F,
  633. 0.0F,
  634. -5.0F,
  635. 5'000.0F,
  636. 250.0F,
  637. 0.0F,
  638. 0x3FUL,
  639. };
  640. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_CARPETTEDHALLWAY =
  641. {
  642. EAX_ENVIRONMENT_CARPETEDHALLWAY,
  643. 1.9F,
  644. 1.0F,
  645. -1'000L,
  646. -4'000L,
  647. 0L,
  648. 0.30F,
  649. 0.10F,
  650. 1.0F,
  651. -1'831L,
  652. 0.002F,
  653. EAXVECTOR{},
  654. -1'630L,
  655. 0.030F,
  656. EAXVECTOR{},
  657. 0.250F,
  658. 0.0F,
  659. 0.250F,
  660. 0.0F,
  661. -5.0F,
  662. 5'000.0F,
  663. 250.0F,
  664. 0.0F,
  665. 0x3FUL,
  666. };
  667. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_HALLWAY =
  668. {
  669. EAX_ENVIRONMENT_HALLWAY,
  670. 1.8F,
  671. 1.0F,
  672. -1'000L,
  673. -300L,
  674. 0L,
  675. 1.49F,
  676. 0.59F,
  677. 1.0F,
  678. -1'219L,
  679. 0.007F,
  680. EAXVECTOR{},
  681. 441L,
  682. 0.011F,
  683. EAXVECTOR{},
  684. 0.250F,
  685. 0.0F,
  686. 0.250F,
  687. 0.0F,
  688. -5.0F,
  689. 5'000.0F,
  690. 250.0F,
  691. 0.0F,
  692. 0x3FUL,
  693. };
  694. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_STONECORRIDOR =
  695. {
  696. EAX_ENVIRONMENT_STONECORRIDOR,
  697. 13.5F,
  698. 1.0F,
  699. -1'000L,
  700. -237L,
  701. 0L,
  702. 2.70F,
  703. 0.79F,
  704. 1.0F,
  705. -1'214L,
  706. 0.013F,
  707. EAXVECTOR{},
  708. 395L,
  709. 0.020F,
  710. EAXVECTOR{},
  711. 0.250F,
  712. 0.0F,
  713. 0.250F,
  714. 0.0F,
  715. -5.0F,
  716. 5'000.0F,
  717. 250.0F,
  718. 0.0F,
  719. 0x3FUL,
  720. };
  721. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_ALLEY =
  722. {
  723. EAX_ENVIRONMENT_ALLEY,
  724. 7.5F,
  725. 0.300F,
  726. -1'000L,
  727. -270L,
  728. 0L,
  729. 1.49F,
  730. 0.86F,
  731. 1.0F,
  732. -1'204L,
  733. 0.007F,
  734. EAXVECTOR{},
  735. -4L,
  736. 0.011F,
  737. EAXVECTOR{},
  738. 0.125F,
  739. 0.950F,
  740. 0.250F,
  741. 0.0F,
  742. -5.0F,
  743. 5'000.0F,
  744. 250.0F,
  745. 0.0F,
  746. 0x3FUL,
  747. };
  748. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_FOREST =
  749. {
  750. EAX_ENVIRONMENT_FOREST,
  751. 38.0F,
  752. 0.300F,
  753. -1'000L,
  754. -3'300L,
  755. 0L,
  756. 1.49F,
  757. 0.54F,
  758. 1.0F,
  759. -2'560L,
  760. 0.162F,
  761. EAXVECTOR{},
  762. -229L,
  763. 0.088F,
  764. EAXVECTOR{},
  765. 0.125F,
  766. 1.0F,
  767. 0.250F,
  768. 0.0F,
  769. -5.0F,
  770. 5'000.0F,
  771. 250.0F,
  772. 0.0F,
  773. 0x3FUL,
  774. };
  775. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_CITY =
  776. {
  777. EAX_ENVIRONMENT_CITY,
  778. 7.5F,
  779. 0.500F,
  780. -1'000L,
  781. -800L,
  782. 0L,
  783. 1.49F,
  784. 0.67F,
  785. 1.0F,
  786. -2'273L,
  787. 0.007F,
  788. EAXVECTOR{},
  789. -1'691L,
  790. 0.011F,
  791. EAXVECTOR{},
  792. 0.250F,
  793. 0.0F,
  794. 0.250F,
  795. 0.0F,
  796. -5.0F,
  797. 5'000.0F,
  798. 250.0F,
  799. 0.0F,
  800. 0x3FUL,
  801. };
  802. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_MOUNTAINS =
  803. {
  804. EAX_ENVIRONMENT_MOUNTAINS,
  805. 100.0F,
  806. 0.270F,
  807. -1'000L,
  808. -2'500L,
  809. 0L,
  810. 1.49F,
  811. 0.21F,
  812. 1.0F,
  813. -2'780L,
  814. 0.300F,
  815. EAXVECTOR{},
  816. -1'434L,
  817. 0.100F,
  818. EAXVECTOR{},
  819. 0.250F,
  820. 1.0F,
  821. 0.250F,
  822. 0.0F,
  823. -5.0F,
  824. 5'000.0F,
  825. 250.0F,
  826. 0.0F,
  827. 0x1FUL,
  828. };
  829. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_QUARRY =
  830. {
  831. EAX_ENVIRONMENT_QUARRY,
  832. 17.5F,
  833. 1.0F,
  834. -1'000L,
  835. -1'000L,
  836. 0L,
  837. 1.49F,
  838. 0.83F,
  839. 1.0F,
  840. -10'000L,
  841. 0.061F,
  842. EAXVECTOR{},
  843. 500L,
  844. 0.025F,
  845. EAXVECTOR{},
  846. 0.125F,
  847. 0.700F,
  848. 0.250F,
  849. 0.0F,
  850. -5.0F,
  851. 5'000.0F,
  852. 250.0F,
  853. 0.0F,
  854. 0x3FUL,
  855. };
  856. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_PLAIN =
  857. {
  858. EAX_ENVIRONMENT_PLAIN,
  859. 42.5F,
  860. 0.210F,
  861. -1'000L,
  862. -2'000L,
  863. 0L,
  864. 1.49F,
  865. 0.50F,
  866. 1.0F,
  867. -2'466L,
  868. 0.179F,
  869. EAXVECTOR{},
  870. -1'926L,
  871. 0.100F,
  872. EAXVECTOR{},
  873. 0.250F,
  874. 1.0F,
  875. 0.250F,
  876. 0.0F,
  877. -5.0F,
  878. 5'000.0F,
  879. 250.0F,
  880. 0.0F,
  881. 0x3FUL,
  882. };
  883. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_PARKINGLOT =
  884. {
  885. EAX_ENVIRONMENT_PARKINGLOT,
  886. 8.3F,
  887. 1.0F,
  888. -1'000L,
  889. 0L,
  890. 0L,
  891. 1.65F,
  892. 1.50F,
  893. 1.0F,
  894. -1'363L,
  895. 0.008F,
  896. EAXVECTOR{},
  897. -1'153L,
  898. 0.012F,
  899. EAXVECTOR{},
  900. 0.250F,
  901. 0.0F,
  902. 0.250F,
  903. 0.0F,
  904. -5.0F,
  905. 5'000.0F,
  906. 250.0F,
  907. 0.0F,
  908. 0x1FUL,
  909. };
  910. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_SEWERPIPE =
  911. {
  912. EAX_ENVIRONMENT_SEWERPIPE,
  913. 1.7F,
  914. 0.800F,
  915. -1'000L,
  916. -1'000L,
  917. 0L,
  918. 2.81F,
  919. 0.14F,
  920. 1.0F,
  921. 429L,
  922. 0.014F,
  923. EAXVECTOR{},
  924. 1'023L,
  925. 0.021F,
  926. EAXVECTOR{},
  927. 0.250F,
  928. 0.0F,
  929. 0.250F,
  930. 0.0F,
  931. -5.0F,
  932. 5'000.0F,
  933. 250.0F,
  934. 0.0F,
  935. 0x3FUL,
  936. };
  937. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_UNDERWATER =
  938. {
  939. EAX_ENVIRONMENT_UNDERWATER,
  940. 1.8F,
  941. 1.0F,
  942. -1'000L,
  943. -4'000L,
  944. 0L,
  945. 1.49F,
  946. 0.10F,
  947. 1.0F,
  948. -449L,
  949. 0.007F,
  950. EAXVECTOR{},
  951. 1'700L,
  952. 0.011F,
  953. EAXVECTOR{},
  954. 0.250F,
  955. 0.0F,
  956. 1.180F,
  957. 0.348F,
  958. -5.0F,
  959. 5'000.0F,
  960. 250.0F,
  961. 0.0F,
  962. 0x3FUL,
  963. };
  964. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_DRUGGED =
  965. {
  966. EAX_ENVIRONMENT_DRUGGED,
  967. 1.9F,
  968. 0.500F,
  969. -1'000L,
  970. 0L,
  971. 0L,
  972. 8.39F,
  973. 1.39F,
  974. 1.0F,
  975. -115L,
  976. 0.002F,
  977. EAXVECTOR{},
  978. 985L,
  979. 0.030F,
  980. EAXVECTOR{},
  981. 0.250F,
  982. 0.0F,
  983. 0.250F,
  984. 1.0F,
  985. -5.0F,
  986. 5'000.0F,
  987. 250.0F,
  988. 0.0F,
  989. 0x1FUL,
  990. };
  991. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_DIZZY =
  992. {
  993. EAX_ENVIRONMENT_DIZZY,
  994. 1.8F,
  995. 0.600F,
  996. -1'000L,
  997. -400L,
  998. 0L,
  999. 17.23F,
  1000. 0.56F,
  1001. 1.0F,
  1002. -1'713L,
  1003. 0.020F,
  1004. EAXVECTOR{},
  1005. -613L,
  1006. 0.030F,
  1007. EAXVECTOR{},
  1008. 0.250F,
  1009. 1.0F,
  1010. 0.810F,
  1011. 0.310F,
  1012. -5.0F,
  1013. 5'000.0F,
  1014. 250.0F,
  1015. 0.0F,
  1016. 0x1FUL,
  1017. };
  1018. constexpr EAXREVERBPROPERTIES EAXREVERB_PRESET_PSYCHOTIC =
  1019. {
  1020. EAX_ENVIRONMENT_PSYCHOTIC,
  1021. 1.0F,
  1022. 0.500F,
  1023. -1'000L,
  1024. -151L,
  1025. 0L,
  1026. 7.56F,
  1027. 0.91F,
  1028. 1.0F,
  1029. -626L,
  1030. 0.020F,
  1031. EAXVECTOR{},
  1032. 774L,
  1033. 0.030F,
  1034. EAXVECTOR{},
  1035. 0.250F,
  1036. 0.0F,
  1037. 4.0F,
  1038. 1.0F,
  1039. -5.0F,
  1040. 5'000.0F,
  1041. 250.0F,
  1042. 0.0F,
  1043. 0x1FUL,
  1044. };
  1045. } // namespace
  1046. const EaxReverbPresets EAXREVERB_PRESETS{{
  1047. EAXREVERB_PRESET_GENERIC,
  1048. EAXREVERB_PRESET_PADDEDCELL,
  1049. EAXREVERB_PRESET_ROOM,
  1050. EAXREVERB_PRESET_BATHROOM,
  1051. EAXREVERB_PRESET_LIVINGROOM,
  1052. EAXREVERB_PRESET_STONEROOM,
  1053. EAXREVERB_PRESET_AUDITORIUM,
  1054. EAXREVERB_PRESET_CONCERTHALL,
  1055. EAXREVERB_PRESET_CAVE,
  1056. EAXREVERB_PRESET_ARENA,
  1057. EAXREVERB_PRESET_HANGAR,
  1058. EAXREVERB_PRESET_CARPETTEDHALLWAY,
  1059. EAXREVERB_PRESET_HALLWAY,
  1060. EAXREVERB_PRESET_STONECORRIDOR,
  1061. EAXREVERB_PRESET_ALLEY,
  1062. EAXREVERB_PRESET_FOREST,
  1063. EAXREVERB_PRESET_CITY,
  1064. EAXREVERB_PRESET_MOUNTAINS,
  1065. EAXREVERB_PRESET_QUARRY,
  1066. EAXREVERB_PRESET_PLAIN,
  1067. EAXREVERB_PRESET_PARKINGLOT,
  1068. EAXREVERB_PRESET_SEWERPIPE,
  1069. EAXREVERB_PRESET_UNDERWATER,
  1070. EAXREVERB_PRESET_DRUGGED,
  1071. EAXREVERB_PRESET_DIZZY,
  1072. EAXREVERB_PRESET_PSYCHOTIC,
  1073. }};
  1074. namespace {
  1075. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_GENERIC = {EAX_ENVIRONMENT_GENERIC, 0.5F, 1.493F, 0.5F};
  1076. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_PADDEDCELL = {EAX_ENVIRONMENT_PADDEDCELL, 0.25F, 0.1F, 0.0F};
  1077. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_ROOM = {EAX_ENVIRONMENT_ROOM, 0.417F, 0.4F, 0.666F};
  1078. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_BATHROOM = {EAX_ENVIRONMENT_BATHROOM, 0.653F, 1.499F, 0.166F};
  1079. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_LIVINGROOM = {EAX_ENVIRONMENT_LIVINGROOM, 0.208F, 0.478F, 0.0F};
  1080. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_STONEROOM = {EAX_ENVIRONMENT_STONEROOM, 0.5F, 2.309F, 0.888F};
  1081. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_AUDITORIUM = {EAX_ENVIRONMENT_AUDITORIUM, 0.403F, 4.279F, 0.5F};
  1082. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_CONCERTHALL = {EAX_ENVIRONMENT_CONCERTHALL, 0.5F, 3.961F, 0.5F};
  1083. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_CAVE = {EAX_ENVIRONMENT_CAVE, 0.5F, 2.886F, 1.304F};
  1084. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_ARENA = {EAX_ENVIRONMENT_ARENA, 0.361F, 7.284F, 0.332F};
  1085. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_HANGAR = {EAX_ENVIRONMENT_HANGAR, 0.5F, 10.0F, 0.3F};
  1086. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_CARPETTEDHALLWAY = {EAX_ENVIRONMENT_CARPETEDHALLWAY, 0.153F, 0.259F, 2.0F};
  1087. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_HALLWAY = {EAX_ENVIRONMENT_HALLWAY, 0.361F, 1.493F, 0.0F};
  1088. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_STONECORRIDOR = {EAX_ENVIRONMENT_STONECORRIDOR, 0.444F, 2.697F, 0.638F};
  1089. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_ALLEY = {EAX_ENVIRONMENT_ALLEY, 0.25F, 1.752F, 0.776F};
  1090. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_FOREST = {EAX_ENVIRONMENT_FOREST, 0.111F, 3.145F, 0.472F};
  1091. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_CITY = {EAX_ENVIRONMENT_CITY, 0.111F, 2.767F, 0.224F};
  1092. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_MOUNTAINS = {EAX_ENVIRONMENT_MOUNTAINS, 0.194F, 7.841F, 0.472F};
  1093. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_QUARRY = {EAX_ENVIRONMENT_QUARRY, 1.0F, 1.499F, 0.5F};
  1094. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_PLAIN = {EAX_ENVIRONMENT_PLAIN, 0.097F, 2.767F, 0.224F};
  1095. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_PARKINGLOT = {EAX_ENVIRONMENT_PARKINGLOT, 0.208F, 1.652F, 1.5F};
  1096. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_SEWERPIPE = {EAX_ENVIRONMENT_SEWERPIPE, 0.652F, 2.886F, 0.25F};
  1097. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_UNDERWATER = {EAX_ENVIRONMENT_UNDERWATER, 1.0F, 1.499F, 0.0F};
  1098. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_DRUGGED = {EAX_ENVIRONMENT_DRUGGED, 0.875F, 8.392F, 1.388F};
  1099. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_DIZZY = {EAX_ENVIRONMENT_DIZZY, 0.139F, 17.234F, 0.666F};
  1100. constexpr EAX_REVERBPROPERTIES EAX1REVERB_PRESET_PSYCHOTIC = {EAX_ENVIRONMENT_PSYCHOTIC, 0.486F, 7.563F, 0.806F};
  1101. } // namespace
  1102. const Eax1ReverbPresets EAX1REVERB_PRESETS{{
  1103. EAX1REVERB_PRESET_GENERIC,
  1104. EAX1REVERB_PRESET_PADDEDCELL,
  1105. EAX1REVERB_PRESET_ROOM,
  1106. EAX1REVERB_PRESET_BATHROOM,
  1107. EAX1REVERB_PRESET_LIVINGROOM,
  1108. EAX1REVERB_PRESET_STONEROOM,
  1109. EAX1REVERB_PRESET_AUDITORIUM,
  1110. EAX1REVERB_PRESET_CONCERTHALL,
  1111. EAX1REVERB_PRESET_CAVE,
  1112. EAX1REVERB_PRESET_ARENA,
  1113. EAX1REVERB_PRESET_HANGAR,
  1114. EAX1REVERB_PRESET_CARPETTEDHALLWAY,
  1115. EAX1REVERB_PRESET_HALLWAY,
  1116. EAX1REVERB_PRESET_STONECORRIDOR,
  1117. EAX1REVERB_PRESET_ALLEY,
  1118. EAX1REVERB_PRESET_FOREST,
  1119. EAX1REVERB_PRESET_CITY,
  1120. EAX1REVERB_PRESET_MOUNTAINS,
  1121. EAX1REVERB_PRESET_QUARRY,
  1122. EAX1REVERB_PRESET_PLAIN,
  1123. EAX1REVERB_PRESET_PARKINGLOT,
  1124. EAX1REVERB_PRESET_SEWERPIPE,
  1125. EAX1REVERB_PRESET_UNDERWATER,
  1126. EAX1REVERB_PRESET_DRUGGED,
  1127. EAX1REVERB_PRESET_DIZZY,
  1128. EAX1REVERB_PRESET_PSYCHOTIC,
  1129. }};