aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-09-13 02:46:14 -0700
committerChris Robinson <[email protected]>2008-09-13 02:46:14 -0700
commit6bfdb57a5b833a17fba867b11f800bba211674b8 (patch)
tree6d23b9aaf7287e1c11eda2205ddc5a54e6c2a998 /Alc/ALu.c
parent26e8ea60a5e6e631aaf337f0d02aeb4c6a85a462 (diff)
Use a 12dB/oct rolloff instead of 24 for the lowpass filter
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 61e11bbf..37d30851 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -157,7 +157,6 @@ __inline ALuint aluChannelsFromFormat(ALenum format)
static __inline ALfloat lpFilter(FILTER *iir, ALfloat input)
{
- unsigned int i;
float *hist1_ptr,*hist2_ptr,*coef_ptr;
ALfloat output,new_hist,history1,history2;
@@ -170,22 +169,19 @@ static __inline ALfloat lpFilter(FILTER *iir, ALfloat input)
* or filter gain */
output = input * (*coef_ptr++);
- for(i = 0;i < FILTER_SECTIONS;i++)
- {
- history1 = *hist1_ptr; /* history values */
- history2 = *hist2_ptr;
+ history1 = *hist1_ptr; /* history values */
+ history2 = *hist2_ptr;
- output = output - history1 * (*coef_ptr++);
- new_hist = output - history2 * (*coef_ptr++); /* poles */
+ output = output - history1 * (*coef_ptr++);
+ new_hist = output - history2 * (*coef_ptr++); /* poles */
- output = new_hist + history1 * (*coef_ptr++);
- output = output + history2 * (*coef_ptr++); /* zeros */
+ output = new_hist + history1 * (*coef_ptr++);
+ output = output + history2 * (*coef_ptr++); /* zeros */
- *hist2_ptr++ = *hist1_ptr;
- *hist1_ptr++ = new_hist;
- hist1_ptr++;
- hist2_ptr++;
- }
+ *hist2_ptr++ = *hist1_ptr;
+ *hist1_ptr++ = new_hist;
+ hist1_ptr++;
+ hist2_ptr++;
return output;
}