August 29th, 2006
So I thought I’d write something technically useful here for a change
I set up PulseAudio on my desktop yesterday. PulseAudio (formerly polypaudio) is a sound server, like esound or arts. It started out as a next-gen replacement for esound, which has been basically in a state of static suckiness for many years now. I set it up pretty much because it looked like a fun thing to do and also so I’d get sound in YouTube, which I never have before because I refuse to run esound (due to previously mentioned suckiness), and Flash only likes playing audio through a sound server. It only understands arts and esd, but PulseAudio has an esd compatibility mode – it will transparently work with anything that can output audio to esd.
In the end it was rather easy – the only gotcha was that, since I have a slightly odd sound card setup (I use the optical digital output of my AV710, which isn’t the primary output channel), I have to specify it manually in the PulseAudio config – Pulse’s auto-detect kung fu can only set up the primary output channel for each device. I pretty much followed the PulseAudio perfect setup guide and everything went swimmingly. To manually specify my soundcard, I had to have this line in /etc/pulse/default.pa :
load-module module-alsa-sink device=plughw:0,1
Obviously, if the non-primary output you want to use is something other than 0,1 under ALSA’s naming scheme, you can adjust it to suit. I then commented out the module-detect and module-hal-detect lines to disable the autodetection kung fu, which just gets confused by my configuration. So far Pulse seems to work very well, it can mix together the outputs of just about everything, and YouTube works fine. I was also happy to hear from the developers that they paid attention to audio quality and designed Pulse to avoid doing any kind of alteration of the audio stream (resampling etc) unless it’s actually necessary.
It’s best to use on GNOME, as it knows how to act as a replacement for esd, but not for arts, so you’d end up with two sound servers running, which is usually a mess.