From eb85afa49c28ac1e8ef060e9d18ea5244206656f Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Tue, 2 Aug 2016 07:39:02 +0200 Subject: [PATCH] C-Netz: Use cosine-square ramp for better signal generation --- src/cnetz/dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c index 115ce56..cab2030 100644 --- a/src/cnetz/dsp.c +++ b/src/cnetz/dsp.c @@ -66,12 +66,12 @@ static void dsp_init_ramp(cnetz_t *cnetz) PDEBUG(DDSP, DEBUG_DEBUG, "Generating smooth ramp table.\n"); for (i = 0; i < 256; i++) { c = cos((double)i / 256.0 * PI); -#if 0 + /* use cosine-square ramp. tests showed that phones are more + * happy with that. */ if (c < 0) c = -sqrt(-c); else c = sqrt(c); -#endif ramp_down[i] = (int)(c * (double)cnetz->fsk_deviation); ramp_up[i] = -ramp_down[i]; }