From 2ec2f6a785b0e8c505fcc4fc11db4227e0b720a6 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 2 Aug 2014 00:49:21 -0600 Subject: [PATCH] tweak filter params --- Quake/snd_mix.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Quake/snd_mix.c b/Quake/snd_mix.c index 15d75f80..6d555b8a 100644 --- a/Quake/snd_mix.c +++ b/Quake/snd_mix.c @@ -193,7 +193,7 @@ static void S_MakeBlackmanWindowKernel(float *kernel, int M, float f_c) } // must be divisible by 4 -#define FILTER_KERNEL_SIZE 48 +#define FILTER_KERNEL_SIZE 384 /* ============== @@ -252,6 +252,13 @@ static void S_LowpassFilter(float f_c, int *data, int stride, int count, memcpy(memory, input + count, FILTER_KERNEL_SIZE * sizeof(float)); +// zero out samples + for (i=0; ispeed; + const float cutoff_freq = (sndspeed.value * 0.5 * 0.96) / shm->speed; S_LowpassFilter(cutoff_freq, (int *)paintbuffer, 2, end - paintedtime, memory_l); S_LowpassFilter(cutoff_freq, ((int *)paintbuffer) + 1, 2, end - paintedtime, memory_r);