Native pulseaudio without using the esound compatability layer is real good at capturing audio from other programs. It's trash for everything else. Play audio using pulseaudio while another program is playing using ALSA? Lockup. Play audio on pulseaudio while playing audio on Chrome? You have to kill chrome again before pulseaudio unfreezes.

Pulseaudio doesn't work with optical outputs. Lions have to run Mix2005 after running pulseaudio to enable the optical output, then run pavucontrol to select the recording device.



It's another example of why lions use virtually no software besides their own.
Firefox uses pulseaudio for its audio. Ripping copy protected audio from Firefox seems to be the only reason pulseaudio exists.

Making pulseaudio minimally functional required editing the /etc/pulse/default.pa file.  It needs the following lines.

load-module module-esound-protocol-tcp auth-cookie-enabled=0 auth-anonymous=1
load-module module-native-protocol-tcp auth-cookie-enabled=0 auth-anonymous=1

load-module module-esound-protocol-unix auth-cookie-enabled=0
load-module module-native-protocol-unix auth-cookie-enabled=0

The modules defeat both connection refused & authentication failed errors.


Programming a client for Pulseaudio is a trip down memory lane.  Most everyone stopped writing desktop programs for Linux 10 years ago & there are no more internet discussions of low level audio programming for Linux.  Programming anything but a mobile app using the Apple or Google frameworks is now career suicide.

There actually is a set of libraries you have to link.  

libpulse-simple
libpulse
libpulsecommon*.a


The client libraries, header files, server, & all the silly modules are in the one pulseaudio distribution.  Examples of recording & playing back are in an obscure page.




They take a server argument.  If it's NULL, it uses the local pulseaudio server.  If it's an empty string, it fails.  If it's a hostname, it uses the pulseaudio server on the remote host.  There is a pa_simple_get_latency function which doesn't work.


Comments

Popular posts from this blog