diff options
author | Chris Robinson <[email protected]> | 2013-05-21 07:10:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-21 07:10:24 -0700 |
commit | e4186f49039a17916dedaa536143761d0a6caa87 (patch) | |
tree | 4db81426d103111f53eae936e520d627e7916ccd /OpenAL32/Include | |
parent | 3ee0f8feb9a011eca3a76848f1ffb139c592f7b4 (diff) |
Use a properly-defined history for the FILTER struct
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alFilter.h | 14 | ||||
-rw-r--r-- | OpenAL32/Include/alSource.h | 6 |
2 files changed, 7 insertions, 13 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h index 09cef93c..94feb3ee 100644 --- a/OpenAL32/Include/alFilter.h +++ b/OpenAL32/Include/alFilter.h @@ -11,16 +11,12 @@ extern "C" { typedef struct { ALfloat coeff; -#ifndef _MSC_VER - ALfloat history[0]; -#else - ALfloat history[1]; -#endif + ALfloat history[2]; } FILTER; -static __inline ALfloat lpFilter2P(FILTER *iir, ALuint offset, ALfloat input) +static __inline ALfloat lpFilter2P(FILTER *iir, ALfloat input) { - ALfloat *history = &iir->history[offset*2]; + ALfloat *history = iir->history; ALfloat a = iir->coeff; ALfloat output = input; @@ -32,9 +28,9 @@ static __inline ALfloat lpFilter2P(FILTER *iir, ALuint offset, ALfloat input) return output; } -static __inline ALfloat lpFilter2PC(const FILTER *iir, ALuint offset, ALfloat input) +static __inline ALfloat lpFilter2PC(const FILTER *iir, ALfloat input) { - const ALfloat *history = &iir->history[offset*2]; + const ALfloat *history = iir->history; ALfloat a = iir->coeff; ALfloat output = input; diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index d8ffc9aa..bd1b2931 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -62,8 +62,7 @@ typedef struct DirectParams { ALfloat Gains[MaxChannels][MaxChannels]; /* A low-pass filter, using 2 chained one-pole filters. */ - FILTER iirFilter; - ALfloat history[MaxChannels*2]; + FILTER Filter[MaxChannels]; } DirectParams; typedef struct SendParams { @@ -74,8 +73,7 @@ typedef struct SendParams { ALfloat Gain; /* A low-pass filter, using 2 chained one-pole filters. */ - FILTER iirFilter; - ALfloat history[MaxChannels*2]; + FILTER Filter[MaxChannels]; } SendParams; |