summaryrefslogtreecommitdiff
path: root/mec2.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 /mec2.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 'mec2.h')
-rw-r--r--mec2.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/mec2.h b/mec2.h
index c539cfd..c58f3df 100644
--- a/mec2.h
+++ b/mec2.h
@@ -51,7 +51,7 @@ typedef struct {
// class definition
//
-typedef struct {
+struct echo_can_state {
/* Echo canceller definition */
/* absolute time */
@@ -86,7 +86,7 @@ typedef struct {
short max_y_tilde;
int max_y_tilde_pos;
-} echo_can_state_t;
+};
static inline void init_cb_s(echo_can_cb_s *cb, int len, void *where)
{
@@ -112,12 +112,12 @@ 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;
@@ -170,12 +170,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
*/
@@ -370,9 +370,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;
@@ -383,7 +383,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(echo_can_state_t) +
4 + /* align */
sizeof(int) * len + /* a_i */
sizeof(short) * len + /* a_s */
@@ -392,7 +392,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 */
@@ -405,7 +405,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)
{
/* Reset hang counter to avoid adjustments after
initial forced training */