Nepherte (dot) be

Featuring PulseAudio in GNOME 2.26

PulseAudio is together with the new sound applet itself, the most remarkable new feature in the recent GNOME 2.26 release. PulseAudio is a (cross-platform) networked sound server and includes many features such as software mixing of multiple audio streams. A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

As a student Computer Science Engineer I very much appreciate the modular design. PulseAudio contains a lot of (module) plugins.  All audio from/to clients and audio interfaces goes through these modules. PulseAudio clients can send audio to “sinks” and receive audio from “sources”. A client can be GStreamer, xinelib, MPlayer or any other audio application. Only the device drivers/audio interfaces can be either sources or sinks (they are often hardware in- and out-puts). This diagram nicely illustrates the big picture.

Pulseaudio Diagram

With the integration of PulseAudio in GNOME, it will most likely become the dominant audio solution for linux. There are, unfortunately, many opposed to PulseAudio, mainly because of the poor implementation in Ubuntu Hardy Heron and Intrepid Ibex. For those interested in fixing PulseAudio on Ubuntu, I can warmly recommend this topic on the ubuntuforums. While I experienced this issue firsthand,  it remains  an unjustified reason as PulseAudio is not to blame here. Hopefully the general acceptance will improve in the near future.

Funny thing is that of all distros it is Arch Linux that decides not to implement PulseAudio. JDG, the gnome maintainer, patched gnome to its previous state mainly because of another unjustified misconception about PulseAudio. People generally believe that PulseAudio acts like a regular daemon and that it needs to be started in order to get any sound. This is however not true. Unless you want it to act like a central system-wide sound server, the daemon will be spawned when an application tries to play sound. You can follow  the discussion of gnome 2.26 on Arch linux here.

Therefore I had to rebuild a small part of gnome in order to get PulseAudio working. The packages involved were the unpatched gnome-settings-daemon, gnome-applets, gnome-media and gnome-control-center. To get every sound application working, I had to rebuild some of them with pulse support enabled as well. The result is very much worth it.

As you can see in the screenshots, the sound applet has received a new look. They now use a horizontal slider instead of a vertical one. In addition, they included a mute check box. Gnome continues with their tradition of minor but useful changes with this nice applet.

Default Volume AppletDefault Volume Applet -  sound per application

Thanks to PulseAudio, you can now also set the volume per application. You can mute for example the sound of MPlayer while  leaving mpd’s sound untouched or simply set custom volume levels for each application. You can create volume sliders for each channel as well. A welcome addition. Even more impressive is the way it graciously deals with multiple sound cards. It recognizes both my on board as my creative x-fi sound card and I can switch between them. If you want, you can simultaneously play sound through multiple audio cards or map specific channels to specific sound card outputs and create a so called “virtual surround sound card”. For example, use 2 outputs of sound card 1 for the front left/right channel and map the rear left/right channel to sound card 2.

Default Volume Applet - Multiple Sound CardsPulseaudio Applications

PulseAudio comes with some optional extra applications depicted on the right most screenshot above: a volume meter, a volume manager and the pulseaudio manager. Not depicted is the device chooser where you choose the pulseaudio server, the used sink, etc…

In conclusion I can say PulseAudio is really worth having, giving you lots of possibilitiesn and tThe integration with GNOME is a great success.

2 Comments

    Hi there,
    Read your interesting article about Pulse.
    While trying to get my BT headset working I found out you sorted it out already.
    I was wondering how the let Pulse Audio Applet know how to “remember”that my default sink should be alsa_output.bluetooth?

    Thanks in advance,
    Paul

  • Well, I have no experience whatsoever with bluetooth and pulseaudio but maybe you can select your bluetooth device in pavucontrol? I believe that’s where you can select your default output device. That’s how I can set my default sound card (I have two). (I assume you already were able to get sound out of your headset with pulseaudio).

Leave a Reply