From 511995311ff7628960606937c3099fa86639e3fe Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 2 Dec 2012 16:57:04 +0100 Subject: [PATCH] Fix very stupid SINC bug. Note to self: Don't write code when you're an emotional wreck. --- audio/sinc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/sinc.c b/audio/sinc.c index 0313a3d8a0..4041e8caed 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -80,7 +80,7 @@ static void init_sinc_table(rarch_resampler_t *resamp) { for (int j = 0; j < TAPS; j++) { - double p = (double)i / PHASES; + double p = (double)i / (1 << PHASE_BITS); double sinc_phase = M_PI * (p + (SIDELOBES - 1 - j)); float val = CUTOFF * sinc(CUTOFF * sinc_phase) * lanzcos(sinc_phase / SIDELOBES);