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 FilterTable() = default;
38 struct NullFilterTable
: public FilterTable
<NullFilterTable
> { };
39 struct LowpassFilterTable
: public FilterTable
<LowpassFilterTable
> { };
40 struct HighpassFilterTable
: public FilterTable
<HighpassFilterTable
> { };
41 struct BandpassFilterTable
: public FilterTable
<BandpassFilterTable
> { };
45 ALenum type
{AL_FILTER_NULL
};
49 float HFReference
{LowPassFreqRef
};
51 float LFReference
{HighPassFreqRef
};
53 using TableTypes
= std::variant
<NullFilterTable
,LowpassFilterTable
,HighpassFilterTable
,
55 TableTypes mTypeVariant
;
60 static void SetName(ALCcontext
*context
, ALuint id
, std::string_view name
);
65 struct FilterSubList
{
66 uint64_t FreeMask
{~0_u64
};
67 gsl::owner
<std::array
<ALfilter
,64>*> Filters
{nullptr};
69 FilterSubList() noexcept
= default;
70 FilterSubList(const FilterSubList
&) = delete;
71 FilterSubList(FilterSubList
&& rhs
) noexcept
: FreeMask
{rhs
.FreeMask
}, Filters
{rhs
.Filters
}
72 { rhs
.FreeMask
= ~0_u64
; rhs
.Filters
= nullptr; }
75 FilterSubList
& operator=(const FilterSubList
&) = delete;
76 FilterSubList
& operator=(FilterSubList
&& rhs
) noexcept
77 { std::swap(FreeMask
, rhs
.FreeMask
); std::swap(Filters
, rhs
.Filters
); return *this; }