Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorval058 <val058@630fbc32-c412-0410-8d9e-966872dfccd7>2006-08-18 05:54:30 +0400
committerJean-Marc Valin <Jean-Marc.Valin@csiro.au>2008-05-19 08:30:55 +0400
commit0f8e7a7dc2a54dd005a92c0b8d5ce716379ffcd4 (patch)
tree2130bf35d8a4e3d699384cbca33b804e4a17b668
parent4f1285784657fd0f045948ad7d873244e2c4f07c (diff)
2-input doesn't crash anymore (1st chan is good, 2nd needs fixing)
git-svn-id: svn://lasagne.centie.net.au/trunk/audio/aec@185 630fbc32-c412-0410-8d9e-966872dfccd7
-rw-r--r--libspeex/mdf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libspeex/mdf.c b/libspeex/mdf.c
index 8b5d90d..ede56ab 100644
--- a/libspeex/mdf.c
+++ b/libspeex/mdf.c
@@ -314,7 +314,7 @@ SpeexEchoState *mc_echo_state_init(int frame_size, int filter_length, int nb_mic
st->e = (spx_word16_t*)speex_alloc(C*N*sizeof(spx_word16_t));
st->x = (spx_word16_t*)speex_alloc(K*N*sizeof(spx_word16_t));
- st->d = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+ st->d = (spx_word16_t*)speex_alloc(C*N*sizeof(spx_word16_t));
st->y = (spx_word16_t*)speex_alloc(C*N*sizeof(spx_word16_t));
st->Yps = (spx_word32_t*)speex_alloc(C*N*sizeof(spx_word32_t));
st->last_y = (spx_word16_t*)speex_alloc(C*N*sizeof(spx_word16_t));
@@ -511,7 +511,7 @@ void mc_echo_cancel(SpeexEchoState *st, const spx_int16_t *ref, const spx_int16_
for (chan = 0; chan < C; chan++)
{
- filter_dc_notch16(ref+chan, st->notch_radius, st->d, st->frame_size, st->notch_mem, C);
+ filter_dc_notch16(ref+chan, st->notch_radius, st->d+chan*N, st->frame_size, st->notch_mem, C);
/* Copy input data to buffer */
for (i=0;i<st->frame_size;i++)
{