[alsa-devel] Delays with PulseAudio (normal)?

Raymond Yau superquad.vortex2 at gmail.com
Tue Nov 17 08:37:16 CET 2009


2009/11/17 Tom Watson <sdc695 at yahoo.com>

> I just did an fresh install of a Fedora 11, and it went well for the most
> part.  Then I tried some audio stuff, and it seems that pulseaudio (groan!)
> has a closing delay.
>
> In my case I want to issue a "beep" then make a recording.  This involves
> the equivalent of:
>
> $ aplay beep.wav
> $ arecord -d recordit.wav
>
> This used to work in a kernel of a few years ago, but in F11 there is a
> NOTICABLE delay from the end of the beep to the start of the recording.  It
> can even be seen if one does a simple aplay and waits for the shell prompt.
>  I was wondering if there was an option in a configuration file, or a hammer
> I can take to pulseaudio to solve this problem.
>
> An added bit of information:  The beep.wav file is about 0.1 second long
> (if that matters, which I believe it shouldn't).
>
> Any clues would be appreciated,
> Thanks.
>
>
> --
> Tom Watson
>
>
In theory,  minimum period bytes  is 128 bytes if your alsa application are
using alsa-pulse plugin


    err =
        snd_pcm_ioplug_set_param_minmax(io,
                        SND_PCM_IOPLUG_HW_BUFFER_BYTES,
                        1, 4 * 1024 * 1024);
    if (err < 0)
        return err;

    err =
        snd_pcm_ioplug_set_param_minmax(io,
                        SND_PCM_IOPLUG_HW_PERIOD_BYTES,
                        128, 2 * 1024 * 1024);
    if (err < 0)
        return err;


More information about the Alsa-devel mailing list