Catch exceptions from backend start calls
[openal-soft.git] / al / effect.h
blob270b8e20cb91f23ac816c6c5f864f01b82df2c7f
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,
26 MAX_EFFECTS
28 extern ALboolean DisabledEffects[MAX_EFFECTS];
30 extern ALfloat ReverbBoost;
32 struct EffectList {
33 const char name[16];
34 int type;
35 ALenum val;
37 extern const EffectList gEffectList[15];
40 struct ALeffect {
41 // Effect type (AL_EFFECT_NULL, ...)
42 ALenum type{AL_EFFECT_NULL};
44 EffectProps Props{};
46 const EffectVtable *vtab{nullptr};
48 /* Self ID */
49 ALuint id{0u};
52 inline ALboolean IsReverbEffect(ALenum type)
53 { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
55 EffectStateFactory *getFactoryByType(ALenum type);
57 void InitEffect(ALeffect *effect);
59 void LoadReverbPreset(const char *name, ALeffect *effect);
61 #endif