From 18ba91785d3e9014bac16756eba0c46225df9861 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sun, 30 Nov 2008 00:41:05 +0100 Subject: [PATCH] Add a gaussian filter for maximum beeping pleasure. --- games/morse/morse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/games/morse/morse.c b/games/morse/morse.c index eb79b5b656..790bd442ab 100644 --- a/games/morse/morse.c +++ b/games/morse/morse.c @@ -433,14 +433,14 @@ alloc_soundbuf(struct tone_data *tone, double len, int on) /* * Gauss window */ -#if 0 +#ifdef GAUSS_FILTER int fi = i; if (i > FILTER_SAMPLES) fi = samples - i; - filter = exp(-0.5 * - pow((double)(fi - FILTER_SAMPLES) / - (0.4 * FILTER_SAMPLES), 2)); + filter = exp(-4.0 * + pow((double)(FILTER_SAMPLES - fi) / + FILTER_SAMPLES, 2)); #else /* * Triangle window -- 2.41.0