uqs's projects
/
games.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0263845
)
Add a gaussian filter for maximum beeping pleasure.
author
Simon Schubert <corecode@dragonflybsd.org>
Sat, 29 Nov 2008 23:41:05 +0000 (
00:41
+0100)
committer
Simon Schubert <corecode@dragonflybsd.org>
Sun, 30 Nov 2008 12:26:16 +0000 (13:26 +0100)
games/morse/morse.c
patch
|
blob
|
blame
|
history
diff --git
a/games/morse/morse.c
b/games/morse/morse.c
index
eb79b5b
..
790bd44
100644
(file)
--- 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