]> git.tdb.fi Git - ext/openal.git/blob - al/effect.h
Tweak some types to work around an MSVC compile error
[ext/openal.git] / al / effect.h
1 #ifndef AL_EFFECT_H
2 #define AL_EFFECT_H
3
4 #include "AL/al.h"
5 #include "AL/efx.h"
6
7 #include "al/effects/effects.h"
8 #include "alc/effects/base.h"
9
10
11 enum {
12     EAXREVERB_EFFECT = 0,
13     REVERB_EFFECT,
14     AUTOWAH_EFFECT,
15     CHORUS_EFFECT,
16     COMPRESSOR_EFFECT,
17     DISTORTION_EFFECT,
18     ECHO_EFFECT,
19     EQUALIZER_EFFECT,
20     FLANGER_EFFECT,
21     FSHIFTER_EFFECT,
22     MODULATOR_EFFECT,
23     PSHIFTER_EFFECT,
24     VMORPHER_EFFECT,
25     DEDICATED_EFFECT,
26     CONVOLUTION_EFFECT,
27
28     MAX_EFFECTS
29 };
30 extern bool DisabledEffects[MAX_EFFECTS];
31
32 extern float ReverbBoost;
33
34 struct EffectList {
35     const char name[16];
36     int type;
37     ALenum val;
38 };
39 extern const EffectList gEffectList[16];
40
41
42 struct ALeffect {
43     // Effect type (AL_EFFECT_NULL, ...)
44     ALenum type{AL_EFFECT_NULL};
45
46     EffectProps Props{};
47
48     const EffectVtable *vtab{nullptr};
49
50     /* Self ID */
51     ALuint id{0u};
52
53     DISABLE_ALLOC()
54 };
55
56 void InitEffect(ALeffect *effect);
57
58 void LoadReverbPreset(const char *name, ALeffect *effect);
59
60 bool IsValidEffectType(ALenum type) noexcept;
61
62 #endif