[pulseaudio-discuss] pulseaudio lag at sound end

Raymond Yau superquad.vortex2 at gmail.com
Wed Oct 3 01:03:11 PDT 2012

2012-10-3 上午4:16 於 "Samuele Carcagno" <sam.carcagno at gmail.com> 寫道:
> Hi,
> I have the same issue that is described in this post (not mine)
> basically, when I play a sound with aplay or other command line
utilities, when the sound ends there is a long delay (about 3 seconds)
> before the program returns. This is an issue for me because I play two or
more sounds in sequence from a python program for
> psychoacoustics research, and the silent interval between two sounds
needs to be roughly controlled. I could make wav files
> with the sounds in sequence and silence between them, but the sounds need
to be synchronized with lights, and this is not
> so easy to achieve with a single long wav file.
> I was wondering whether there are any settings in pulseaudio that can be
tweaked to reduce this sound offset lag to negligible levels.
> I should add that with alsa (that is when I remove pulseaudio from my
system) there is not such problem, aplay starts and returns
> without noticeable delays. For this reason I have been living without
pulseaudio so far, but some programs start not running well
> without it (skype on Kubuntu Precise), so it would be great if I could
solve the issue.

you can reduce the maximum buffer size if you are using hda

echo 64 > /proc/asound/card0/pcm0p/sub0/prealloc

now.the.maximum buffer time of onboard hda become less than 0.4 second
instead of over 20 seconds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20121003/bc5f342c/attachment.html>

More information about the pulseaudio-discuss mailing list