[pulseaudio-discuss] How pulseaudio support autospawn?
gmane at colin.guthr.ie
Tue May 10 09:28:14 PDT 2011
'Twas brillig, and Lin, Mengdong at 10/05/11 08:37 did gyre and gimble:
> How pulseaudio support autospawn?
> After pulse audio daemon is killed manually, how it will be executed
> automatically? How can it know some client is attempts to connect to
> it? Could someone introduce its internal implementation?
This is performed automatically by libpulse.
All pulseaudio client appliations (be them native applications
supporting PA directly or an ALSA application using the alsa->pulse
plugin) use libpulse. It has code that tries to connect to the daemon,
and if that connection fails it will automatically attempt to spawn a
pulseaudio daemon and then connect to it.
There are some exceptions to this e.g.
* when the client application is trying to connect to a remote address.
* when autospawn=no is set in client.conf
* possibly a couple more I forget off the top of my head :D
> I got a explanation of autospawn: “ if the daemon is not running when
> the first client attempts to connect, it will be executed automatically”
> But I hope someone can give more detail.
So the code itself is here:
which is triggered from here:
Hopefully you can follow things through from here, but feel free to ask
any other questions if you're stuck :)
Tribalogic Limited [http://www.tribalogic.net/]
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss