[pulseaudio-discuss] "Expected" or "reasonable" latency

Colin Guthrie gmane at colin.guthr.ie
Mon Nov 9 10:04:36 PST 2009


'Twas brillig, and Eric Jonas at 09/11/09 17:23 did gyre and gimble:
> I'm developing an application which takes data off the network from a
> hardware device and plays it out the speaker. This is a continual stream
> of 32 ksps data from a dedicated ADC. I'm trying to keep the latency to
> the sound subsystem down below 80ms or so. 
> 
> Is this a reasonable latency to achieve under a 9.10 Ubuntu machine,
> using relatively uninteresting intel audio hardware? 
> 
> In experiments (following
> http://www.pulseaudio.org/wiki/LatencyControl ) I can get measured
> latencies down to around 40 ms at first, but then i get a few drop-outs
> and the latencies bump to 60, then 80, then... eventually getting up to
> 200+ ms. I'm curious if this is designed behavior (is pulse trying to
> adaptively change the latency / buffer size to prevent dropouts?) or if
> I'm doing something wrong here. 

This does indeed sound like glitch-free working as expected.
http://0pointer.de/blog/projects/pulse-glitch-free.html

Obviously in your case you know the hardware, but the user may very well 
move the stream to e.g. a bluetooth device or similar where the latency 
will be very different, do dealing with latency issues are something 
that applications shouldn't really ignore. Aiming for low latency is 
fine (if you don't care about power consumption), depending on it is 
generally not :)

I can't remember the current state of the watermark lowering code. There 
was a commit that lowered the water mark back down after a period of 
glitch freeness, which does increase the potential for glitches again. 
I'm not 100% sure if that commit is still in the code or not (I have a 
very vague recollection of it being reverted, but I want to stress it's 
a very vague recollection and could be very wrong!).

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list