[pulseaudio-discuss] How to ask for small latency

Lennart Poettering lennart at poettering.net
Mon Dec 22 07:32:54 PST 2008


On Mon, 22.12.08 14:31, Hynek Hanke (hanke at brailcom.org) wrote:

> 
> Lennart Poettering wrote:
> > In .13 the best way to request low latencies is passing the requested
> > latency when creating the stream in pa_buffer_attr.tlength. Then, set
> > PA_STREAM_ADJUST_LATENCY and you should be ready to go.
> >   
> 
> I have trouble using PA_STREAM_ADJUST_LATENCY in 0.9.13 :
> 
> (pa_stream_connect_playback(id->pulse_stream, NULL, &a_attr, 
> (pa_stream_flags_t)(PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_ADJUST_LATENCY), 
> &id->pulse_volume, NULL)
> 
> I get an negative error value and an Invalid argument error.
> The same function call works and later sound is produced
> if I do not specify the PA_STREAM_ADJUST_LATENCY option.
> 
> This is with 2.6.27-7-generic kernel and libasound2 1.0.18-1ubuntu1
> on Ubuntu Intrepid.
> 
> What is the correct way to use PA_STREAM_ADJUST_LATENCY. How
> can I find more information about what is the problem?

One option is to simply single step though
pa_stream_connect_playback. That function starts with a couple of
checks for the validity of the arguments passed.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list