2 This file is part of PulseAudio.
4 Copyright 2010 Arun Raghavan <arun.raghavan@collabora.co.uk>
6 PulseAudio is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation; either version 2.1 of the License,
9 or (at your option) any later version.
11 PulseAudio is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with PulseAudio; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <pulse/sample.h>
27 #include <pulse/channelmap.h>
28 #include <pulsecore/macro.h>
30 #include <speex/speex_echo.h>
32 /* Common data structures */
34 typedef struct pa_echo_canceller_params pa_echo_canceller_params
;
36 struct pa_echo_canceller_params
{
40 SpeexEchoState
*state
;
42 /* each canceller-specific structure goes here */
46 typedef struct pa_echo_canceller pa_echo_canceller
;
48 struct pa_echo_canceller
{
49 pa_bool_t (*init
) (pa_echo_canceller
*ec
, pa_sample_spec ss
, pa_channel_map map
, const char *args
);
50 void (*run
) (pa_echo_canceller
*ec
, uint8_t *rec
, uint8_t *play
, uint8_t *out
);
51 void (*done
) (pa_echo_canceller
*ec
);
52 uint32_t (*get_block_size
) (pa_echo_canceller
*ec
);
54 pa_echo_canceller_params params
;
57 /* Speex canceller functions */
58 pa_bool_t
pa_speex_ec_init(pa_echo_canceller
*ec
, pa_sample_spec ss
, pa_channel_map map
, const char *args
);
59 void pa_speex_ec_run(pa_echo_canceller
*ec
, uint8_t *rec
, uint8_t *play
, uint8_t *out
);
60 void pa_speex_ec_done(pa_echo_canceller
*ec
);
61 uint32_t pa_speex_ec_get_block_size(pa_echo_canceller
*ec
);