diff options
author | Chris Robinson <[email protected]> | 2015-01-13 09:38:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-01-13 09:38:13 -0800 |
commit | 205e258d1ab6712e7e302906b435cf42917b246b (patch) | |
tree | 8cf29b89a6cae43d7654448bfdff9d020110b819 | |
parent | f9a923533360cfbfaccf0e5527a40a51efa97215 (diff) |
Fix high-pass coefficients
-rw-r--r-- | OpenAL32/alFilter.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index 9e10595a..72eff9bb 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -388,12 +388,12 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g 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; + 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)); |