summaryrefslogtreecommitdiff
path: root/mec3.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 /mec3.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 'mec3.h')
-rw-r--r--mec3.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/mec3.h b/mec3.h
index e28c66b..c1ceaef 100644
--- a/mec3.h
+++ b/mec3.h
@@ -69,7 +69,7 @@ typedef struct {
int maxexp;
} cbuf_s;
-typedef struct {
+struct echo_can_state {
short a_s[NTAPS]; /* Coefficients in shorts */
int a_i[NTAPS]; /* Coefficients in ints*/
#ifdef DO_BACKUP
@@ -85,9 +85,9 @@ typedef struct {
int hcntr; /* Hangtime counter */
int pos; /* Position in curcular buffers */
int backup; /* Backup timer */
-} echo_can_state_t;
+};
-static inline void echo_can_free(echo_can_state_t *ec)
+static inline void echo_can_free(struct echo_can_state *ec)
{
FREE(ec);
}
@@ -114,7 +114,7 @@ static inline void buf_add(cbuf_s *b, short sample, int pos, int taps)
}
}
-static inline short echo_can_update(echo_can_state_t *ec, short ref, short sig)
+static inline short echo_can_update(struct echo_can_state *ec, short ref, short sig)
{
int x;
short u;
@@ -204,15 +204,15 @@ static inline short echo_can_update(echo_can_state_t *ec, short ref, short sig)
return u;
}
-static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode)
+static inline struct echo_can_state *echo_can_create(int taps, int adaption_mode)
{
- echo_can_state_t *ec;
+ struct echo_can_state *ec;
int x;
taps = NTAPS;
- ec = MALLOC(sizeof(echo_can_state_t));
+ ec = MALLOC(sizeof(struct echo_can_state));
if (ec) {
- memset(ec, 0, sizeof(echo_can_state_t));
+ memset(ec, 0, sizeof(struct echo_can_state));
ec->taps = taps;
ec->pos = ec->taps-1;
for (x=0;x<31;x++) {
@@ -225,7 +225,7 @@ static inline echo_can_state_t *echo_can_create(int taps, 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 */