diff options
author | Boris I. Bendovsky <[email protected]> | 2022-01-30 14:47:32 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-30 04:47:32 -0800 |
commit | 19ed994dc30ed84ea7cbbb5152577669fc25caf6 (patch) | |
tree | f68933bf8f778806618bd6c0b1bf9ced1b0ccf08 /al/filter.h | |
parent | 619249371a40f03cf988d1f5750d643df797c485 (diff) |
Add EAX extensions (EAX 2.0-5.0, X-RAM) (#632)
* Add EAX extensions (EAX 2.0-5.0, X-RAM)
* Comment out C++17 leftovers
* Remove everything related to patching
* Update alsoftrc.sample
* Rewrite integration
* Fix GCC compilation under Linux
* Always reset EAX effect properties when loading it into FX slot
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 |