diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-01-17 14:37:17 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-01-17 14:37:17 +0000 |
commit | 4fafe751bfec339f940f2dae156769c74abdcb30 (patch) | |
tree | 5e6a91ec7d62f4536e6c504475f2942f10c8bfea | |
parent | 523a0bda29f526b876a769fa0a389f8e12f2245c (diff) |
Version 0.1.11 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@407 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | callerid.c | 11 | ||||
-rwxr-xr-x | include/asterisk/callerid.h | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/callerid.c b/callerid.c index a3d9f42f1..e8688fb7f 100755 --- a/callerid.c +++ b/callerid.c @@ -43,7 +43,8 @@ struct callerid_state { int len; }; -float dr[4], di[4]; + +float cid_dr[4], cid_di[4]; float clidsb = 8000.0 / 1200.0; #define CALLERID_SPACE 2200.0 /* 2200 hz for "0" */ @@ -52,10 +53,10 @@ float clidsb = 8000.0 / 1200.0; void callerid_init(void) { /* Initialize stuff for inverse FFT */ - dr[0] = cos(CALLERID_SPACE * 2.0 * M_PI / 8000.0); - di[0] = sin(CALLERID_SPACE * 2.0 * M_PI / 8000.0); - dr[1] = cos(CALLERID_MARK * 2.0 * M_PI / 8000.0); - di[1] = sin(CALLERID_MARK * 2.0 * M_PI / 8000.0); + cid_dr[0] = cos(CALLERID_SPACE * 2.0 * M_PI / 8000.0); + cid_di[0] = sin(CALLERID_SPACE * 2.0 * M_PI / 8000.0); + cid_dr[1] = cos(CALLERID_MARK * 2.0 * M_PI / 8000.0); + cid_di[1] = sin(CALLERID_MARK * 2.0 * M_PI / 8000.0); } struct callerid_state *callerid_new(void) diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h index 079a839f9..6d77e19ce 100755 --- a/include/asterisk/callerid.h +++ b/include/asterisk/callerid.h @@ -139,16 +139,16 @@ extern int ast_isphonenumber(char *n); * routines (used by ADSI for example) */ -extern float dr[4]; -extern float di[4]; +extern float cid_dr[4]; +extern float cid_di[4]; extern float clidsb; static inline float callerid_getcarrier(float *cr, float *ci, int bit) { /* Move along. There's nothing to see here... */ float t; - t = *cr * dr[bit] - *ci * di[bit]; - *ci = *cr * di[bit] + *ci * dr[bit]; + t = *cr * cid_dr[bit] - *ci * cid_di[bit]; + *ci = *cr * cid_di[bit] + *ci * cid_dr[bit]; *cr = t; t = 2.0 - (*cr * *cr + *ci * *ci); |