effect.h 1.1 KB

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