aboutsummaryrefslogtreecommitdiffstats
path: root/main/tdd.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 21:02:25 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 21:02:25 +0000
commit270a084091952b3d63d198e334cfaca8f947fe55 (patch)
tree13ccddd05502830068366280a71872a7cb9e434f /main/tdd.c
parentcaafb40114bc5226084f2e20e239d0201ae7c007 (diff)
Merged revisions 132510 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r132510 | tilghman | 2008-07-21 15:59:03 -0500 (Mon, 21 Jul 2008) | 5 lines Optionally build integer-based routines for FSK tone decoding (but default to the more accurate float-based routines). (Closes issue #11679) (Step 1 of 2) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@132512 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/tdd.c')
-rw-r--r--main/tdd.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/main/tdd.c b/main/tdd.c
index e07d5b0d1..8cbe18837 100644
--- a/main/tdd.c
+++ b/main/tdd.c
@@ -99,6 +99,7 @@ struct tdd_state *tdd_new(void)
struct tdd_state *tdd;
tdd = calloc(1, sizeof(*tdd));
if (tdd) {
+#ifdef INTEGER_CALLERID
tdd->fskd.ispb = 176; /* 45.5 baud */
/* Set up for 45.5 / 8000 freq *32 to allow ints */
tdd->fskd.pllispb = (int)((8000 * 32 * 2) / 90);
@@ -115,8 +116,24 @@ struct tdd_state *tdd_new(void)
tdd->fskd.state = 0;
tdd->pos = 0;
tdd->mode = 0;
- tdd->charnum = 0;
fskmodem_init(&tdd->fskd);
+#else
+ tdd->fskd.spb = 176; /* 45.5 baud */
+ tdd->fskd.hdlc = 0; /* Async */
+ tdd->fskd.nbit = 5; /* 5 bits */
+ tdd->fskd.nstop = 1.5; /* 1.5 stop bits */
+ tdd->fskd.parity = 0; /* No parity */
+ tdd->fskd.bw=0; /* Filter 75 Hz */
+ tdd->fskd.f_mark_idx = 0; /* 1400 Hz */
+ tdd->fskd.f_space_idx = 1; /* 1800 Hz */
+ tdd->fskd.pcola = 0; /* No clue */
+ tdd->fskd.cont = 0; /* Digital PLL reset */
+ tdd->fskd.x0 = 0.0;
+ tdd->fskd.state = 0;
+ tdd->pos = 0;
+ tdd->mode = 2;
+#endif
+ tdd->charnum = 0;
} else
ast_log(LOG_WARNING, "Out of memory\n");
return tdd;