aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r--OpenAL32/alFilter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 7fb6a5e9..fd10addc 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -405,6 +405,15 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g
filter->a[1] = -2.0f * cosf(w0);
filter->a[2] = 1.0f - alpha;
break;
+ case ALfilterType_HighPass:
+ alpha = sinf(w0) * sinhf(logf(2.0f) / 2.0f * bandwidth * w0 / sinf(w0));
+ filter->b[0] = (1.0f + cosf(w0)) / 2.0f;
+ filter->b[1] = 1.0f + cosf(w0);
+ filter->b[2] = (1.0f + cosf(w0)) / 2.0f;
+ filter->a[0] = 1.0f + alpha;
+ filter->a[1] = -2.0f * cosf(w0);
+ filter->a[2] = 1.0f - alpha;
+ break;
case ALfilterType_BandPass:
alpha = sinf(w0) * sinhf(logf(2.0f) / 2.0f * bandwidth * w0 / sinf(w0));
filter->b[0] = alpha;