aboutsummaryrefslogtreecommitdiffstats
path: root/main/tdd.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 19:10:26 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 19:10:26 +0000
commitbeb1ba78131e9723805d6410631a3752dbe076b7 (patch)
tree0d103be965030a1cd87281a1c9f2700006e3e318 /main/tdd.c
parent6314703e326f1f20c709a890a958f07b9ee6a69c (diff)
Additional TDD changes (preparing for SIP changes - adding TDD support to SIP)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89048 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/tdd.c')
-rw-r--r--main/tdd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/tdd.c b/main/tdd.c
index c8eb93edd..0d1f7fdce 100644
--- a/main/tdd.c
+++ b/main/tdd.c
@@ -261,6 +261,18 @@ static inline float tdd_getcarrier(float *cr, float *ci, int bit)
PUT_TDD_STOP; /* Stop bit */ \
} while(0);
+/*! Generate TDD hold tone */
+int tdd_gen_holdtone(unsigned char *buf)
+{
+ int bytes=0;
+ float scont=0.0,cr=1.0,ci=0.0;
+ while(scont < tddsb*10.0) {
+ PUT_AUDIO_SAMPLE(tdd_getcarrier(&cr, &ci, 1));
+ scont += 1.0;
+ }
+ return bytes;
+}
+
int tdd_generate(struct tdd_state *tdd, unsigned char *buf, const char *str)
{
int bytes=0;