Check some float property values for being finite
[openal-soft.git] / al / eax / api.h
blob8ac1e62fb8a4d53fc48758b655573107be21cd77
1 #ifndef EAX_API_INCLUDED
2 #define EAX_API_INCLUDED
5 //
6 // EAX API.
7 //
8 // Based on headers `eax[2-5].h` included in Doom 3 source code:
9 // https://github.com/id-Software/DOOM-3/tree/master/neo/openal/include
13 #include <array>
14 #include <cfloat>
15 #include <cstdint>
16 #include <cstring>
17 #include <tuple>
18 #ifdef _WIN32
19 #include <guiddef.h>
20 #endif
22 #include "AL/al.h"
25 #ifndef _WIN32
26 using GUID = struct _GUID { /* NOLINT(*-reserved-identifier) */
27 std::uint32_t Data1;
28 std::uint16_t Data2;
29 std::uint16_t Data3;
30 std::array<std::uint8_t,8> Data4;
33 inline bool operator==(const GUID& lhs, const GUID& rhs) noexcept
34 { return std::memcmp(&lhs, &rhs, sizeof(GUID)) == 0; }
36 inline bool operator!=(const GUID& lhs, const GUID& rhs) noexcept
37 { return !(lhs == rhs); }
38 #endif // _WIN32
40 /* TODO: This seems to create very inefficient comparisons. C++20 should allow
41 * creating default comparison operators, avoiding the need for this.
43 #define DECL_EQOP(T, ...) \
44 [[nodiscard]] auto get_members() const noexcept { return std::forward_as_tuple(__VA_ARGS__); } \
45 [[nodiscard]] friend bool operator==(const T &lhs, const T &rhs) noexcept \
46 { return lhs.get_members() == rhs.get_members(); } \
47 [[nodiscard]] friend bool operator!=(const T &lhs, const T &rhs) noexcept { return !(lhs == rhs); }
49 extern const GUID DSPROPSETID_EAX_ReverbProperties;
51 enum DSPROPERTY_EAX_REVERBPROPERTY : unsigned int {
52 DSPROPERTY_EAX_ALL,
53 DSPROPERTY_EAX_ENVIRONMENT,
54 DSPROPERTY_EAX_VOLUME,
55 DSPROPERTY_EAX_DECAYTIME,
56 DSPROPERTY_EAX_DAMPING,
57 }; // DSPROPERTY_EAX_REVERBPROPERTY
59 struct EAX_REVERBPROPERTIES {
60 unsigned long environment;
61 float fVolume;
62 float fDecayTime_sec;
63 float fDamping;
64 }; // EAX_REVERBPROPERTIES
67 extern const GUID DSPROPSETID_EAXBUFFER_ReverbProperties;
69 enum DSPROPERTY_EAXBUFFER_REVERBPROPERTY : unsigned int {
70 DSPROPERTY_EAXBUFFER_ALL,
71 DSPROPERTY_EAXBUFFER_REVERBMIX,
72 }; // DSPROPERTY_EAXBUFFER_REVERBPROPERTY
74 struct EAXBUFFER_REVERBPROPERTIES {
75 float fMix;
78 constexpr auto EAX_BUFFER_MINREVERBMIX = 0.0F;
79 constexpr auto EAX_BUFFER_MAXREVERBMIX = 1.0F;
80 constexpr auto EAX_REVERBMIX_USEDISTANCE = -1.0F;
83 extern const GUID DSPROPSETID_EAX20_ListenerProperties;
85 enum DSPROPERTY_EAX20_LISTENERPROPERTY : unsigned int {
86 DSPROPERTY_EAX20LISTENER_NONE,
87 DSPROPERTY_EAX20LISTENER_ALLPARAMETERS,
88 DSPROPERTY_EAX20LISTENER_ROOM,
89 DSPROPERTY_EAX20LISTENER_ROOMHF,
90 DSPROPERTY_EAX20LISTENER_ROOMROLLOFFFACTOR,
91 DSPROPERTY_EAX20LISTENER_DECAYTIME,
92 DSPROPERTY_EAX20LISTENER_DECAYHFRATIO,
93 DSPROPERTY_EAX20LISTENER_REFLECTIONS,
94 DSPROPERTY_EAX20LISTENER_REFLECTIONSDELAY,
95 DSPROPERTY_EAX20LISTENER_REVERB,
96 DSPROPERTY_EAX20LISTENER_REVERBDELAY,
97 DSPROPERTY_EAX20LISTENER_ENVIRONMENT,
98 DSPROPERTY_EAX20LISTENER_ENVIRONMENTSIZE,
99 DSPROPERTY_EAX20LISTENER_ENVIRONMENTDIFFUSION,
100 DSPROPERTY_EAX20LISTENER_AIRABSORPTIONHF,
101 DSPROPERTY_EAX20LISTENER_FLAGS
102 }; // DSPROPERTY_EAX20_LISTENERPROPERTY
104 struct EAX20LISTENERPROPERTIES {
105 long lRoom; // room effect level at low frequencies
106 long lRoomHF; // room effect high-frequency level re. low frequency level
107 float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
108 float flDecayTime; // reverberation decay time at low frequencies
109 float flDecayHFRatio; // high-frequency to low-frequency decay time ratio
110 long lReflections; // early reflections level relative to room effect
111 float flReflectionsDelay; // initial reflection delay time
112 long lReverb; // late reverberation level relative to room effect
113 float flReverbDelay; // late reverberation delay time relative to initial reflection
114 unsigned long dwEnvironment; // sets all listener properties
115 float flEnvironmentSize; // environment size in meters
116 float flEnvironmentDiffusion; // environment diffusion
117 float flAirAbsorptionHF; // change in level per meter at 5 kHz
118 unsigned long dwFlags; // modifies the behavior of properties
119 }; // EAX20LISTENERPROPERTIES
121 enum : unsigned long {
122 EAX2_ENVIRONMENT_GENERIC,
123 EAX2_ENVIRONMENT_PADDEDCELL,
124 EAX2_ENVIRONMENT_ROOM,
125 EAX2_ENVIRONMENT_BATHROOM,
126 EAX2_ENVIRONMENT_LIVINGROOM,
127 EAX2_ENVIRONMENT_STONEROOM,
128 EAX2_ENVIRONMENT_AUDITORIUM,
129 EAX2_ENVIRONMENT_CONCERTHALL,
130 EAX2_ENVIRONMENT_CAVE,
131 EAX2_ENVIRONMENT_ARENA,
132 EAX2_ENVIRONMENT_HANGAR,
133 EAX2_ENVIRONMENT_CARPETEDHALLWAY,
134 EAX2_ENVIRONMENT_HALLWAY,
135 EAX2_ENVIRONMENT_STONECORRIDOR,
136 EAX2_ENVIRONMENT_ALLEY,
137 EAX2_ENVIRONMENT_FOREST,
138 EAX2_ENVIRONMENT_CITY,
139 EAX2_ENVIRONMENT_MOUNTAINS,
140 EAX2_ENVIRONMENT_QUARRY,
141 EAX2_ENVIRONMENT_PLAIN,
142 EAX2_ENVIRONMENT_PARKINGLOT,
143 EAX2_ENVIRONMENT_SEWERPIPE,
144 EAX2_ENVIRONMENT_UNDERWATER,
145 EAX2_ENVIRONMENT_DRUGGED,
146 EAX2_ENVIRONMENT_DIZZY,
147 EAX2_ENVIRONMENT_PSYCHOTIC,
149 EAX2_ENVIRONMENT_COUNT,
152 constexpr auto EAX2LISTENERFLAGS_DECAYTIMESCALE = 0x00000001UL;
153 constexpr auto EAX2LISTENERFLAGS_REFLECTIONSSCALE = 0x00000002UL;
154 constexpr auto EAX2LISTENERFLAGS_REFLECTIONSDELAYSCALE = 0x00000004UL;
155 constexpr auto EAX2LISTENERFLAGS_REVERBSCALE = 0x00000008UL;
156 constexpr auto EAX2LISTENERFLAGS_REVERBDELAYSCALE = 0x00000010UL;
157 constexpr auto EAX2LISTENERFLAGS_DECAYHFLIMIT = 0x00000020UL;
158 constexpr auto EAX2LISTENERFLAGS_RESERVED = 0xFFFFFFC0UL;
160 constexpr auto EAX2LISTENER_MINROOM = -10'000L;
161 constexpr auto EAX2LISTENER_MAXROOM = 0L;
162 constexpr auto EAX2LISTENER_DEFAULTROOM = -1'000L;
164 constexpr auto EAX2LISTENER_MINROOMHF = -10'000L;
165 constexpr auto EAX2LISTENER_MAXROOMHF = 0L;
166 constexpr auto EAX2LISTENER_DEFAULTROOMHF = -100L;
168 constexpr auto EAX2LISTENER_MINROOMROLLOFFFACTOR = 0.0F;
169 constexpr auto EAX2LISTENER_MAXROOMROLLOFFFACTOR = 10.0F;
170 constexpr auto EAX2LISTENER_DEFAULTROOMROLLOFFFACTOR = 0.0F;
172 constexpr auto EAX2LISTENER_MINDECAYTIME = 0.1F;
173 constexpr auto EAX2LISTENER_MAXDECAYTIME = 20.0F;
174 constexpr auto EAX2LISTENER_DEFAULTDECAYTIME = 1.49F;
176 constexpr auto EAX2LISTENER_MINDECAYHFRATIO = 0.1F;
177 constexpr auto EAX2LISTENER_MAXDECAYHFRATIO = 2.0F;
178 constexpr auto EAX2LISTENER_DEFAULTDECAYHFRATIO = 0.83F;
180 constexpr auto EAX2LISTENER_MINREFLECTIONS = -10'000L;
181 constexpr auto EAX2LISTENER_MAXREFLECTIONS = 1'000L;
182 constexpr auto EAX2LISTENER_DEFAULTREFLECTIONS = -2'602L;
184 constexpr auto EAX2LISTENER_MINREFLECTIONSDELAY = 0.0F;
185 constexpr auto EAX2LISTENER_MAXREFLECTIONSDELAY = 0.3F;
186 constexpr auto EAX2LISTENER_DEFAULTREFLECTIONSDELAY = 0.007F;
188 constexpr auto EAX2LISTENER_MINREVERB = -10'000L;
189 constexpr auto EAX2LISTENER_MAXREVERB = 2'000L;
190 constexpr auto EAX2LISTENER_DEFAULTREVERB = 200L;
192 constexpr auto EAX2LISTENER_MINREVERBDELAY = 0.0F;
193 constexpr auto EAX2LISTENER_MAXREVERBDELAY = 0.1F;
194 constexpr auto EAX2LISTENER_DEFAULTREVERBDELAY = 0.011F;
196 constexpr auto EAX2LISTENER_MINENVIRONMENT = 0UL;
197 constexpr auto EAX2LISTENER_MAXENVIRONMENT = EAX2_ENVIRONMENT_COUNT - 1;
198 constexpr auto EAX2LISTENER_DEFAULTENVIRONMENT = EAX2_ENVIRONMENT_GENERIC;
200 constexpr auto EAX2LISTENER_MINENVIRONMENTSIZE = 1.0F;
201 constexpr auto EAX2LISTENER_MAXENVIRONMENTSIZE = 100.0F;
202 constexpr auto EAX2LISTENER_DEFAULTENVIRONMENTSIZE = 7.5F;
204 constexpr auto EAX2LISTENER_MINENVIRONMENTDIFFUSION = 0.0F;
205 constexpr auto EAX2LISTENER_MAXENVIRONMENTDIFFUSION = 1.0F;
206 constexpr auto EAX2LISTENER_DEFAULTENVIRONMENTDIFFUSION = 1.0F;
208 constexpr auto EAX2LISTENER_MINAIRABSORPTIONHF = -100.0F;
209 constexpr auto EAX2LISTENER_MAXAIRABSORPTIONHF = 0.0F;
210 constexpr auto EAX2LISTENER_DEFAULTAIRABSORPTIONHF = -5.0F;
212 constexpr auto EAX2LISTENER_DEFAULTFLAGS =
213 EAX2LISTENERFLAGS_DECAYTIMESCALE |
214 EAX2LISTENERFLAGS_REFLECTIONSSCALE |
215 EAX2LISTENERFLAGS_REFLECTIONSDELAYSCALE |
216 EAX2LISTENERFLAGS_REVERBSCALE |
217 EAX2LISTENERFLAGS_REVERBDELAYSCALE |
218 EAX2LISTENERFLAGS_DECAYHFLIMIT;
221 extern const GUID DSPROPSETID_EAX20_BufferProperties;
223 enum DSPROPERTY_EAX20_BUFFERPROPERTY : unsigned int {
224 DSPROPERTY_EAX20BUFFER_NONE,
225 DSPROPERTY_EAX20BUFFER_ALLPARAMETERS,
226 DSPROPERTY_EAX20BUFFER_DIRECT,
227 DSPROPERTY_EAX20BUFFER_DIRECTHF,
228 DSPROPERTY_EAX20BUFFER_ROOM,
229 DSPROPERTY_EAX20BUFFER_ROOMHF,
230 DSPROPERTY_EAX20BUFFER_ROOMROLLOFFFACTOR,
231 DSPROPERTY_EAX20BUFFER_OBSTRUCTION,
232 DSPROPERTY_EAX20BUFFER_OBSTRUCTIONLFRATIO,
233 DSPROPERTY_EAX20BUFFER_OCCLUSION,
234 DSPROPERTY_EAX20BUFFER_OCCLUSIONLFRATIO,
235 DSPROPERTY_EAX20BUFFER_OCCLUSIONROOMRATIO,
236 DSPROPERTY_EAX20BUFFER_OUTSIDEVOLUMEHF,
237 DSPROPERTY_EAX20BUFFER_AIRABSORPTIONFACTOR,
238 DSPROPERTY_EAX20BUFFER_FLAGS
239 }; // DSPROPERTY_EAX20_BUFFERPROPERTY
241 struct EAX20BUFFERPROPERTIES {
242 long lDirect; // direct path level
243 long lDirectHF; // direct path level at high frequencies
244 long lRoom; // room effect level
245 long lRoomHF; // room effect level at high frequencies
246 float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
247 long lObstruction; // main obstruction control (attenuation at high frequencies)
248 float flObstructionLFRatio; // obstruction low-frequency level re. main control
249 long lOcclusion; // main occlusion control (attenuation at high frequencies)
250 float flOcclusionLFRatio; // occlusion low-frequency level re. main control
251 float flOcclusionRoomRatio; // occlusion room effect level re. main control
252 long lOutsideVolumeHF; // outside sound cone level at high frequencies
253 float flAirAbsorptionFactor; // multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF
254 unsigned long dwFlags; // modifies the behavior of properties
255 }; // EAX20BUFFERPROPERTIES
257 extern const GUID DSPROPSETID_EAX30_ListenerProperties;
259 extern const GUID DSPROPSETID_EAX30_BufferProperties;
262 constexpr auto EAX_MAX_FXSLOTS = 4;
264 constexpr auto EAX40_MAX_ACTIVE_FXSLOTS = 2;
265 constexpr auto EAX50_MAX_ACTIVE_FXSLOTS = 4;
268 constexpr auto EAX_OK = 0L;
269 constexpr auto EAXERR_INVALID_OPERATION = -1L;
270 constexpr auto EAXERR_INVALID_VALUE = -2L;
271 constexpr auto EAXERR_NO_EFFECT_LOADED = -3L;
272 constexpr auto EAXERR_UNKNOWN_EFFECT = -4L;
273 constexpr auto EAXERR_INCOMPATIBLE_SOURCE_TYPE = -5L;
274 constexpr auto EAXERR_INCOMPATIBLE_EAX_VERSION = -6L;
277 extern const GUID EAX_NULL_GUID;
279 extern const GUID EAX_PrimaryFXSlotID;
282 struct EAXVECTOR {
283 float x;
284 float y;
285 float z;
288 [[nodiscard]]
289 inline bool operator==(const EAXVECTOR& lhs, const EAXVECTOR& rhs) noexcept
290 { return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z; }
292 [[nodiscard]]
293 inline bool operator!=(const EAXVECTOR& lhs, const EAXVECTOR& rhs) noexcept
294 { return !(lhs == rhs); }
297 extern const GUID EAXPROPERTYID_EAX40_Context;
299 extern const GUID EAXPROPERTYID_EAX50_Context;
301 // EAX50
302 constexpr auto HEADPHONES = 0UL;
303 constexpr auto SPEAKERS_2 = 1UL;
304 constexpr auto SPEAKERS_4 = 2UL;
305 constexpr auto SPEAKERS_5 = 3UL; // 5.1 speakers
306 constexpr auto SPEAKERS_6 = 4UL; // 6.1 speakers
307 constexpr auto SPEAKERS_7 = 5UL; // 7.1 speakers
309 constexpr auto EAXCONTEXT_MINSPEAKERCONFIG = HEADPHONES;
310 constexpr auto EAXCONTEXT_MAXSPEAKERCONFIG = SPEAKERS_7;
312 // EAX50
313 constexpr auto EAX_40 = 5UL; // EAX 4.0
314 constexpr auto EAX_50 = 6UL; // EAX 5.0
316 constexpr auto EAXCONTEXT_MINEAXSESSION = EAX_40;
317 constexpr auto EAXCONTEXT_MAXEAXSESSION = EAX_50;
318 constexpr auto EAXCONTEXT_DEFAULTEAXSESSION = EAX_40;
320 constexpr auto EAXCONTEXT_MINMAXACTIVESENDS = 2UL;
321 constexpr auto EAXCONTEXT_MAXMAXACTIVESENDS = 4UL;
322 constexpr auto EAXCONTEXT_DEFAULTMAXACTIVESENDS = 2UL;
324 // EAX50
325 struct EAXSESSIONPROPERTIES {
326 unsigned long ulEAXVersion;
327 unsigned long ulMaxActiveSends;
328 }; // EAXSESSIONPROPERTIES
330 enum EAXCONTEXT_PROPERTY : unsigned int {
331 EAXCONTEXT_NONE = 0,
332 EAXCONTEXT_ALLPARAMETERS,
333 EAXCONTEXT_PRIMARYFXSLOTID,
334 EAXCONTEXT_DISTANCEFACTOR,
335 EAXCONTEXT_AIRABSORPTIONHF,
336 EAXCONTEXT_HFREFERENCE,
337 EAXCONTEXT_LASTERROR,
339 // EAX50
340 EAXCONTEXT_SPEAKERCONFIG,
341 EAXCONTEXT_EAXSESSION,
342 EAXCONTEXT_MACROFXFACTOR,
343 }; // EAXCONTEXT_PROPERTY
345 struct EAX40CONTEXTPROPERTIES {
346 GUID guidPrimaryFXSlotID;
347 float flDistanceFactor;
348 float flAirAbsorptionHF;
349 float flHFReference;
350 }; // EAX40CONTEXTPROPERTIES
352 struct EAX50CONTEXTPROPERTIES : public EAX40CONTEXTPROPERTIES {
353 float flMacroFXFactor;
354 }; // EAX50CONTEXTPROPERTIES
357 constexpr auto EAXCONTEXT_MINDISTANCEFACTOR = FLT_MIN;
358 constexpr auto EAXCONTEXT_MAXDISTANCEFACTOR = FLT_MAX;
359 constexpr auto EAXCONTEXT_DEFAULTDISTANCEFACTOR = 1.0F;
361 constexpr auto EAXCONTEXT_MINAIRABSORPTIONHF = -100.0F;
362 constexpr auto EAXCONTEXT_MAXAIRABSORPTIONHF = 0.0F;
363 constexpr auto EAXCONTEXT_DEFAULTAIRABSORPTIONHF = -5.0F;
365 constexpr auto EAXCONTEXT_MINHFREFERENCE = 1000.0F;
366 constexpr auto EAXCONTEXT_MAXHFREFERENCE = 20000.0F;
367 constexpr auto EAXCONTEXT_DEFAULTHFREFERENCE = 5000.0F;
369 constexpr auto EAXCONTEXT_MINMACROFXFACTOR = 0.0F;
370 constexpr auto EAXCONTEXT_MAXMACROFXFACTOR = 1.0F;
371 constexpr auto EAXCONTEXT_DEFAULTMACROFXFACTOR = 0.0F;
373 constexpr auto EAXCONTEXT_DEFAULTLASTERROR = EAX_OK;
375 extern const GUID EAXPROPERTYID_EAX40_FXSlot0;
376 extern const GUID EAXPROPERTYID_EAX50_FXSlot0;
377 extern const GUID EAXPROPERTYID_EAX40_FXSlot1;
378 extern const GUID EAXPROPERTYID_EAX50_FXSlot1;
379 extern const GUID EAXPROPERTYID_EAX40_FXSlot2;
380 extern const GUID EAXPROPERTYID_EAX50_FXSlot2;
381 extern const GUID EAXPROPERTYID_EAX40_FXSlot3;
382 extern const GUID EAXPROPERTYID_EAX50_FXSlot3;
384 extern const GUID EAX40CONTEXT_DEFAULTPRIMARYFXSLOTID;
385 extern const GUID EAX50CONTEXT_DEFAULTPRIMARYFXSLOTID;
387 enum EAXFXSLOT_PROPERTY : unsigned int {
388 EAXFXSLOT_PARAMETER = 0,
390 EAXFXSLOT_NONE = 0x10000,
391 EAXFXSLOT_ALLPARAMETERS,
392 EAXFXSLOT_LOADEFFECT,
393 EAXFXSLOT_VOLUME,
394 EAXFXSLOT_LOCK,
395 EAXFXSLOT_FLAGS,
397 // EAX50
398 EAXFXSLOT_OCCLUSION,
399 EAXFXSLOT_OCCLUSIONLFRATIO,
400 }; // EAXFXSLOT_PROPERTY
402 constexpr auto EAXFXSLOTFLAGS_ENVIRONMENT = 0x00000001UL;
403 // EAX50
404 constexpr auto EAXFXSLOTFLAGS_UPMIX = 0x00000002UL;
406 constexpr auto EAX40FXSLOTFLAGS_RESERVED = 0xFFFFFFFEUL; // reserved future use
407 constexpr auto EAX50FXSLOTFLAGS_RESERVED = 0xFFFFFFFCUL; // reserved future use
410 constexpr auto EAXFXSLOT_MINVOLUME = -10'000L;
411 constexpr auto EAXFXSLOT_MAXVOLUME = 0L;
412 constexpr auto EAXFXSLOT_DEFAULTVOLUME = 0L;
414 constexpr auto EAXFXSLOT_MINLOCK = 0L;
415 constexpr auto EAXFXSLOT_MAXLOCK = 1L;
417 enum : long {
418 EAXFXSLOT_UNLOCKED = 0,
419 EAXFXSLOT_LOCKED = 1
422 constexpr auto EAXFXSLOT_MINOCCLUSION = -10'000L;
423 constexpr auto EAXFXSLOT_MAXOCCLUSION = 0L;
424 constexpr auto EAXFXSLOT_DEFAULTOCCLUSION = 0L;
426 constexpr auto EAXFXSLOT_MINOCCLUSIONLFRATIO = 0.0F;
427 constexpr auto EAXFXSLOT_MAXOCCLUSIONLFRATIO = 1.0F;
428 constexpr auto EAXFXSLOT_DEFAULTOCCLUSIONLFRATIO = 0.25F;
430 constexpr auto EAX40FXSLOT_DEFAULTFLAGS = EAXFXSLOTFLAGS_ENVIRONMENT;
432 constexpr auto EAX50FXSLOT_DEFAULTFLAGS =
433 EAXFXSLOTFLAGS_ENVIRONMENT |
434 EAXFXSLOTFLAGS_UPMIX; // ignored for reverb;
436 struct EAX40FXSLOTPROPERTIES {
437 GUID guidLoadEffect;
438 long lVolume;
439 long lLock;
440 unsigned long ulFlags;
441 }; // EAX40FXSLOTPROPERTIES
443 struct EAX50FXSLOTPROPERTIES : public EAX40FXSLOTPROPERTIES {
444 long lOcclusion;
445 float flOcclusionLFRatio;
446 }; // EAX50FXSLOTPROPERTIES
448 extern const GUID EAXPROPERTYID_EAX40_Source;
449 extern const GUID EAXPROPERTYID_EAX50_Source;
451 // Source object properties
452 enum EAXSOURCE_PROPERTY : unsigned int {
453 // EAX30
454 EAXSOURCE_NONE,
455 EAXSOURCE_ALLPARAMETERS,
456 EAXSOURCE_OBSTRUCTIONPARAMETERS,
457 EAXSOURCE_OCCLUSIONPARAMETERS,
458 EAXSOURCE_EXCLUSIONPARAMETERS,
459 EAXSOURCE_DIRECT,
460 EAXSOURCE_DIRECTHF,
461 EAXSOURCE_ROOM,
462 EAXSOURCE_ROOMHF,
463 EAXSOURCE_OBSTRUCTION,
464 EAXSOURCE_OBSTRUCTIONLFRATIO,
465 EAXSOURCE_OCCLUSION,
466 EAXSOURCE_OCCLUSIONLFRATIO,
467 EAXSOURCE_OCCLUSIONROOMRATIO,
468 EAXSOURCE_OCCLUSIONDIRECTRATIO,
469 EAXSOURCE_EXCLUSION,
470 EAXSOURCE_EXCLUSIONLFRATIO,
471 EAXSOURCE_OUTSIDEVOLUMEHF,
472 EAXSOURCE_DOPPLERFACTOR,
473 EAXSOURCE_ROLLOFFFACTOR,
474 EAXSOURCE_ROOMROLLOFFFACTOR,
475 EAXSOURCE_AIRABSORPTIONFACTOR,
476 EAXSOURCE_FLAGS,
478 // EAX40
479 EAXSOURCE_SENDPARAMETERS,
480 EAXSOURCE_ALLSENDPARAMETERS,
481 EAXSOURCE_OCCLUSIONSENDPARAMETERS,
482 EAXSOURCE_EXCLUSIONSENDPARAMETERS,
483 EAXSOURCE_ACTIVEFXSLOTID,
485 // EAX50
486 EAXSOURCE_MACROFXFACTOR,
487 EAXSOURCE_SPEAKERLEVELS,
488 EAXSOURCE_ALL2DPARAMETERS,
489 }; // EAXSOURCE_PROPERTY
492 constexpr auto EAXSOURCEFLAGS_DIRECTHFAUTO = 0x00000001UL; // relates to EAXSOURCE_DIRECTHF
493 constexpr auto EAXSOURCEFLAGS_ROOMAUTO = 0x00000002UL; // relates to EAXSOURCE_ROOM
494 constexpr auto EAXSOURCEFLAGS_ROOMHFAUTO = 0x00000004UL; // relates to EAXSOURCE_ROOMHF
495 // EAX50
496 constexpr auto EAXSOURCEFLAGS_3DELEVATIONFILTER = 0x00000008UL;
497 constexpr auto EAXSOURCEFLAGS_UPMIX = 0x00000010UL;
498 constexpr auto EAXSOURCEFLAGS_APPLYSPEAKERLEVELS = 0x00000020UL;
500 constexpr auto EAX20SOURCEFLAGS_RESERVED = 0xFFFFFFF8UL; // reserved future use
501 constexpr auto EAX50SOURCEFLAGS_RESERVED = 0xFFFFFFC0UL; // reserved future use
504 constexpr auto EAXSOURCE_MINSEND = -10'000L;
505 constexpr auto EAXSOURCE_MAXSEND = 0L;
506 constexpr auto EAXSOURCE_DEFAULTSEND = 0L;
508 constexpr auto EAXSOURCE_MINSENDHF = -10'000L;
509 constexpr auto EAXSOURCE_MAXSENDHF = 0L;
510 constexpr auto EAXSOURCE_DEFAULTSENDHF = 0L;
512 constexpr auto EAXSOURCE_MINDIRECT = -10'000L;
513 constexpr auto EAXSOURCE_MAXDIRECT = 1'000L;
514 constexpr auto EAXSOURCE_DEFAULTDIRECT = 0L;
516 constexpr auto EAXSOURCE_MINDIRECTHF = -10'000L;
517 constexpr auto EAXSOURCE_MAXDIRECTHF = 0L;
518 constexpr auto EAXSOURCE_DEFAULTDIRECTHF = 0L;
520 constexpr auto EAXSOURCE_MINROOM = -10'000L;
521 constexpr auto EAXSOURCE_MAXROOM = 1'000L;
522 constexpr auto EAXSOURCE_DEFAULTROOM = 0L;
524 constexpr auto EAXSOURCE_MINROOMHF = -10'000L;
525 constexpr auto EAXSOURCE_MAXROOMHF = 0L;
526 constexpr auto EAXSOURCE_DEFAULTROOMHF = 0L;
528 constexpr auto EAXSOURCE_MINOBSTRUCTION = -10'000L;
529 constexpr auto EAXSOURCE_MAXOBSTRUCTION = 0L;
530 constexpr auto EAXSOURCE_DEFAULTOBSTRUCTION = 0L;
532 constexpr auto EAXSOURCE_MINOBSTRUCTIONLFRATIO = 0.0F;
533 constexpr auto EAXSOURCE_MAXOBSTRUCTIONLFRATIO = 1.0F;
534 constexpr auto EAXSOURCE_DEFAULTOBSTRUCTIONLFRATIO = 0.0F;
536 constexpr auto EAXSOURCE_MINOCCLUSION = -10'000L;
537 constexpr auto EAXSOURCE_MAXOCCLUSION = 0L;
538 constexpr auto EAXSOURCE_DEFAULTOCCLUSION = 0L;
540 constexpr auto EAXSOURCE_MINOCCLUSIONLFRATIO = 0.0F;
541 constexpr auto EAXSOURCE_MAXOCCLUSIONLFRATIO = 1.0F;
542 constexpr auto EAXSOURCE_DEFAULTOCCLUSIONLFRATIO = 0.25F;
544 constexpr auto EAXSOURCE_MINOCCLUSIONROOMRATIO = 0.0F;
545 constexpr auto EAXSOURCE_MAXOCCLUSIONROOMRATIO = 10.0F;
546 constexpr auto EAXSOURCE_DEFAULTOCCLUSIONROOMRATIO = 1.5F;
548 constexpr auto EAXSOURCE_MINOCCLUSIONDIRECTRATIO = 0.0F;
549 constexpr auto EAXSOURCE_MAXOCCLUSIONDIRECTRATIO = 10.0F;
550 constexpr auto EAXSOURCE_DEFAULTOCCLUSIONDIRECTRATIO = 1.0F;
552 constexpr auto EAXSOURCE_MINEXCLUSION = -10'000L;
553 constexpr auto EAXSOURCE_MAXEXCLUSION = 0L;
554 constexpr auto EAXSOURCE_DEFAULTEXCLUSION = 0L;
556 constexpr auto EAXSOURCE_MINEXCLUSIONLFRATIO = 0.0F;
557 constexpr auto EAXSOURCE_MAXEXCLUSIONLFRATIO = 1.0F;
558 constexpr auto EAXSOURCE_DEFAULTEXCLUSIONLFRATIO = 1.0F;
560 constexpr auto EAXSOURCE_MINOUTSIDEVOLUMEHF = -10'000L;
561 constexpr auto EAXSOURCE_MAXOUTSIDEVOLUMEHF = 0L;
562 constexpr auto EAXSOURCE_DEFAULTOUTSIDEVOLUMEHF = 0L;
564 constexpr auto EAXSOURCE_MINDOPPLERFACTOR = 0.0F;
565 constexpr auto EAXSOURCE_MAXDOPPLERFACTOR = 10.0F;
566 constexpr auto EAXSOURCE_DEFAULTDOPPLERFACTOR = 1.0F;
568 constexpr auto EAXSOURCE_MINROLLOFFFACTOR = 0.0F;
569 constexpr auto EAXSOURCE_MAXROLLOFFFACTOR = 10.0F;
570 constexpr auto EAXSOURCE_DEFAULTROLLOFFFACTOR = 0.0F;
572 constexpr auto EAXSOURCE_MINROOMROLLOFFFACTOR = 0.0F;
573 constexpr auto EAXSOURCE_MAXROOMROLLOFFFACTOR = 10.0F;
574 constexpr auto EAXSOURCE_DEFAULTROOMROLLOFFFACTOR = 0.0F;
576 constexpr auto EAXSOURCE_MINAIRABSORPTIONFACTOR = 0.0F;
577 constexpr auto EAXSOURCE_MAXAIRABSORPTIONFACTOR = 10.0F;
578 constexpr auto EAXSOURCE_DEFAULTAIRABSORPTIONFACTOR = 0.0F;
580 // EAX50
582 constexpr auto EAXSOURCE_MINMACROFXFACTOR = 0.0F;
583 constexpr auto EAXSOURCE_MAXMACROFXFACTOR = 1.0F;
584 constexpr auto EAXSOURCE_DEFAULTMACROFXFACTOR = 1.0F;
586 constexpr auto EAXSOURCE_MINSPEAKERLEVEL = -10'000L;
587 constexpr auto EAXSOURCE_MAXSPEAKERLEVEL = 0L;
588 constexpr auto EAXSOURCE_DEFAULTSPEAKERLEVEL = -10'000L;
590 constexpr auto EAXSOURCE_DEFAULTFLAGS =
591 EAXSOURCEFLAGS_DIRECTHFAUTO |
592 EAXSOURCEFLAGS_ROOMAUTO |
593 EAXSOURCEFLAGS_ROOMHFAUTO;
595 enum : long {
596 EAXSPEAKER_FRONT_LEFT = 1,
597 EAXSPEAKER_FRONT_CENTER = 2,
598 EAXSPEAKER_FRONT_RIGHT = 3,
599 EAXSPEAKER_SIDE_RIGHT = 4,
600 EAXSPEAKER_REAR_RIGHT = 5,
601 EAXSPEAKER_REAR_CENTER = 6,
602 EAXSPEAKER_REAR_LEFT = 7,
603 EAXSPEAKER_SIDE_LEFT = 8,
604 EAXSPEAKER_LOW_FREQUENCY = 9
607 // EAXSOURCEFLAGS_DIRECTHFAUTO, EAXSOURCEFLAGS_ROOMAUTO and EAXSOURCEFLAGS_ROOMHFAUTO are ignored for 2D sources
608 // EAXSOURCEFLAGS_UPMIX is ignored for 3D sources
609 constexpr auto EAX50SOURCE_DEFAULTFLAGS =
610 EAXSOURCEFLAGS_DIRECTHFAUTO |
611 EAXSOURCEFLAGS_ROOMAUTO |
612 EAXSOURCEFLAGS_ROOMHFAUTO |
613 EAXSOURCEFLAGS_UPMIX;
615 struct EAX30SOURCEPROPERTIES {
616 long lDirect; // direct path level (at low and mid frequencies)
617 long lDirectHF; // relative direct path level at high frequencies
618 long lRoom; // room effect level (at low and mid frequencies)
619 long lRoomHF; // relative room effect level at high frequencies
620 long lObstruction; // main obstruction control (attenuation at high frequencies)
621 float flObstructionLFRatio; // obstruction low-frequency level re. main control
622 long lOcclusion; // main occlusion control (attenuation at high frequencies)
623 float flOcclusionLFRatio; // occlusion low-frequency level re. main control
624 float flOcclusionRoomRatio; // relative occlusion control for room effect
625 float flOcclusionDirectRatio; // relative occlusion control for direct path
626 long lExclusion; // main exclusion control (attenuation at high frequencies)
627 float flExclusionLFRatio; // exclusion low-frequency level re. main control
628 long lOutsideVolumeHF; // outside sound cone level at high frequencies
629 float flDopplerFactor; // like DS3D flDopplerFactor but per source
630 float flRolloffFactor; // like DS3D flRolloffFactor but per source
631 float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
632 float flAirAbsorptionFactor; // multiplies EAXREVERB_AIRABSORPTIONHF
633 unsigned long ulFlags; // modifies the behavior of properties
634 }; // EAX30SOURCEPROPERTIES
636 struct EAX50SOURCEPROPERTIES : public EAX30SOURCEPROPERTIES {
637 float flMacroFXFactor;
638 }; // EAX50SOURCEPROPERTIES
640 struct EAXSOURCEALLSENDPROPERTIES {
641 GUID guidReceivingFXSlotID;
642 long lSend; // send level (at low and mid frequencies)
643 long lSendHF; // relative send level at high frequencies
644 long lOcclusion;
645 float flOcclusionLFRatio;
646 float flOcclusionRoomRatio;
647 float flOcclusionDirectRatio;
648 long lExclusion;
649 float flExclusionLFRatio;
650 }; // EAXSOURCEALLSENDPROPERTIES
652 struct EAXSOURCE2DPROPERTIES {
653 long lDirect; // direct path level (at low and mid frequencies)
654 long lDirectHF; // relative direct path level at high frequencies
655 long lRoom; // room effect level (at low and mid frequencies)
656 long lRoomHF; // relative room effect level at high frequencies
657 unsigned long ulFlags; // modifies the behavior of properties
658 }; // EAXSOURCE2DPROPERTIES
660 struct EAXSPEAKERLEVELPROPERTIES {
661 long lSpeakerID;
662 long lLevel;
663 }; // EAXSPEAKERLEVELPROPERTIES
665 struct EAX40ACTIVEFXSLOTS {
666 std::array<GUID,EAX40_MAX_ACTIVE_FXSLOTS> guidActiveFXSlots;
667 }; // EAX40ACTIVEFXSLOTS
669 struct EAX50ACTIVEFXSLOTS {
670 std::array<GUID,EAX50_MAX_ACTIVE_FXSLOTS> guidActiveFXSlots;
671 }; // EAX50ACTIVEFXSLOTS
673 // Use this structure for EAXSOURCE_OBSTRUCTIONPARAMETERS property.
674 struct EAXOBSTRUCTIONPROPERTIES {
675 long lObstruction;
676 float flObstructionLFRatio;
677 }; // EAXOBSTRUCTIONPROPERTIES
679 // Use this structure for EAXSOURCE_OCCLUSIONPARAMETERS property.
680 struct EAXOCCLUSIONPROPERTIES {
681 long lOcclusion;
682 float flOcclusionLFRatio;
683 float flOcclusionRoomRatio;
684 float flOcclusionDirectRatio;
685 }; // EAXOCCLUSIONPROPERTIES
687 // Use this structure for EAXSOURCE_EXCLUSIONPARAMETERS property.
688 struct EAXEXCLUSIONPROPERTIES {
689 long lExclusion;
690 float flExclusionLFRatio;
691 }; // EAXEXCLUSIONPROPERTIES
693 // Use this structure for EAXSOURCE_SENDPARAMETERS properties.
694 struct EAXSOURCESENDPROPERTIES {
695 GUID guidReceivingFXSlotID;
696 long lSend;
697 long lSendHF;
698 }; // EAXSOURCESENDPROPERTIES
700 // Use this structure for EAXSOURCE_OCCLUSIONSENDPARAMETERS
701 struct EAXSOURCEOCCLUSIONSENDPROPERTIES {
702 GUID guidReceivingFXSlotID;
703 long lOcclusion;
704 float flOcclusionLFRatio;
705 float flOcclusionRoomRatio;
706 float flOcclusionDirectRatio;
707 }; // EAXSOURCEOCCLUSIONSENDPROPERTIES
709 // Use this structure for EAXSOURCE_EXCLUSIONSENDPARAMETERS
710 struct EAXSOURCEEXCLUSIONSENDPROPERTIES {
711 GUID guidReceivingFXSlotID;
712 long lExclusion;
713 float flExclusionLFRatio;
714 }; // EAXSOURCEEXCLUSIONSENDPROPERTIES
716 extern const EAX40ACTIVEFXSLOTS EAX40SOURCE_DEFAULTACTIVEFXSLOTID;
718 extern const EAX50ACTIVEFXSLOTS EAX50SOURCE_3DDEFAULTACTIVEFXSLOTID;
720 extern const EAX50ACTIVEFXSLOTS EAX50SOURCE_2DDEFAULTACTIVEFXSLOTID;
723 // EAX Reverb Effect
725 extern const GUID EAX_REVERB_EFFECT;
727 // Reverb effect properties
728 enum EAXREVERB_PROPERTY : unsigned int {
729 EAXREVERB_NONE,
730 EAXREVERB_ALLPARAMETERS,
731 EAXREVERB_ENVIRONMENT,
732 EAXREVERB_ENVIRONMENTSIZE,
733 EAXREVERB_ENVIRONMENTDIFFUSION,
734 EAXREVERB_ROOM,
735 EAXREVERB_ROOMHF,
736 EAXREVERB_ROOMLF,
737 EAXREVERB_DECAYTIME,
738 EAXREVERB_DECAYHFRATIO,
739 EAXREVERB_DECAYLFRATIO,
740 EAXREVERB_REFLECTIONS,
741 EAXREVERB_REFLECTIONSDELAY,
742 EAXREVERB_REFLECTIONSPAN,
743 EAXREVERB_REVERB,
744 EAXREVERB_REVERBDELAY,
745 EAXREVERB_REVERBPAN,
746 EAXREVERB_ECHOTIME,
747 EAXREVERB_ECHODEPTH,
748 EAXREVERB_MODULATIONTIME,
749 EAXREVERB_MODULATIONDEPTH,
750 EAXREVERB_AIRABSORPTIONHF,
751 EAXREVERB_HFREFERENCE,
752 EAXREVERB_LFREFERENCE,
753 EAXREVERB_ROOMROLLOFFFACTOR,
754 EAXREVERB_FLAGS,
755 }; // EAXREVERB_PROPERTY
757 // used by EAXREVERB_ENVIRONMENT
758 enum : unsigned long {
759 EAX_ENVIRONMENT_GENERIC,
760 EAX_ENVIRONMENT_PADDEDCELL,
761 EAX_ENVIRONMENT_ROOM,
762 EAX_ENVIRONMENT_BATHROOM,
763 EAX_ENVIRONMENT_LIVINGROOM,
764 EAX_ENVIRONMENT_STONEROOM,
765 EAX_ENVIRONMENT_AUDITORIUM,
766 EAX_ENVIRONMENT_CONCERTHALL,
767 EAX_ENVIRONMENT_CAVE,
768 EAX_ENVIRONMENT_ARENA,
769 EAX_ENVIRONMENT_HANGAR,
770 EAX_ENVIRONMENT_CARPETEDHALLWAY,
771 EAX_ENVIRONMENT_HALLWAY,
772 EAX_ENVIRONMENT_STONECORRIDOR,
773 EAX_ENVIRONMENT_ALLEY,
774 EAX_ENVIRONMENT_FOREST,
775 EAX_ENVIRONMENT_CITY,
776 EAX_ENVIRONMENT_MOUNTAINS,
777 EAX_ENVIRONMENT_QUARRY,
778 EAX_ENVIRONMENT_PLAIN,
779 EAX_ENVIRONMENT_PARKINGLOT,
780 EAX_ENVIRONMENT_SEWERPIPE,
781 EAX_ENVIRONMENT_UNDERWATER,
782 EAX_ENVIRONMENT_DRUGGED,
783 EAX_ENVIRONMENT_DIZZY,
784 EAX_ENVIRONMENT_PSYCHOTIC,
786 EAX1_ENVIRONMENT_COUNT,
788 // EAX30
789 EAX_ENVIRONMENT_UNDEFINED = EAX1_ENVIRONMENT_COUNT,
791 EAX3_ENVIRONMENT_COUNT,
795 // reverberation decay time
796 constexpr auto EAXREVERBFLAGS_DECAYTIMESCALE = 0x00000001UL;
798 // reflection level
799 constexpr auto EAXREVERBFLAGS_REFLECTIONSSCALE = 0x00000002UL;
801 // initial reflection delay time
802 constexpr auto EAXREVERBFLAGS_REFLECTIONSDELAYSCALE = 0x00000004UL;
804 // reflections level
805 constexpr auto EAXREVERBFLAGS_REVERBSCALE = 0x00000008UL;
807 // late reverberation delay time
808 constexpr auto EAXREVERBFLAGS_REVERBDELAYSCALE = 0x00000010UL;
810 // echo time
811 // EAX30+
812 constexpr auto EAXREVERBFLAGS_ECHOTIMESCALE = 0x00000040UL;
814 // modulation time
815 // EAX30+
816 constexpr auto EAXREVERBFLAGS_MODULATIONTIMESCALE = 0x00000080UL;
818 // This flag limits high-frequency decay time according to air absorption.
819 constexpr auto EAXREVERBFLAGS_DECAYHFLIMIT = 0x00000020UL;
821 constexpr auto EAXREVERBFLAGS_RESERVED = 0xFFFFFF00UL; // reserved future use
824 struct EAXREVERBPROPERTIES {
825 unsigned long ulEnvironment; // sets all reverb properties
826 float flEnvironmentSize; // environment size in meters
827 float flEnvironmentDiffusion; // environment diffusion
828 long lRoom; // room effect level (at mid frequencies)
829 long lRoomHF; // relative room effect level at high frequencies
830 long lRoomLF; // relative room effect level at low frequencies
831 float flDecayTime; // reverberation decay time at mid frequencies
832 float flDecayHFRatio; // high-frequency to mid-frequency decay time ratio
833 float flDecayLFRatio; // low-frequency to mid-frequency decay time ratio
834 long lReflections; // early reflections level relative to room effect
835 float flReflectionsDelay; // initial reflection delay time
836 EAXVECTOR vReflectionsPan; // early reflections panning vector
837 long lReverb; // late reverberation level relative to room effect
838 float flReverbDelay; // late reverberation delay time relative to initial reflection
839 EAXVECTOR vReverbPan; // late reverberation panning vector
840 float flEchoTime; // echo time
841 float flEchoDepth; // echo depth
842 float flModulationTime; // modulation time
843 float flModulationDepth; // modulation depth
844 float flAirAbsorptionHF; // change in level per meter at high frequencies
845 float flHFReference; // reference high frequency
846 float flLFReference; // reference low frequency
847 float flRoomRolloffFactor; // like DS3D flRolloffFactor but for room effect
848 unsigned long ulFlags; // modifies the behavior of properties
849 DECL_EQOP(EAXREVERBPROPERTIES, ulEnvironment, flEnvironmentSize, flEnvironmentDiffusion, lRoom,
850 lRoomHF, lRoomLF, flDecayTime, flDecayHFRatio, flDecayLFRatio, lReflections,
851 flReflectionsDelay, vReflectionsPan, lReverb, flReverbDelay, vReverbPan, flEchoTime,
852 flEchoDepth, flModulationTime, flModulationDepth, flAirAbsorptionHF, flHFReference,
853 flLFReference, flRoomRolloffFactor, ulFlags)
854 }; // EAXREVERBPROPERTIES
857 constexpr auto EAXREVERB_MINENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_GENERIC);
858 constexpr auto EAX1REVERB_MAXENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_PSYCHOTIC);
859 constexpr auto EAX30REVERB_MAXENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_UNDEFINED);
860 constexpr auto EAXREVERB_DEFAULTENVIRONMENT = static_cast<unsigned long>(EAX_ENVIRONMENT_GENERIC);
862 constexpr auto EAXREVERB_MINENVIRONMENTSIZE = 1.0F;
863 constexpr auto EAXREVERB_MAXENVIRONMENTSIZE = 100.0F;
864 constexpr auto EAXREVERB_DEFAULTENVIRONMENTSIZE = 7.5F;
866 constexpr auto EAXREVERB_MINENVIRONMENTDIFFUSION = 0.0F;
867 constexpr auto EAXREVERB_MAXENVIRONMENTDIFFUSION = 1.0F;
868 constexpr auto EAXREVERB_DEFAULTENVIRONMENTDIFFUSION = 1.0F;
870 constexpr auto EAXREVERB_MINROOM = -10'000L;
871 constexpr auto EAXREVERB_MAXROOM = 0L;
872 constexpr auto EAXREVERB_DEFAULTROOM = -1'000L;
874 constexpr auto EAXREVERB_MINROOMHF = -10'000L;
875 constexpr auto EAXREVERB_MAXROOMHF = 0L;
876 constexpr auto EAXREVERB_DEFAULTROOMHF = -100L;
878 constexpr auto EAXREVERB_MINROOMLF = -10'000L;
879 constexpr auto EAXREVERB_MAXROOMLF = 0L;
880 constexpr auto EAXREVERB_DEFAULTROOMLF = 0L;
882 constexpr auto EAXREVERB_MINDECAYTIME = 0.1F;
883 constexpr auto EAXREVERB_MAXDECAYTIME = 20.0F;
884 constexpr auto EAXREVERB_DEFAULTDECAYTIME = 1.49F;
886 constexpr auto EAXREVERB_MINDECAYHFRATIO = 0.1F;
887 constexpr auto EAXREVERB_MAXDECAYHFRATIO = 2.0F;
888 constexpr auto EAXREVERB_DEFAULTDECAYHFRATIO = 0.83F;
890 constexpr auto EAXREVERB_MINDECAYLFRATIO = 0.1F;
891 constexpr auto EAXREVERB_MAXDECAYLFRATIO = 2.0F;
892 constexpr auto EAXREVERB_DEFAULTDECAYLFRATIO = 1.0F;
894 constexpr auto EAXREVERB_MINREFLECTIONS = -10'000L;
895 constexpr auto EAXREVERB_MAXREFLECTIONS = 1'000L;
896 constexpr auto EAXREVERB_DEFAULTREFLECTIONS = -2'602L;
898 constexpr auto EAXREVERB_MINREFLECTIONSDELAY = 0.0F;
899 constexpr auto EAXREVERB_MAXREFLECTIONSDELAY = 0.3F;
900 constexpr auto EAXREVERB_DEFAULTREFLECTIONSDELAY = 0.007F;
902 constexpr auto EAXREVERB_DEFAULTREFLECTIONSPAN = EAXVECTOR{0.0F, 0.0F, 0.0F};
904 constexpr auto EAXREVERB_MINREVERB = -10'000L;
905 constexpr auto EAXREVERB_MAXREVERB = 2'000L;
906 constexpr auto EAXREVERB_DEFAULTREVERB = 200L;
908 constexpr auto EAXREVERB_MINREVERBDELAY = 0.0F;
909 constexpr auto EAXREVERB_MAXREVERBDELAY = 0.1F;
910 constexpr auto EAXREVERB_DEFAULTREVERBDELAY = 0.011F;
912 constexpr auto EAXREVERB_DEFAULTREVERBPAN = EAXVECTOR{0.0F, 0.0F, 0.0F};
914 constexpr auto EAXREVERB_MINECHOTIME = 0.075F;
915 constexpr auto EAXREVERB_MAXECHOTIME = 0.25F;
916 constexpr auto EAXREVERB_DEFAULTECHOTIME = 0.25F;
918 constexpr auto EAXREVERB_MINECHODEPTH = 0.0F;
919 constexpr auto EAXREVERB_MAXECHODEPTH = 1.0F;
920 constexpr auto EAXREVERB_DEFAULTECHODEPTH = 0.0F;
922 constexpr auto EAXREVERB_MINMODULATIONTIME = 0.04F;
923 constexpr auto EAXREVERB_MAXMODULATIONTIME = 4.0F;
924 constexpr auto EAXREVERB_DEFAULTMODULATIONTIME = 0.25F;
926 constexpr auto EAXREVERB_MINMODULATIONDEPTH = 0.0F;
927 constexpr auto EAXREVERB_MAXMODULATIONDEPTH = 1.0F;
928 constexpr auto EAXREVERB_DEFAULTMODULATIONDEPTH = 0.0F;
930 constexpr auto EAXREVERB_MINAIRABSORPTIONHF = -100.0F;
931 constexpr auto EAXREVERB_MAXAIRABSORPTIONHF = 0.0F;
932 constexpr auto EAXREVERB_DEFAULTAIRABSORPTIONHF = -5.0F;
934 constexpr auto EAXREVERB_MINHFREFERENCE = 1'000.0F;
935 constexpr auto EAXREVERB_MAXHFREFERENCE = 20'000.0F;
936 constexpr auto EAXREVERB_DEFAULTHFREFERENCE = 5'000.0F;
938 constexpr auto EAXREVERB_MINLFREFERENCE = 20.0F;
939 constexpr auto EAXREVERB_MAXLFREFERENCE = 1'000.0F;
940 constexpr auto EAXREVERB_DEFAULTLFREFERENCE = 250.0F;
942 constexpr auto EAXREVERB_MINROOMROLLOFFFACTOR = 0.0F;
943 constexpr auto EAXREVERB_MAXROOMROLLOFFFACTOR = 10.0F;
944 constexpr auto EAXREVERB_DEFAULTROOMROLLOFFFACTOR = 0.0F;
946 constexpr auto EAX1REVERB_MINVOLUME = 0.0F;
947 constexpr auto EAX1REVERB_MAXVOLUME = 1.0F;
949 constexpr auto EAX1REVERB_MINDAMPING = 0.0F;
950 constexpr auto EAX1REVERB_MAXDAMPING = 2.0F;
952 constexpr auto EAXREVERB_DEFAULTFLAGS =
953 EAXREVERBFLAGS_DECAYTIMESCALE |
954 EAXREVERBFLAGS_REFLECTIONSSCALE |
955 EAXREVERBFLAGS_REFLECTIONSDELAYSCALE |
956 EAXREVERBFLAGS_REVERBSCALE |
957 EAXREVERBFLAGS_REVERBDELAYSCALE |
958 EAXREVERBFLAGS_DECAYHFLIMIT;
961 using Eax1ReverbPresets = std::array<EAX_REVERBPROPERTIES, EAX1_ENVIRONMENT_COUNT>;
962 extern const Eax1ReverbPresets EAX1REVERB_PRESETS;
964 using Eax2ReverbPresets = std::array<EAX20LISTENERPROPERTIES, EAX2_ENVIRONMENT_COUNT>;
965 extern const Eax2ReverbPresets EAX2REVERB_PRESETS;
967 using EaxReverbPresets = std::array<EAXREVERBPROPERTIES, EAX1_ENVIRONMENT_COUNT>;
968 extern const EaxReverbPresets EAXREVERB_PRESETS;
971 // AGC Compressor Effect
973 extern const GUID EAX_AGCCOMPRESSOR_EFFECT;
975 enum EAXAGCCOMPRESSOR_PROPERTY : unsigned int {
976 EAXAGCCOMPRESSOR_NONE,
977 EAXAGCCOMPRESSOR_ALLPARAMETERS,
978 EAXAGCCOMPRESSOR_ONOFF,
979 }; // EAXAGCCOMPRESSOR_PROPERTY
981 struct EAXAGCCOMPRESSORPROPERTIES {
982 unsigned long ulOnOff; // Switch Compressor on or off
983 DECL_EQOP(EAXAGCCOMPRESSORPROPERTIES, ulOnOff)
984 }; // EAXAGCCOMPRESSORPROPERTIES
987 constexpr auto EAXAGCCOMPRESSOR_MINONOFF = 0UL;
988 constexpr auto EAXAGCCOMPRESSOR_MAXONOFF = 1UL;
989 constexpr auto EAXAGCCOMPRESSOR_DEFAULTONOFF = EAXAGCCOMPRESSOR_MAXONOFF;
992 // Autowah Effect
994 extern const GUID EAX_AUTOWAH_EFFECT;
996 enum EAXAUTOWAH_PROPERTY : unsigned int {
997 EAXAUTOWAH_NONE,
998 EAXAUTOWAH_ALLPARAMETERS,
999 EAXAUTOWAH_ATTACKTIME,
1000 EAXAUTOWAH_RELEASETIME,
1001 EAXAUTOWAH_RESONANCE,
1002 EAXAUTOWAH_PEAKLEVEL,
1003 }; // EAXAUTOWAH_PROPERTY
1005 struct EAXAUTOWAHPROPERTIES {
1006 float flAttackTime; // Attack time (seconds)
1007 float flReleaseTime; // Release time (seconds)
1008 long lResonance; // Resonance (mB)
1009 long lPeakLevel; // Peak level (mB)
1010 DECL_EQOP(EAXAUTOWAHPROPERTIES, flAttackTime, flReleaseTime, lResonance, lPeakLevel)
1011 }; // EAXAUTOWAHPROPERTIES
1014 constexpr auto EAXAUTOWAH_MINATTACKTIME = 0.0001F;
1015 constexpr auto EAXAUTOWAH_MAXATTACKTIME = 1.0F;
1016 constexpr auto EAXAUTOWAH_DEFAULTATTACKTIME = 0.06F;
1018 constexpr auto EAXAUTOWAH_MINRELEASETIME = 0.0001F;
1019 constexpr auto EAXAUTOWAH_MAXRELEASETIME = 1.0F;
1020 constexpr auto EAXAUTOWAH_DEFAULTRELEASETIME = 0.06F;
1022 constexpr auto EAXAUTOWAH_MINRESONANCE = 600L;
1023 constexpr auto EAXAUTOWAH_MAXRESONANCE = 6000L;
1024 constexpr auto EAXAUTOWAH_DEFAULTRESONANCE = 6000L;
1026 constexpr auto EAXAUTOWAH_MINPEAKLEVEL = -9000L;
1027 constexpr auto EAXAUTOWAH_MAXPEAKLEVEL = 9000L;
1028 constexpr auto EAXAUTOWAH_DEFAULTPEAKLEVEL = 2100L;
1031 // Chorus Effect
1033 extern const GUID EAX_CHORUS_EFFECT;
1035 enum EAXCHORUS_PROPERTY : unsigned int {
1036 EAXCHORUS_NONE,
1037 EAXCHORUS_ALLPARAMETERS,
1038 EAXCHORUS_WAVEFORM,
1039 EAXCHORUS_PHASE,
1040 EAXCHORUS_RATE,
1041 EAXCHORUS_DEPTH,
1042 EAXCHORUS_FEEDBACK,
1043 EAXCHORUS_DELAY,
1044 }; // EAXCHORUS_PROPERTY
1046 enum : unsigned long {
1047 EAX_CHORUS_SINUSOID,
1048 EAX_CHORUS_TRIANGLE,
1051 struct EAXCHORUSPROPERTIES {
1052 unsigned long ulWaveform; // Waveform selector - see enum above
1053 long lPhase; // Phase (Degrees)
1054 float flRate; // Rate (Hz)
1055 float flDepth; // Depth (0 to 1)
1056 float flFeedback; // Feedback (-1 to 1)
1057 float flDelay; // Delay (seconds)
1058 DECL_EQOP(EAXCHORUSPROPERTIES, ulWaveform, lPhase, flRate, flDepth, flFeedback, flDelay)
1059 }; // EAXCHORUSPROPERTIES
1062 constexpr auto EAXCHORUS_MINWAVEFORM = 0UL;
1063 constexpr auto EAXCHORUS_MAXWAVEFORM = 1UL;
1064 constexpr auto EAXCHORUS_DEFAULTWAVEFORM = 1UL;
1066 constexpr auto EAXCHORUS_MINPHASE = -180L;
1067 constexpr auto EAXCHORUS_MAXPHASE = 180L;
1068 constexpr auto EAXCHORUS_DEFAULTPHASE = 90L;
1070 constexpr auto EAXCHORUS_MINRATE = 0.0F;
1071 constexpr auto EAXCHORUS_MAXRATE = 10.0F;
1072 constexpr auto EAXCHORUS_DEFAULTRATE = 1.1F;
1074 constexpr auto EAXCHORUS_MINDEPTH = 0.0F;
1075 constexpr auto EAXCHORUS_MAXDEPTH = 1.0F;
1076 constexpr auto EAXCHORUS_DEFAULTDEPTH = 0.1F;
1078 constexpr auto EAXCHORUS_MINFEEDBACK = -1.0F;
1079 constexpr auto EAXCHORUS_MAXFEEDBACK = 1.0F;
1080 constexpr auto EAXCHORUS_DEFAULTFEEDBACK = 0.25F;
1082 constexpr auto EAXCHORUS_MINDELAY = 0.0002F;
1083 constexpr auto EAXCHORUS_MAXDELAY = 0.016F;
1084 constexpr auto EAXCHORUS_DEFAULTDELAY = 0.016F;
1087 // Distortion Effect
1089 extern const GUID EAX_DISTORTION_EFFECT;
1091 enum EAXDISTORTION_PROPERTY : unsigned int {
1092 EAXDISTORTION_NONE,
1093 EAXDISTORTION_ALLPARAMETERS,
1094 EAXDISTORTION_EDGE,
1095 EAXDISTORTION_GAIN,
1096 EAXDISTORTION_LOWPASSCUTOFF,
1097 EAXDISTORTION_EQCENTER,
1098 EAXDISTORTION_EQBANDWIDTH,
1099 }; // EAXDISTORTION_PROPERTY
1101 struct EAXDISTORTIONPROPERTIES {
1102 float flEdge; // Controls the shape of the distortion (0 to 1)
1103 long lGain; // Controls the post distortion gain (mB)
1104 float flLowPassCutOff; // Controls the cut-off of the filter pre-distortion (Hz)
1105 float flEQCenter; // Controls the center frequency of the EQ post-distortion (Hz)
1106 float flEQBandwidth; // Controls the bandwidth of the EQ post-distortion (Hz)
1107 DECL_EQOP(EAXDISTORTIONPROPERTIES, flEdge, lGain, flLowPassCutOff, flEQCenter, flEQBandwidth)
1108 }; // EAXDISTORTIONPROPERTIES
1111 constexpr auto EAXDISTORTION_MINEDGE = 0.0F;
1112 constexpr auto EAXDISTORTION_MAXEDGE = 1.0F;
1113 constexpr auto EAXDISTORTION_DEFAULTEDGE = 0.2F;
1115 constexpr auto EAXDISTORTION_MINGAIN = -6000L;
1116 constexpr auto EAXDISTORTION_MAXGAIN = 0L;
1117 constexpr auto EAXDISTORTION_DEFAULTGAIN = -2600L;
1119 constexpr auto EAXDISTORTION_MINLOWPASSCUTOFF = 80.0F;
1120 constexpr auto EAXDISTORTION_MAXLOWPASSCUTOFF = 24000.0F;
1121 constexpr auto EAXDISTORTION_DEFAULTLOWPASSCUTOFF = 8000.0F;
1123 constexpr auto EAXDISTORTION_MINEQCENTER = 80.0F;
1124 constexpr auto EAXDISTORTION_MAXEQCENTER = 24000.0F;
1125 constexpr auto EAXDISTORTION_DEFAULTEQCENTER = 3600.0F;
1127 constexpr auto EAXDISTORTION_MINEQBANDWIDTH = 80.0F;
1128 constexpr auto EAXDISTORTION_MAXEQBANDWIDTH = 24000.0F;
1129 constexpr auto EAXDISTORTION_DEFAULTEQBANDWIDTH = 3600.0F;
1132 // Echo Effect
1134 extern const GUID EAX_ECHO_EFFECT;
1136 enum EAXECHO_PROPERTY : unsigned int {
1137 EAXECHO_NONE,
1138 EAXECHO_ALLPARAMETERS,
1139 EAXECHO_DELAY,
1140 EAXECHO_LRDELAY,
1141 EAXECHO_DAMPING,
1142 EAXECHO_FEEDBACK,
1143 EAXECHO_SPREAD,
1144 }; // EAXECHO_PROPERTY
1146 struct EAXECHOPROPERTIES {
1147 float flDelay; // Controls the initial delay time (seconds)
1148 float flLRDelay; // Controls the delay time between the first and second taps (seconds)
1149 float flDamping; // Controls a low-pass filter that dampens the echoes (0 to 1)
1150 float flFeedback; // Controls the duration of echo repetition (0 to 1)
1151 float flSpread; // Controls the left-right spread of the echoes
1152 DECL_EQOP(EAXECHOPROPERTIES, flDelay, flLRDelay, flDamping, flFeedback, flSpread)
1153 }; // EAXECHOPROPERTIES
1156 constexpr auto EAXECHO_MINDAMPING = 0.0F;
1157 constexpr auto EAXECHO_MAXDAMPING = 0.99F;
1158 constexpr auto EAXECHO_DEFAULTDAMPING = 0.5F;
1160 constexpr auto EAXECHO_MINDELAY = 0.002F;
1161 constexpr auto EAXECHO_MAXDELAY = 0.207F;
1162 constexpr auto EAXECHO_DEFAULTDELAY = 0.1F;
1164 constexpr auto EAXECHO_MINLRDELAY = 0.0F;
1165 constexpr auto EAXECHO_MAXLRDELAY = 0.404F;
1166 constexpr auto EAXECHO_DEFAULTLRDELAY = 0.1F;
1168 constexpr auto EAXECHO_MINFEEDBACK = 0.0F;
1169 constexpr auto EAXECHO_MAXFEEDBACK = 1.0F;
1170 constexpr auto EAXECHO_DEFAULTFEEDBACK = 0.5F;
1172 constexpr auto EAXECHO_MINSPREAD = -1.0F;
1173 constexpr auto EAXECHO_MAXSPREAD = 1.0F;
1174 constexpr auto EAXECHO_DEFAULTSPREAD = -1.0F;
1177 // Equalizer Effect
1179 extern const GUID EAX_EQUALIZER_EFFECT;
1181 enum EAXEQUALIZER_PROPERTY : unsigned int {
1182 EAXEQUALIZER_NONE,
1183 EAXEQUALIZER_ALLPARAMETERS,
1184 EAXEQUALIZER_LOWGAIN,
1185 EAXEQUALIZER_LOWCUTOFF,
1186 EAXEQUALIZER_MID1GAIN,
1187 EAXEQUALIZER_MID1CENTER,
1188 EAXEQUALIZER_MID1WIDTH,
1189 EAXEQUALIZER_MID2GAIN,
1190 EAXEQUALIZER_MID2CENTER,
1191 EAXEQUALIZER_MID2WIDTH,
1192 EAXEQUALIZER_HIGHGAIN,
1193 EAXEQUALIZER_HIGHCUTOFF,
1194 }; // EAXEQUALIZER_PROPERTY
1196 struct EAXEQUALIZERPROPERTIES {
1197 long lLowGain; // (mB)
1198 float flLowCutOff; // (Hz)
1199 long lMid1Gain; // (mB)
1200 float flMid1Center; // (Hz)
1201 float flMid1Width; // (octaves)
1202 long lMid2Gain; // (mB)
1203 float flMid2Center; // (Hz)
1204 float flMid2Width; // (octaves)
1205 long lHighGain; // (mB)
1206 float flHighCutOff; // (Hz)
1207 DECL_EQOP(EAXEQUALIZERPROPERTIES, lLowGain, flLowCutOff, lMid1Gain, flMid1Center, flMid1Width,
1208 lMid2Gain, flMid2Center, flMid2Width, lHighGain, flHighCutOff)
1209 }; // EAXEQUALIZERPROPERTIES
1212 constexpr auto EAXEQUALIZER_MINLOWGAIN = -1800L;
1213 constexpr auto EAXEQUALIZER_MAXLOWGAIN = 1800L;
1214 constexpr auto EAXEQUALIZER_DEFAULTLOWGAIN = 0L;
1216 constexpr auto EAXEQUALIZER_MINLOWCUTOFF = 50.0F;
1217 constexpr auto EAXEQUALIZER_MAXLOWCUTOFF = 800.0F;
1218 constexpr auto EAXEQUALIZER_DEFAULTLOWCUTOFF = 200.0F;
1220 constexpr auto EAXEQUALIZER_MINMID1GAIN = -1800L;
1221 constexpr auto EAXEQUALIZER_MAXMID1GAIN = 1800L;
1222 constexpr auto EAXEQUALIZER_DEFAULTMID1GAIN = 0L;
1224 constexpr auto EAXEQUALIZER_MINMID1CENTER = 200.0F;
1225 constexpr auto EAXEQUALIZER_MAXMID1CENTER = 3000.0F;
1226 constexpr auto EAXEQUALIZER_DEFAULTMID1CENTER = 500.0F;
1228 constexpr auto EAXEQUALIZER_MINMID1WIDTH = 0.01F;
1229 constexpr auto EAXEQUALIZER_MAXMID1WIDTH = 1.0F;
1230 constexpr auto EAXEQUALIZER_DEFAULTMID1WIDTH = 1.0F;
1232 constexpr auto EAXEQUALIZER_MINMID2GAIN = -1800L;
1233 constexpr auto EAXEQUALIZER_MAXMID2GAIN = 1800L;
1234 constexpr auto EAXEQUALIZER_DEFAULTMID2GAIN = 0L;
1236 constexpr auto EAXEQUALIZER_MINMID2CENTER = 1000.0F;
1237 constexpr auto EAXEQUALIZER_MAXMID2CENTER = 8000.0F;
1238 constexpr auto EAXEQUALIZER_DEFAULTMID2CENTER = 3000.0F;
1240 constexpr auto EAXEQUALIZER_MINMID2WIDTH = 0.01F;
1241 constexpr auto EAXEQUALIZER_MAXMID2WIDTH = 1.0F;
1242 constexpr auto EAXEQUALIZER_DEFAULTMID2WIDTH = 1.0F;
1244 constexpr auto EAXEQUALIZER_MINHIGHGAIN = -1800L;
1245 constexpr auto EAXEQUALIZER_MAXHIGHGAIN = 1800L;
1246 constexpr auto EAXEQUALIZER_DEFAULTHIGHGAIN = 0L;
1248 constexpr auto EAXEQUALIZER_MINHIGHCUTOFF = 4000.0F;
1249 constexpr auto EAXEQUALIZER_MAXHIGHCUTOFF = 16000.0F;
1250 constexpr auto EAXEQUALIZER_DEFAULTHIGHCUTOFF = 6000.0F;
1253 // Flanger Effect
1255 extern const GUID EAX_FLANGER_EFFECT;
1257 enum EAXFLANGER_PROPERTY : unsigned int {
1258 EAXFLANGER_NONE,
1259 EAXFLANGER_ALLPARAMETERS,
1260 EAXFLANGER_WAVEFORM,
1261 EAXFLANGER_PHASE,
1262 EAXFLANGER_RATE,
1263 EAXFLANGER_DEPTH,
1264 EAXFLANGER_FEEDBACK,
1265 EAXFLANGER_DELAY,
1266 }; // EAXFLANGER_PROPERTY
1268 enum : unsigned long {
1269 EAX_FLANGER_SINUSOID,
1270 EAX_FLANGER_TRIANGLE,
1273 struct EAXFLANGERPROPERTIES {
1274 unsigned long ulWaveform; // Waveform selector - see enum above
1275 long lPhase; // Phase (Degrees)
1276 float flRate; // Rate (Hz)
1277 float flDepth; // Depth (0 to 1)
1278 float flFeedback; // Feedback (0 to 1)
1279 float flDelay; // Delay (seconds)
1280 DECL_EQOP(EAXFLANGERPROPERTIES, ulWaveform, lPhase, flRate, flDepth, flFeedback, flDelay)
1281 }; // EAXFLANGERPROPERTIES
1284 constexpr auto EAXFLANGER_MINWAVEFORM = 0UL;
1285 constexpr auto EAXFLANGER_MAXWAVEFORM = 1UL;
1286 constexpr auto EAXFLANGER_DEFAULTWAVEFORM = 1UL;
1288 constexpr auto EAXFLANGER_MINPHASE = -180L;
1289 constexpr auto EAXFLANGER_MAXPHASE = 180L;
1290 constexpr auto EAXFLANGER_DEFAULTPHASE = 0L;
1292 constexpr auto EAXFLANGER_MINRATE = 0.0F;
1293 constexpr auto EAXFLANGER_MAXRATE = 10.0F;
1294 constexpr auto EAXFLANGER_DEFAULTRATE = 0.27F;
1296 constexpr auto EAXFLANGER_MINDEPTH = 0.0F;
1297 constexpr auto EAXFLANGER_MAXDEPTH = 1.0F;
1298 constexpr auto EAXFLANGER_DEFAULTDEPTH = 1.0F;
1300 constexpr auto EAXFLANGER_MINFEEDBACK = -1.0F;
1301 constexpr auto EAXFLANGER_MAXFEEDBACK = 1.0F;
1302 constexpr auto EAXFLANGER_DEFAULTFEEDBACK = -0.5F;
1304 constexpr auto EAXFLANGER_MINDELAY = 0.0002F;
1305 constexpr auto EAXFLANGER_MAXDELAY = 0.004F;
1306 constexpr auto EAXFLANGER_DEFAULTDELAY = 0.002F;
1309 // Frequency Shifter Effect
1311 extern const GUID EAX_FREQUENCYSHIFTER_EFFECT;
1313 enum EAXFREQUENCYSHIFTER_PROPERTY : unsigned int {
1314 EAXFREQUENCYSHIFTER_NONE,
1315 EAXFREQUENCYSHIFTER_ALLPARAMETERS,
1316 EAXFREQUENCYSHIFTER_FREQUENCY,
1317 EAXFREQUENCYSHIFTER_LEFTDIRECTION,
1318 EAXFREQUENCYSHIFTER_RIGHTDIRECTION,
1319 }; // EAXFREQUENCYSHIFTER_PROPERTY
1321 enum : unsigned long {
1322 EAX_FREQUENCYSHIFTER_DOWN,
1323 EAX_FREQUENCYSHIFTER_UP,
1324 EAX_FREQUENCYSHIFTER_OFF
1327 struct EAXFREQUENCYSHIFTERPROPERTIES {
1328 float flFrequency; // (Hz)
1329 unsigned long ulLeftDirection; // see enum above
1330 unsigned long ulRightDirection; // see enum above
1331 DECL_EQOP(EAXFREQUENCYSHIFTERPROPERTIES, flFrequency, ulLeftDirection, ulRightDirection)
1332 }; // EAXFREQUENCYSHIFTERPROPERTIES
1335 constexpr auto EAXFREQUENCYSHIFTER_MINFREQUENCY = 0.0F;
1336 constexpr auto EAXFREQUENCYSHIFTER_MAXFREQUENCY = 24000.0F;
1337 constexpr auto EAXFREQUENCYSHIFTER_DEFAULTFREQUENCY = EAXFREQUENCYSHIFTER_MINFREQUENCY;
1339 constexpr auto EAXFREQUENCYSHIFTER_MINLEFTDIRECTION = 0UL;
1340 constexpr auto EAXFREQUENCYSHIFTER_MAXLEFTDIRECTION = 2UL;
1341 constexpr auto EAXFREQUENCYSHIFTER_DEFAULTLEFTDIRECTION = EAXFREQUENCYSHIFTER_MINLEFTDIRECTION;
1343 constexpr auto EAXFREQUENCYSHIFTER_MINRIGHTDIRECTION = 0UL;
1344 constexpr auto EAXFREQUENCYSHIFTER_MAXRIGHTDIRECTION = 2UL;
1345 constexpr auto EAXFREQUENCYSHIFTER_DEFAULTRIGHTDIRECTION = EAXFREQUENCYSHIFTER_MINRIGHTDIRECTION;
1348 // Vocal Morpher Effect
1350 extern const GUID EAX_VOCALMORPHER_EFFECT;
1352 enum EAXVOCALMORPHER_PROPERTY : unsigned int {
1353 EAXVOCALMORPHER_NONE,
1354 EAXVOCALMORPHER_ALLPARAMETERS,
1355 EAXVOCALMORPHER_PHONEMEA,
1356 EAXVOCALMORPHER_PHONEMEACOARSETUNING,
1357 EAXVOCALMORPHER_PHONEMEB,
1358 EAXVOCALMORPHER_PHONEMEBCOARSETUNING,
1359 EAXVOCALMORPHER_WAVEFORM,
1360 EAXVOCALMORPHER_RATE,
1361 }; // EAXVOCALMORPHER_PROPERTY
1363 enum : unsigned long {
1396 enum : unsigned long {
1397 EAX_VOCALMORPHER_SINUSOID,
1398 EAX_VOCALMORPHER_TRIANGLE,
1399 EAX_VOCALMORPHER_SAWTOOTH
1402 // Use this structure for EAXVOCALMORPHER_ALLPARAMETERS
1403 struct EAXVOCALMORPHERPROPERTIES {
1404 unsigned long ulPhonemeA; // see enum above
1405 long lPhonemeACoarseTuning; // (semitones)
1406 unsigned long ulPhonemeB; // see enum above
1407 long lPhonemeBCoarseTuning; // (semitones)
1408 unsigned long ulWaveform; // Waveform selector - see enum above
1409 float flRate; // (Hz)
1410 DECL_EQOP(EAXVOCALMORPHERPROPERTIES, ulPhonemeA, lPhonemeACoarseTuning, ulPhonemeB,
1411 lPhonemeBCoarseTuning, ulWaveform, flRate)
1412 }; // EAXVOCALMORPHERPROPERTIES
1415 constexpr auto EAXVOCALMORPHER_MINPHONEMEA = 0UL;
1416 constexpr auto EAXVOCALMORPHER_MAXPHONEMEA = 29UL;
1417 constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEA = EAXVOCALMORPHER_MINPHONEMEA;
1419 constexpr auto EAXVOCALMORPHER_MINPHONEMEACOARSETUNING = -24L;
1420 constexpr auto EAXVOCALMORPHER_MAXPHONEMEACOARSETUNING = 24L;
1421 constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEACOARSETUNING = 0L;
1423 constexpr auto EAXVOCALMORPHER_MINPHONEMEB = 0UL;
1424 constexpr auto EAXVOCALMORPHER_MAXPHONEMEB = 29UL;
1425 constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEB = 10UL;
1427 constexpr auto EAXVOCALMORPHER_MINPHONEMEBCOARSETUNING = -24L;
1428 constexpr auto EAXVOCALMORPHER_MAXPHONEMEBCOARSETUNING = 24L;
1429 constexpr auto EAXVOCALMORPHER_DEFAULTPHONEMEBCOARSETUNING = 0L;
1431 constexpr auto EAXVOCALMORPHER_MINWAVEFORM = 0UL;
1432 constexpr auto EAXVOCALMORPHER_MAXWAVEFORM = 2UL;
1433 constexpr auto EAXVOCALMORPHER_DEFAULTWAVEFORM = EAXVOCALMORPHER_MINWAVEFORM;
1435 constexpr auto EAXVOCALMORPHER_MINRATE = 0.0F;
1436 constexpr auto EAXVOCALMORPHER_MAXRATE = 10.0F;
1437 constexpr auto EAXVOCALMORPHER_DEFAULTRATE = 1.41F;
1440 // Pitch Shifter Effect
1442 extern const GUID EAX_PITCHSHIFTER_EFFECT;
1444 enum EAXPITCHSHIFTER_PROPERTY : unsigned int {
1445 EAXPITCHSHIFTER_NONE,
1446 EAXPITCHSHIFTER_ALLPARAMETERS,
1447 EAXPITCHSHIFTER_COARSETUNE,
1448 EAXPITCHSHIFTER_FINETUNE,
1449 }; // EAXPITCHSHIFTER_PROPERTY
1451 struct EAXPITCHSHIFTERPROPERTIES {
1452 long lCoarseTune; // Amount of pitch shift (semitones)
1453 long lFineTune; // Amount of pitch shift (cents)
1454 DECL_EQOP(EAXPITCHSHIFTERPROPERTIES, lCoarseTune, lFineTune)
1455 }; // EAXPITCHSHIFTERPROPERTIES
1458 constexpr auto EAXPITCHSHIFTER_MINCOARSETUNE = -12L;
1459 constexpr auto EAXPITCHSHIFTER_MAXCOARSETUNE = 12L;
1460 constexpr auto EAXPITCHSHIFTER_DEFAULTCOARSETUNE = 12L;
1462 constexpr auto EAXPITCHSHIFTER_MINFINETUNE = -50L;
1463 constexpr auto EAXPITCHSHIFTER_MAXFINETUNE = 50L;
1464 constexpr auto EAXPITCHSHIFTER_DEFAULTFINETUNE = 0L;
1467 // Ring Modulator Effect
1469 extern const GUID EAX_RINGMODULATOR_EFFECT;
1471 enum EAXRINGMODULATOR_PROPERTY : unsigned int {
1472 EAXRINGMODULATOR_NONE,
1473 EAXRINGMODULATOR_ALLPARAMETERS,
1474 EAXRINGMODULATOR_FREQUENCY,
1475 EAXRINGMODULATOR_HIGHPASSCUTOFF,
1476 EAXRINGMODULATOR_WAVEFORM,
1477 }; // EAXRINGMODULATOR_PROPERTY
1479 enum : unsigned long {
1480 EAX_RINGMODULATOR_SINUSOID,
1481 EAX_RINGMODULATOR_SAWTOOTH,
1482 EAX_RINGMODULATOR_SQUARE,
1485 // Use this structure for EAXRINGMODULATOR_ALLPARAMETERS
1486 struct EAXRINGMODULATORPROPERTIES {
1487 float flFrequency; // Frequency of modulation (Hz)
1488 float flHighPassCutOff; // Cut-off frequency of high-pass filter (Hz)
1489 unsigned long ulWaveform; // Waveform selector - see enum above
1490 DECL_EQOP(EAXRINGMODULATORPROPERTIES, flFrequency, flHighPassCutOff, ulWaveform)
1491 }; // EAXRINGMODULATORPROPERTIES
1494 constexpr auto EAXRINGMODULATOR_MINFREQUENCY = 0.0F;
1495 constexpr auto EAXRINGMODULATOR_MAXFREQUENCY = 8000.0F;
1496 constexpr auto EAXRINGMODULATOR_DEFAULTFREQUENCY = 440.0F;
1498 constexpr auto EAXRINGMODULATOR_MINHIGHPASSCUTOFF = 0.0F;
1499 constexpr auto EAXRINGMODULATOR_MAXHIGHPASSCUTOFF = 24000.0F;
1500 constexpr auto EAXRINGMODULATOR_DEFAULTHIGHPASSCUTOFF = 800.0F;
1502 constexpr auto EAXRINGMODULATOR_MINWAVEFORM = 0UL;
1503 constexpr auto EAXRINGMODULATOR_MAXWAVEFORM = 2UL;
1504 constexpr auto EAXRINGMODULATOR_DEFAULTWAVEFORM = EAXRINGMODULATOR_MINWAVEFORM;
1507 using LPEAXSET = ALenum(AL_APIENTRY*)(
1508 const GUID* property_set_id,
1509 ALuint property_id,
1510 ALuint property_source_id,
1511 ALvoid* property_buffer,
1512 ALuint property_size);
1514 using LPEAXGET = ALenum(AL_APIENTRY*)(
1515 const GUID* property_set_id,
1516 ALuint property_id,
1517 ALuint property_source_id,
1518 ALvoid* property_buffer,
1519 ALuint property_size);
1521 #undef DECL_EQOP
1522 #endif // !EAX_API_INCLUDED