summaryrefslogtreecommitdiff
path: root/kb1ec.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-17 02:19:03 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-17 02:19:03 +0000
commite2cab742b1d41becf87d7b21e4b451370e8a7c12 (patch)
tree2766ab70c7472182f7adeca4b66bd8545b0170e3 /kb1ec.h
parent51be44f5b34ffe5032414266787aca1aa8213316 (diff)
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
Diffstat (limited to 'kb1ec.h')
-rw-r--r--kb1ec.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/kb1ec.h b/kb1ec.h
index 5d614a8..7fbede0 100644
--- a/kb1ec.h
+++ b/kb1ec.h
@@ -74,7 +74,7 @@ typedef struct {
} echo_can_cb_s;
/* Echo canceller definition */
-typedef struct {
+struct echo_can_state {
/* an arbitrary ID for this echo can - this really should be settable from the calling channel... */
int id;
@@ -139,7 +139,7 @@ typedef struct {
int avg_Lu_i_ok;
#endif
-} echo_can_state_t;
+};
static inline void init_cb_s(echo_can_cb_s *cb, int len, void *where)
{
@@ -167,13 +167,13 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos)
return cb->buf_d[cb->idx_d + pos];
}
-static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu)
+static inline void init_cc(struct echo_can_state *ec, int N, int maxy, int maxu)
{
void *ptr = ec;
unsigned long tmp;
/* Double-word align past end of state */
- ptr += sizeof(echo_can_state_t);
+ ptr += sizeof(struct echo_can_state);
tmp = (unsigned long)ptr;
tmp += 3;
tmp &= ~3L;
@@ -232,12 +232,12 @@ static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu)
}
-static inline void echo_can_free(echo_can_state_t *ec)
+static inline void echo_can_free(struct echo_can_state *ec)
{
FREE(ec);
}
-static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig)
+static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig)
{
/* Declare local variables that are used more than once */
@@ -515,9 +515,9 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig
return u;
}
-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;
int maxy;
int maxu;
maxy = len + DEFAULT_M;
@@ -528,7 +528,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
maxy = (1 << DEFAULT_SIGMA_LY_I);
if (maxu < (1 << DEFAULT_SIGMA_LU_I))
maxu = (1 << DEFAULT_SIGMA_LU_I);
- ec = (echo_can_state_t *)MALLOC(sizeof(echo_can_state_t) +
+ ec = (struct echo_can_state *)MALLOC(sizeof(struct echo_can_state) +
4 + /* align */
sizeof(int) * len + /* a_i */
sizeof(short) * len + /* a_s */
@@ -537,7 +537,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
2 * sizeof(short) * (maxu) + /* u_s */
2 * sizeof(short) * len); /* y_tilde_s */
if (ec) {
- memset(ec, 0, sizeof(echo_can_state_t) +
+ memset(ec, 0, sizeof(struct echo_can_state) +
4 + /* align */
sizeof(int) * len + /* a_i */
sizeof(short) * len + /* a_s */
@@ -550,7 +550,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
return ec;
}
-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)
{
/* Set the hangover counter to the length of the can to
* avoid adjustments occuring immediately after initial forced training