diff options
Diffstat (limited to 'al/filter.h')
-rw-r--r-- | al/filter.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/al/filter.h b/al/filter.h index 123e64b0..222a6917 100644 --- a/al/filter.h +++ b/al/filter.h @@ -1,12 +1,18 @@ #ifndef AL_FILTER_H #define AL_FILTER_H + #include "AL/al.h" #include "AL/alc.h" #include "AL/alext.h" #include "almalloc.h" +#if ALSOFT_EAX +#include <memory> + +#include "eax_utils.h" +#endif // ALSOFT_EAX #define LOWPASSFREQREF 5000.0f #define HIGHPASSFREQREF 250.0f @@ -47,6 +53,40 @@ struct ALfilter { void getParamfv(ALenum param, float *values) const { vtab->getParamfv(this, param, values); } DISABLE_ALLOC() + +#if ALSOFT_EAX +public: + void eax_set_low_pass_params( + ALCcontext& context, + const EaxAlLowPassParam& param); +#endif // ALSOFT_EAX }; +#if ALSOFT_EAX +class EaxAlFilterDeleter +{ +public: + EaxAlFilterDeleter() noexcept = default; + + EaxAlFilterDeleter( + ALCcontext& context); + + + void operator()( + ALfilter* filter); + +private: + ALCcontext* context_{}; +}; // EaxAlFilterDeleter + +using EaxAlFilterUPtr = std::unique_ptr<ALfilter, EaxAlFilterDeleter>; + +EaxAlFilterUPtr eax_create_al_low_pass_filter( + ALCcontext& context); + +void eax_delete_low_pass_filter( + ALCcontext& context, + ALfilter& filter); +#endif // ALSOFT_EAX + #endif |