diff options
author | Chris Robinson <[email protected]> | 2014-05-17 07:17:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-17 07:17:48 -0700 |
commit | 0b5b39d5e60b250a41a6f306f3167a553d5dad58 (patch) | |
tree | 22141ce0bc2e5e009d217b3beedaa3f59eec48cd /OpenAL32/Include | |
parent | 70f1e54068f2ccfce30f9e5db8ea61b01283f59b (diff) |
Add a flag to specify when the low-pass filter needs to apply
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alu.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 36e81e0b..dd13a293 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -39,6 +39,11 @@ extern "C" { #endif +enum ActiveFilters { + AF_None = 0, + AF_LowPass = 1, +}; + typedef struct HrtfState { alignas(16) ALfloat History[SRC_HISTORY_LENGTH]; alignas(16) ALfloat Values[HRIR_LENGTH][2]; @@ -54,6 +59,16 @@ typedef struct HrtfParams { typedef struct DirectParams { ALfloat (*OutBuffer)[BUFFERSIZE]; + enum ActiveFilters Filters[MAX_INPUT_CHANNELS]; + ALfilterState LpFilter[MAX_INPUT_CHANNELS]; + + /* If not 'moving', gain/coefficients are set directly without fading. */ + ALboolean Moving; + /* Stepping counter for gain/coefficient fading. */ + ALuint Counter; + /* History/coefficient offset. */ + ALuint Offset; + union { struct { HrtfParams Params[MAX_INPUT_CHANNELS]; @@ -72,19 +87,17 @@ typedef struct DirectParams { ALfloat Target[MAX_INPUT_CHANNELS][MaxChannels]; } Gains; } Mix; - /* If not 'moving', gain/coefficients are set directly without fading. */ - ALboolean Moving; - /* Stepping counter for gain/coefficient fading. */ - ALuint Counter; - /* History/coefficient offset. */ - ALuint Offset; - - ALfilterState LpFilter[MAX_INPUT_CHANNELS]; } DirectParams; typedef struct SendParams { ALfloat (*OutBuffer)[BUFFERSIZE]; + enum ActiveFilters Filters[MAX_INPUT_CHANNELS]; + ALfilterState LpFilter[MAX_INPUT_CHANNELS]; + + ALboolean Moving; + ALuint Counter; + /* Gain control, which applies to all input channels to a single (mono) * output buffer. */ struct { @@ -92,11 +105,6 @@ typedef struct SendParams { ALfloat Step; ALfloat Target; } Gain; - - ALboolean Moving; - ALuint Counter; - - ALfilterState LpFilter[MAX_INPUT_CHANNELS]; } SendParams; |