Team Fortress 2 Source Code as on 22/4/2020
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.

124 lines
4.9 KiB

  1. // EAX.H -- DirectSound Environmental Audio Extensions
  2. #ifndef EAX_H
  3. #define EAX_H
  4. #pragma once
  5. // EAX (listener) reverb property set {4a4e6fc1-c341-11d1-b73a-444553540000}
  6. DEFINE_GUID(DSPROPSETID_EAX_ReverbProperties,
  7. 0x4a4e6fc1,
  8. 0xc341,
  9. 0x11d1,
  10. 0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
  11. typedef enum
  12. {
  13. DSPROPERTY_EAX_ALL, // all reverb properties
  14. DSPROPERTY_EAX_ENVIRONMENT, // standard environment no.
  15. DSPROPERTY_EAX_VOLUME, // loudness of the reverb
  16. DSPROPERTY_EAX_DECAYTIME, // how long the reverb lasts
  17. DSPROPERTY_EAX_DAMPING // the high frequencies decay faster
  18. } DSPROPERTY_EAX_REVERBPROPERTY;
  19. #define EAX_NUM_STANDARD_PROPERTIES (DSPROPERTY_EAX_DAMPING + 1)
  20. // use this structure for get/set all properties...
  21. typedef struct
  22. {
  23. unsigned long environment; // 0 to EAX_ENVIRONMENT_COUNT-1
  24. float fVolume; // 0 to 1
  25. float fDecayTime_sec; // seconds, 0.1 to 100
  26. float fDamping; // 0 to 1
  27. } EAX_REVERBPROPERTIES;
  28. enum
  29. {
  30. EAX_ENVIRONMENT_GENERIC, // factory default
  31. EAX_ENVIRONMENT_PADDEDCELL,
  32. EAX_ENVIRONMENT_ROOM, // standard environments
  33. EAX_ENVIRONMENT_BATHROOM,
  34. EAX_ENVIRONMENT_LIVINGROOM,
  35. EAX_ENVIRONMENT_STONEROOM,
  36. EAX_ENVIRONMENT_AUDITORIUM,
  37. EAX_ENVIRONMENT_CONCERTHALL,
  38. EAX_ENVIRONMENT_CAVE,
  39. EAX_ENVIRONMENT_ARENA,
  40. EAX_ENVIRONMENT_HANGAR,
  41. EAX_ENVIRONMENT_CARPETEDHALLWAY,
  42. EAX_ENVIRONMENT_HALLWAY,
  43. EAX_ENVIRONMENT_STONECORRIDOR,
  44. EAX_ENVIRONMENT_ALLEY,
  45. EAX_ENVIRONMENT_FOREST,
  46. EAX_ENVIRONMENT_CITY,
  47. EAX_ENVIRONMENT_MOUNTAINS,
  48. EAX_ENVIRONMENT_QUARRY,
  49. EAX_ENVIRONMENT_PLAIN,
  50. EAX_ENVIRONMENT_PARKINGLOT,
  51. EAX_ENVIRONMENT_SEWERPIPE,
  52. EAX_ENVIRONMENT_UNDERWATER,
  53. EAX_ENVIRONMENT_DRUGGED,
  54. EAX_ENVIRONMENT_DIZZY,
  55. EAX_ENVIRONMENT_PSYCHOTIC,
  56. EAX_ENVIRONMENT_COUNT // total number of environments
  57. };
  58. #define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1)
  59. // presets
  60. #define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC,0.5F,1.493F,0.5F
  61. #define EAX_PRESET_PADDEDCELL EAX_ENVIRONMENT_PADDEDCELL,0.25F,0.1F,0.0F
  62. #define EAX_PRESET_ROOM EAX_ENVIRONMENT_ROOM,0.417F,0.4F,0.666F
  63. #define EAX_PRESET_BATHROOM EAX_ENVIRONMENT_BATHROOM,0.653F,1.499F,0.166F
  64. #define EAX_PRESET_LIVINGROOM EAX_ENVIRONMENT_LIVINGROOM,0.208F,0.478F,0.0F
  65. #define EAX_PRESET_STONEROOM EAX_ENVIRONMENT_STONEROOM,0.5F,2.309F,0.888F
  66. #define EAX_PRESET_AUDITORIUM EAX_ENVIRONMENT_AUDITORIUM,0.403F,4.279F,0.5F
  67. #define EAX_PRESET_CONCERTHALL EAX_ENVIRONMENT_CONCERTHALL,0.5F,3.961F,0.5F
  68. #define EAX_PRESET_CAVE EAX_ENVIRONMENT_CAVE,0.5F,2.886F,1.304F
  69. #define EAX_PRESET_ARENA EAX_ENVIRONMENT_ARENA,0.361F,7.284F,0.332F
  70. #define EAX_PRESET_HANGAR EAX_ENVIRONMENT_HANGAR,0.5F,10.0F,0.3F
  71. #define EAX_PRESET_CARPETEDHALLWAY EAX_ENVIRONMENT_CARPETEDHALLWAY,0.153F,0.259F,2.0F
  72. #define EAX_PRESET_HALLWAY EAX_ENVIRONMENT_HALLWAY,0.361F,1.493F,0.0F
  73. #define EAX_PRESET_STONECORRIDOR EAX_ENVIRONMENT_STONECORRIDOR,0.444F,2.697F,0.638F
  74. #define EAX_PRESET_ALLEY EAX_ENVIRONMENT_ALLEY,0.25F,1.752F,0.776F
  75. #define EAX_PRESET_FOREST EAX_ENVIRONMENT_FOREST,0.111F,3.145F,0.472F
  76. #define EAX_PRESET_CITY EAX_ENVIRONMENT_CITY,0.111F,2.767F,0.224F
  77. #define EAX_PRESET_MOUNTAINS EAX_ENVIRONMENT_MOUNTAINS,0.194F,7.841F,0.472F
  78. #define EAX_PRESET_QUARRY EAX_ENVIRONMENT_QUARRY,1.0F,1.499F,0.5F
  79. #define EAX_PRESET_PLAIN EAX_ENVIRONMENT_PLAIN,0.097F,2.767F,0.224F
  80. #define EAX_PRESET_PARKINGLOT EAX_ENVIRONMENT_PARKINGLOT,0.208F,1.652F,1.5F
  81. #define EAX_PRESET_SEWERPIPE EAX_ENVIRONMENT_SEWERPIPE,0.652F,2.886F,0.25F
  82. #define EAX_PRESET_UNDERWATER EAX_ENVIRONMENT_UNDERWATER,1.0F,1.499F,0.0F
  83. #define EAX_PRESET_DRUGGED EAX_ENVIRONMENT_DRUGGED,0.875F,8.392F,1.388F
  84. #define EAX_PRESET_DIZZY EAX_ENVIRONMENT_DIZZY,0.139F,17.234F,0.666F
  85. #define EAX_PRESET_PSYCHOTIC EAX_ENVIRONMENT_PSYCHOTIC,0.486F,7.563F,0.806F
  86. // EAX buffer reverb property set {4a4e6fc0-c341-11d1-b73a-444553540000}
  87. DEFINE_GUID(DSPROPSETID_EAXBUFFER_ReverbProperties,
  88. 0x4a4e6fc0,
  89. 0xc341,
  90. 0x11d1,
  91. 0xb7, 0x3a, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
  92. typedef enum
  93. {
  94. DSPROPERTY_EAXBUFFER_ALL, // all reverb buffer properties
  95. DSPROPERTY_EAXBUFFER_REVERBMIX // the wet source amount
  96. } DSPROPERTY_EAXBUFFER_REVERBPROPERTY;
  97. // use this structure for get/set all properties...
  98. typedef struct
  99. {
  100. float fMix; // linear factor, 0.0F to 1.0F
  101. } EAXBUFFER_REVERBPROPERTIES;
  102. #define EAX_REVERBMIX_USEDISTANCE -1.0F // out of normal range
  103. // signifies the reverb engine should
  104. // calculate it's own reverb mix value
  105. // based on distance
  106. #endif // EAX_H