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

66 lines
1.6 KiB

  1. #include "config.h"
  2. #ifdef ALSOFT_EAX
  3. #include "effects.h"
  4. #include <cassert>
  5. #include "AL/efx.h"
  6. EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, const EaxCall& call)
  7. {
  8. #define EAX_PREFIX "[EAX_MAKE_EAX_EFFECT] "
  9. switch (al_effect_type)
  10. {
  11. case AL_EFFECT_NULL:
  12. return eax_create_eax_null_effect();
  13. case AL_EFFECT_CHORUS:
  14. return eax_create_eax_chorus_effect(call);
  15. case AL_EFFECT_DISTORTION:
  16. return eax_create_eax_distortion_effect(call);
  17. case AL_EFFECT_ECHO:
  18. return eax_create_eax_echo_effect(call);
  19. case AL_EFFECT_FLANGER:
  20. return eax_create_eax_flanger_effect(call);
  21. case AL_EFFECT_FREQUENCY_SHIFTER:
  22. return eax_create_eax_frequency_shifter_effect(call);
  23. case AL_EFFECT_VOCAL_MORPHER:
  24. return eax_create_eax_vocal_morpher_effect(call);
  25. case AL_EFFECT_PITCH_SHIFTER:
  26. return eax_create_eax_pitch_shifter_effect(call);
  27. case AL_EFFECT_RING_MODULATOR:
  28. return eax_create_eax_ring_modulator_effect(call);
  29. case AL_EFFECT_AUTOWAH:
  30. return eax_create_eax_auto_wah_effect(call);
  31. case AL_EFFECT_COMPRESSOR:
  32. return eax_create_eax_compressor_effect(call);
  33. case AL_EFFECT_EQUALIZER:
  34. return eax_create_eax_equalizer_effect(call);
  35. case AL_EFFECT_EAXREVERB:
  36. return eax_create_eax_reverb_effect(call);
  37. default:
  38. assert(false && "Unsupported AL effect type.");
  39. return nullptr;
  40. }
  41. #undef EAX_PREFIX
  42. }
  43. #endif // ALSOFT_EAX