aboutsummaryrefslogtreecommitdiffstats
path: root/al/effect.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-29 17:54:07 -0700
committerChris Robinson <[email protected]>2019-07-29 17:54:07 -0700
commit4c9e18c5a0c29548eb38db636785aa7064713c5d (patch)
tree7b7904b9a0c33256ec7f094b31c7ed0cdafc487d /al/effect.h
parentc2de0782cfec62d6a1c3fe2d409d0f64528ae5f7 (diff)
Rename al/* sources to avoid camel-case
Diffstat (limited to 'al/effect.h')
-rw-r--r--al/effect.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/al/effect.h b/al/effect.h
new file mode 100644
index 00000000..270b8e20
--- /dev/null
+++ b/al/effect.h
@@ -0,0 +1,61 @@
+#ifndef AL_EFFECT_H
+#define AL_EFFECT_H
+
+#include "AL/al.h"
+#include "AL/efx.h"
+
+#include "effects/base.h"
+
+
+enum {
+ EAXREVERB_EFFECT = 0,
+ REVERB_EFFECT,
+ AUTOWAH_EFFECT,
+ CHORUS_EFFECT,
+ COMPRESSOR_EFFECT,
+ DISTORTION_EFFECT,
+ ECHO_EFFECT,
+ EQUALIZER_EFFECT,
+ FLANGER_EFFECT,
+ FSHIFTER_EFFECT,
+ MODULATOR_EFFECT,
+ PSHIFTER_EFFECT,
+ VMORPHER_EFFECT,
+ DEDICATED_EFFECT,
+
+ MAX_EFFECTS
+};
+extern ALboolean DisabledEffects[MAX_EFFECTS];
+
+extern ALfloat ReverbBoost;
+
+struct EffectList {
+ const char name[16];
+ int type;
+ ALenum val;
+};
+extern const EffectList gEffectList[15];
+
+
+struct ALeffect {
+ // Effect type (AL_EFFECT_NULL, ...)
+ ALenum type{AL_EFFECT_NULL};
+
+ EffectProps Props{};
+
+ const EffectVtable *vtab{nullptr};
+
+ /* Self ID */
+ ALuint id{0u};
+};
+
+inline ALboolean IsReverbEffect(ALenum type)
+{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
+
+EffectStateFactory *getFactoryByType(ALenum type);
+
+void InitEffect(ALeffect *effect);
+
+void LoadReverbPreset(const char *name, ALeffect *effect);
+
+#endif