15 #include "alnumeric.h"
18 inline constexpr float LowPassFreqRef
{5000.0f
};
19 inline constexpr float HighPassFreqRef
{250.0f
};
23 static void setParami(struct ALfilter
*, ALenum
, int);
24 static void setParamiv(struct ALfilter
*, ALenum
, const int*);
25 static void setParamf(struct ALfilter
*, ALenum
, float);
26 static void setParamfv(struct ALfilter
*, ALenum
, const float*);
28 static void getParami(const struct ALfilter
*, ALenum
, int*);
29 static void getParamiv(const struct ALfilter
*, ALenum
, int*);
30 static void getParamf(const struct ALfilter
*, ALenum
, float*);
31 static void getParamfv(const struct ALfilter
*, ALenum
, float*);
34 struct NullFilterTable
: public FilterTable
<NullFilterTable
> { };
35 struct LowpassFilterTable
: public FilterTable
<LowpassFilterTable
> { };
36 struct HighpassFilterTable
: public FilterTable
<HighpassFilterTable
> { };
37 struct BandpassFilterTable
: public FilterTable
<BandpassFilterTable
> { };
41 ALenum type
{AL_FILTER_NULL
};
45 float HFReference
{LowPassFreqRef
};
47 float LFReference
{HighPassFreqRef
};
49 using TableTypes
= std::variant
<NullFilterTable
,LowpassFilterTable
,HighpassFilterTable
,
51 TableTypes mTypeVariant
;
56 static void SetName(ALCcontext
*context
, ALuint id
, std::string_view name
);
61 struct FilterSubList
{
62 uint64_t FreeMask
{~0_u64
};
63 gsl::owner
<std::array
<ALfilter
,64>*> Filters
{nullptr};
65 FilterSubList() noexcept
= default;
66 FilterSubList(const FilterSubList
&) = delete;
67 FilterSubList(FilterSubList
&& rhs
) noexcept
: FreeMask
{rhs
.FreeMask
}, Filters
{rhs
.Filters
}
68 { rhs
.FreeMask
= ~0_u64
; rhs
.Filters
= nullptr; }
71 FilterSubList
& operator=(const FilterSubList
&) = delete;
72 FilterSubList
& operator=(FilterSubList
&& rhs
) noexcept
73 { std::swap(FreeMask
, rhs
.FreeMask
); std::swap(Filters
, rhs
.Filters
); return *this; }