summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel/adrian-aec.h
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-09 13:40:24 +0530
committerColin Guthrie <colin@mageia.org>2011-05-11 10:30:38 +0100
commite678beaf14fcba69bc679e3c8bcf406dff1f7242 (patch)
treeb64c4262f9171705ff1325d5c3dfe13f9ec43d00 /src/modules/echo-cancel/adrian-aec.h
parent8eed56961481bded395005cfd1729c045c23b289 (diff)
echo-cancel: Handle alignment requirement manually
PA_ALIGNED can't always guarantee that the alignment we want (the GCC man page suggests that the linker might not be able to meet the alignment requirements we desire). Instead, we now allocate some extra memory and guaratee that the alignment we require is met.
Diffstat (limited to 'src/modules/echo-cancel/adrian-aec.h')
-rw-r--r--src/modules/echo-cancel/adrian-aec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/echo-cancel/adrian-aec.h b/src/modules/echo-cancel/adrian-aec.h
index 9c722b9d..efb9e274 100644
--- a/src/modules/echo-cancel/adrian-aec.h
+++ b/src/modules/echo-cancel/adrian-aec.h
@@ -306,7 +306,8 @@ struct AEC {
// NLMS-pw
REAL x[NLMS_LEN + NLMS_EXT]; // tap delayed loudspeaker signal
REAL xf[NLMS_LEN + NLMS_EXT]; // pre-whitening tap delayed signal
- PA_DECLARE_ALIGNED(16, REAL, w[NLMS_LEN]); // tap weights
+ REAL w_arr[NLMS_LEN+16]; // tap weights
+ REAL *w; // this will be a 16-byte aligned pointer into w_arr
int j; // optimize: less memory copies
double dotp_xf_xf; // double to avoid loss of precision
float delta; // noise floor to stabilize NLMS