[pulseaudio-discuss] Sources only working when pavucontrol is running

Colin Guthrie gmane at colin.guthr.ie
Wed Apr 7 00:44:34 PDT 2010


'Twas brillig, and Brendon Costa at 07/04/10 07:36 did gyre and gimble:
> Hi again,
> 
> Thanks for the info on the default devices. I have it working fine now.
> 
> However I have run into another problem. When I run my application,
> the sinks are working fine and audio sounds good. However the sources
> are not working correctly. If i run my app, i get occasional bursts of
> sound from whatever source I am using instead of a continuous stream
> of audio. If while my app is running i then start the pavucontrol
> application, everything seems to magically start working perfectly.
> Somehow starting the pavucontrol application fixes whatever problem my
> application is experiencing.
> 
> Does anyone know what the pavucontrol application does that might be
> affect my application? Does anyone know if it changes the priority of
> the server or change buffer sizes etc?
> 
> Any suggestions on what i can do to track this problem down?

It relates to latency.  By default PulseAudio tries to use very large
latencies - 2s or so (tho' ideally up to 20s). High latencies are very
good for power consumption. It does not mean that e.g. lip sync in
movies is affected, there are still good ways to do syncrhonisation. It
just means that e.g. a media player can pump in 20s worth of audio and
forget about it (i.e. let the processor sleep as much as possible) until
it's woken up again 19.5s later. Of course if the audio is skipped, fast
forwarded etc. the buffer has to be thrown away but generally speaking
this approach saves power.

When pavucontrol runs, it opens all sinks/source in order to provide vu
meters. In doing so it has to reduce the latency of the devices in order
to give something vaguely approaching realtime visualisation!

So really it's about setting the correct buffer metrics for your chosen
situation:
http://pulseaudio.org/wiki/LatencyControl

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