]>
code.delx.au - pulseaudio/blob - src/modules/echo-cancel/null.c
2 Copyright 2012 Peter Meerwald <p.meerwald@bct-electronic.com>
4 PulseAudio is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License,
7 or (at your option) any later version.
9 PulseAudio is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
20 #include <pulse/cdecl.h>
23 #include <pulsecore/core-util.h>
24 #include <pulsecore/modargs.h>
25 #include "echo-cancel.h"
28 pa_bool_t
pa_null_ec_init(pa_core
*c
, pa_echo_canceller
*ec
,
29 pa_sample_spec
*source_ss
, pa_channel_map
*source_map
,
30 pa_sample_spec
*sink_ss
, pa_channel_map
*sink_map
,
31 uint32_t *nframes
, const char *args
) {
34 source_ss
->format
= PA_SAMPLE_S16NE
;
35 source_ss
->channels
= 1;
37 *sink_ss
= *source_ss
;
38 *sink_map
= *source_map
;
40 pa_log_debug("null AEC: nframes %u, channels %d, rate %d", *nframes
, source_ss
->channels
, source_ss
->rate
);
45 void pa_null_ec_run(pa_echo_canceller
*ec
, const uint8_t *rec
, const uint8_t *play
, uint8_t *out
) {
46 // blocksize is nframes * frame-size
47 memcpy(out
, rec
, 256 * 2);
50 void pa_null_ec_done(pa_echo_canceller
*ec
) {