I trying to make PulseAudio echo canceller work.
I have two applications - recorder and player, both use PulseAudio. I create player and recorder like this:
// pulseAudio
pa_simple *paS=0;
pa_sample_spec ss;
void initPulseAudio()
{
ss.format = PA_SAMPLE_S16LE;
ss.channels = 1;
ss.rate = 8000;
paS = pa_simple_new(NULL, // Use the default server.
"bottomPlayer", // Our application's name.
PA_STREAM_PLAYBACK,
NULL, // Use the default device.
"playStream", // Description of our stream.
&ss, // Our sample format.
NULL, // Use default channel map
NULL, // Use default buffering attributes.
NULL // Ignore error code.
);
if(!paS)
{
fprintf(stderr,
"unable to create recorder\n");
myExit(1);
}
}
All is working, except echo cancellation. I have enabled it with
pactl load-module module-echo-cancel
but there is no difference with and without that module - echo exists. I am new with PulseAudio, and was unable to find good manual about echo canceller usage. What should i add or adjust in my devices setup to make it work?
OS - linux, now it is ubuntu, but finally it will be openWrt