🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.0 KiB

  1. #ifndef AL_EFFECT_H
  2. #define AL_EFFECT_H
  3. #include "AL/al.h"
  4. #include "AL/efx.h"
  5. #include "al/effects/effects.h"
  6. #include "alc/effects/base.h"
  7. enum {
  8. EAXREVERB_EFFECT = 0,
  9. REVERB_EFFECT,
  10. AUTOWAH_EFFECT,
  11. CHORUS_EFFECT,
  12. COMPRESSOR_EFFECT,
  13. DISTORTION_EFFECT,
  14. ECHO_EFFECT,
  15. EQUALIZER_EFFECT,
  16. FLANGER_EFFECT,
  17. FSHIFTER_EFFECT,
  18. MODULATOR_EFFECT,
  19. PSHIFTER_EFFECT,
  20. VMORPHER_EFFECT,
  21. DEDICATED_EFFECT,
  22. CONVOLUTION_EFFECT,
  23. MAX_EFFECTS
  24. };
  25. extern bool DisabledEffects[MAX_EFFECTS];
  26. extern float ReverbBoost;
  27. struct EffectList {
  28. const char name[16];
  29. int type;
  30. ALenum val;
  31. };
  32. extern const EffectList gEffectList[16];
  33. struct ALeffect {
  34. // Effect type (AL_EFFECT_NULL, ...)
  35. ALenum type{AL_EFFECT_NULL};
  36. EffectProps Props{};
  37. const EffectVtable *vtab{nullptr};
  38. /* Self ID */
  39. ALuint id{0u};
  40. DISABLE_ALLOC()
  41. };
  42. void InitEffect(ALeffect *effect);
  43. void LoadReverbPreset(const char *name, ALeffect *effect);
  44. bool IsValidEffectType(ALenum type) noexcept;
  45. #endif