aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-28 10:57:38 -0700
committerChris Robinson <[email protected]>2013-05-28 10:57:38 -0700
commit48aa1e10d64d7c62cab856a0c5d7f9e140efbd6b (patch)
tree737726d31ce2cee1b548108c41493c3b2451d57f /OpenAL32
parent6556626055e9985251ebd782c8551839e6d67ac5 (diff)
Use the high-shelf filter in place of low-pass
They effectively both work to lower (or raise) high frequencies. However, the high-shelf performs better when gain=1.
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alFilter.h2
-rw-r--r--OpenAL32/alFilter.c11
2 files changed, 0 insertions, 13 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
index dd5edbb9..f42747f2 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -16,8 +16,6 @@ ALfloat lpCoeffCalc(ALfloat g, ALfloat cw);
typedef enum ALfilterType {
- ALfilterType_LowPass,
-
ALfilterType_HighShelf,
ALfilterType_LowShelf,
ALfilterType_Peaking,
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 550c99f5..5bef87fd 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -343,17 +343,6 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g
/* Calculate filter coefficients depending on filter type */
switch(type)
{
- case ALfilterType_LowPass:
- alpha = sinf(w0) / 2.0f * sqrtf((gain + 1.0f/gain) *
- (1.0f/0.75f - 1.0f) + 2.0f);
- filter->b[0] = (1.0f - cosf(w0)) * 0.5f;
- filter->b[1] = 1.0f - cosf(w0);
- filter->b[2] = (1.0f - cosf(w0)) * 0.5f;
- filter->a[0] = 1.0f + alpha;
- filter->a[1] = -2.0f*cosf(w0);
- filter->a[2] = 1.0f - alpha;
- break;
-
case ALfilterType_HighShelf:
alpha = sinf(w0) / 2.0f * sqrtf((gain + 1.0f/gain) *
(1.0f/0.75f - 1.0f) + 2.0f);