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

93 lines
2.0 KiB

  1. #include "config.h"
  2. #include "AL/al.h"
  3. #include "alc/inprogext.h"
  4. #include "alc/effects/base.h"
  5. #include "effects.h"
  6. namespace {
  7. void Convolution_setParami(EffectProps* /*props*/, ALenum param, int /*val*/)
  8. {
  9. switch(param)
  10. {
  11. default:
  12. throw effect_exception{AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x",
  13. param};
  14. }
  15. }
  16. void Convolution_setParamiv(EffectProps *props, ALenum param, const int *vals)
  17. {
  18. switch(param)
  19. {
  20. default:
  21. Convolution_setParami(props, param, vals[0]);
  22. }
  23. }
  24. void Convolution_setParamf(EffectProps* /*props*/, ALenum param, float /*val*/)
  25. {
  26. switch(param)
  27. {
  28. default:
  29. throw effect_exception{AL_INVALID_ENUM, "Invalid null effect float property 0x%04x",
  30. param};
  31. }
  32. }
  33. void Convolution_setParamfv(EffectProps *props, ALenum param, const float *vals)
  34. {
  35. switch(param)
  36. {
  37. default:
  38. Convolution_setParamf(props, param, vals[0]);
  39. }
  40. }
  41. void Convolution_getParami(const EffectProps* /*props*/, ALenum param, int* /*val*/)
  42. {
  43. switch(param)
  44. {
  45. default:
  46. throw effect_exception{AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x",
  47. param};
  48. }
  49. }
  50. void Convolution_getParamiv(const EffectProps *props, ALenum param, int *vals)
  51. {
  52. switch(param)
  53. {
  54. default:
  55. Convolution_getParami(props, param, vals);
  56. }
  57. }
  58. void Convolution_getParamf(const EffectProps* /*props*/, ALenum param, float* /*val*/)
  59. {
  60. switch(param)
  61. {
  62. default:
  63. throw effect_exception{AL_INVALID_ENUM, "Invalid null effect float property 0x%04x",
  64. param};
  65. }
  66. }
  67. void Convolution_getParamfv(const EffectProps *props, ALenum param, float *vals)
  68. {
  69. switch(param)
  70. {
  71. default:
  72. Convolution_getParamf(props, param, vals);
  73. }
  74. }
  75. EffectProps genDefaultProps() noexcept
  76. {
  77. EffectProps props{};
  78. return props;
  79. }
  80. } // namespace
  81. DEFINE_ALEFFECT_VTABLE(Convolution);
  82. const EffectProps ConvolutionEffectProps{genDefaultProps()};