aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r--OpenAL32/alFilter.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index f2538818..bced3a7f 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -420,6 +420,24 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g
filter->process = ALfilterState_processC;
}
+void ALfilterState_processPassthru(ALfilterState *filter, const ALfloat *src, ALuint numsamples)
+{
+ if(numsamples >= 2)
+ {
+ filter->x[1] = src[numsamples-2];
+ filter->x[0] = src[numsamples-1];
+ filter->y[1] = src[numsamples-2];
+ filter->y[0] = src[numsamples-1];
+ }
+ else if(numsamples == 1)
+ {
+ filter->x[1] = filter->x[0];
+ filter->x[0] = src[0];
+ filter->y[1] = filter->y[0];
+ filter->y[0] = src[0];
+ }
+}
+
static void lp_SetParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
{ SET_ERROR_AND_RETURN(context, AL_INVALID_ENUM); }