Currently i am working on a voice application for the raspberry pi. It is very important that the audio delay is as low as possible.
I'm using pulseaudio and gstreamer for this because pulseaudio includes some echocancellers, and these echo cancellers are mandatory for the voice application i am working on.
When using gstreamer and alsa, i get an acceptable delay of say 200 ms. I test this by connecting a USB microphone to the pi and sending the audio output of the microphone dierctly to the analog output (speaker output). The gstreamer commands are:
gst-launch-1.0 alsasrc device=plughw:camera ! alsasink sync=false
As mentioned earlier, the delay using alsa only is very acceptable. Next try is the same topology, but using pulseaudio.
gst-launch-1.0 pulsesrc ! pulsesink sync=false
Now, i have a delay of about one second, which way to high!
When googling for this problem, i found this page (https://www.freedesktop.org/wiki/Softwa ... cyControl/ ) were some tips are given to reduce the latency when using pulseaudio. I have implemented these tips by building gstreamer from source and modified pulssrc.c and pulsesink.c according to the documentation, but no improvement.
Can anyone give a hint about reducing the latency when using pulseaudio on raspberry pi. Help is greatly appriciated.