🛠️🐜 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.

58 lines
1.0 KiB

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