From e2cab742b1d41becf87d7b21e4b451370e8a7c12 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sat, 17 Dec 2005 02:19:03 +0000 Subject: don't include the echo canceller headers in every module that includes zaptel.h... instead, only in zaptel.c git-svn-id: http://svn.digium.com/svn/zaptel/trunk@867 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- sec.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sec.h') diff --git a/sec.h b/sec.h index d4e98ce..0a05698 100644 --- a/sec.h +++ b/sec.h @@ -70,7 +70,7 @@ #define NONUPDATE_DWELL_TIME 600 /* 600 samples, or 75ms */ -typedef struct +struct echo_can_state { int tx_power; int rx_power; @@ -98,11 +98,11 @@ typedef struct int32_t latest_correction; /* Indication of the magnitude of the latest adaption, or a code to indicate why adaption was skipped, for test purposes */ -} echo_can_state_t; +}; -static echo_can_state_t *echo_can_create(int len, int adaption_mode); -static void echo_can_free(echo_can_state_t *ec); -static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx); +static struct echo_can_state *echo_can_create(int len, int adaption_mode); +static void echo_can_free(struct echo_can_state *ec); +static int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx); /* Original parameters : #define MIN_TX_POWER_FOR_ADAPTION 256 @@ -117,12 +117,12 @@ static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx); #define MIN_RX_POWER_FOR_ADAPTION 64 */ -static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) +static inline struct echo_can_state *echo_can_create(int len, int adaption_mode) { - echo_can_state_t *ec; + struct echo_can_state *ec; void *ptr; - ptr = ec = (echo_can_state_t *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) + + ptr = ec = (struct echo_can_state *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) + len * 3 * sizeof(int16_t)); if (ec == NULL) return NULL; @@ -141,13 +141,13 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) } /*- End of function --------------------------------------------------------*/ -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } /*- End of function --------------------------------------------------------*/ -static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx) +static inline int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx) { int32_t echo_value; int clean_rx; @@ -268,7 +268,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t } /*- End of function --------------------------------------------------------*/ -static inline int echo_can_traintap(echo_can_state_t *ec, int pos, short val) +static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val) { /* Reset hang counter to avoid adjustments after initial forced training */ -- cgit v1.2.3