Merge pull request #483 from jhasse/silence-nodiscard
[openal-soft.git] / al / effect.h
blob28ce1f3e188e3c4153c6762e7cba4466e1c5e194
1 #ifndef AL_EFFECT_H
2 #define AL_EFFECT_H
4 #include "AL/al.h"
5 #include "AL/efx.h"
7 #include "effects/base.h"
10 enum {
11 EAXREVERB_EFFECT = 0,
12 REVERB_EFFECT,
13 AUTOWAH_EFFECT,
14 CHORUS_EFFECT,
15 COMPRESSOR_EFFECT,
16 DISTORTION_EFFECT,
17 ECHO_EFFECT,
18 EQUALIZER_EFFECT,
19 FLANGER_EFFECT,
20 FSHIFTER_EFFECT,
21 MODULATOR_EFFECT,
22 PSHIFTER_EFFECT,
23 VMORPHER_EFFECT,
24 DEDICATED_EFFECT,
25 CONVOLUTION_EFFECT,
27 MAX_EFFECTS
29 extern bool DisabledEffects[MAX_EFFECTS];
31 extern float ReverbBoost;
33 struct EffectList {
34 const char name[16];
35 int type;
36 ALenum val;
38 extern const EffectList gEffectList[16];
41 struct ALeffect {
42 // Effect type (AL_EFFECT_NULL, ...)
43 ALenum type{AL_EFFECT_NULL};
45 EffectProps Props{};
47 const EffectVtable *vtab{nullptr};
49 /* Self ID */
50 ALuint id{0u};
52 DISABLE_ALLOC()
55 inline bool IsReverbEffect(const ALenum type) noexcept
56 { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
58 EffectStateFactory *getFactoryByType(ALenum type);
60 void InitEffect(ALeffect *effect);
62 void LoadReverbPreset(const char *name, ALeffect *effect);
64 #endif