diff options
author | Chris Robinson <[email protected]> | 2008-07-26 17:13:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-07-26 17:13:50 -0700 |
commit | 597e01153ebae150f734bcd640fb692bb69bdc05 (patch) | |
tree | 911dd8dc8d7d210615c71d041967597fc3db90f3 /OpenAL32 | |
parent | d3e5fcd13e6fa597a74d93ef87738b5491cc4bdf (diff) |
Use arrays instead of pointer-to-arrays for the low-pass filter
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alFilter.h | 8 | ||||
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 3 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 3 |
3 files changed, 4 insertions, 10 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h index c57dabb0..afda32c3 100644 --- a/OpenAL32/Include/alFilter.h +++ b/OpenAL32/Include/alFilter.h @@ -7,9 +7,11 @@ extern "C" { #endif +#define FILTER_SECTIONS 2 /* 2 filter sections for 24 db/oct filter */ + typedef struct { - float *history; /* pointer to history in filter */ - float *coef; /* pointer to coefficients of filter */ + float history[2*FILTER_SECTIONS]; /* history in filter */ + float coef[4*FILTER_SECTIONS + 1]; /* coefficients of filter */ } FILTER; #define AL_FILTER_TYPE 0x8001 @@ -53,8 +55,6 @@ AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pf ALvoid ReleaseALFilters(ALvoid); -#define FILTER_SECTIONS 2 /* 2 filter sections for 24 db/oct filter */ - int InitLowPassFilter(ALCcontext *Context, FILTER *iir); #ifdef __cplusplus diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index e05448cd..f9667ddb 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -141,9 +141,6 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effect ALAuxiliaryEffectSlot = ((ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslots[i])); - free(ALAuxiliaryEffectSlot->iirFilter.coef); - free(ALAuxiliaryEffectSlot->iirFilter.history); - // Remove Source from list of Sources list = &Context->AuxiliaryEffectSlot; while(*list && *list != ALAuxiliaryEffectSlot) diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 1960b676..d7095f0f 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -181,9 +181,6 @@ ALAPI ALvoid ALAPIENTRY alDeleteSources(ALsizei n, const ALuint *sources) ALSource->Send[j].Slot = NULL; } - free(ALSource->iirFilter.coef); - free(ALSource->iirFilter.history); - // Decrement Source count Context->SourceCount--; |