The aim of the article is to guide you in installing and configuring the PulseAudio server. For more Information about the PulseAudio Server check the [http://pulseaudio.org/ PulseAudio Wiki].
PulseAudio consists of 6 packages: media-sound/pulseaudio, media-sound/paprefs, media-sound/pavumeter, media-sound/padevchooser, media-sound/paman and media-sound/pavucontrol. Note that everything but media-sound/pulseaudio are X-GUI apps, so you won't need them unless you run X.Org.
To find what USE-flags pulseaudio carries, run,
# emerge -pv pulseaudio paprefs pavucontrol pavumeter
Emerge pulseaudio by running
# emerge -av pulseaudio paprefs pavucontrol pavumeter
PulseAudio has three configuration files. * /etc/pulse/client.conf * /etc/pulse/daemon.conf * /etc/pulse/default.pa
Before using PulseAudio, you must launch the PulseAudio server:
$ pulseaudio
Restart in debugging-mode:
$ pulseaudio -k; sleep 4; pulseaudio -vv
In case something like
E: [pulseaudio] pid.c: Daemon already running.
is returned, disable auto respawn:
; autospawn = yes autospawn = no
Alternatively, You can use a system-wide instance for the PulseAudio server.
You will want to add pulseaudio to the 'default' Runlevel.
$ eselect rc add pulseaudio default
And add your user to 'pulse' and 'pulse-access' groups
$ gpasswd -a <USER> pulse $ gpasswd -a <USER> pulse-access
If a program supports PulseAudio directly, generally, you would use PulseAudio directly. If a program only supports ALSA, then you can use PulseAudio through ALSA.
For ALSA support emerge media-plugins/alsa-plugins.
Add this to your ~/.asoundrc:
pcm.pulse { type pulse } ctl.pulse { type pulse }
If you need a test sound file, emerge gnome-extra/gnome-audio which only has sound files:
Test with:
# aplay -Dpulse /usr/share/sounds/generic.wav
If you want PulseAudio to be the default device for ALSA, add this to your .asoundrc:
pcm.!default { type pulse } ctl.!default { type pulse }
Emerge media-plugins/gst-plugins-pulse for gstreamer support:
Run gstreamer-properties and under the Audio tab set default Input and default Output plugin to PulseAudio:
# gstreamer-properties
If you want to have Flash support on your system you will have to install libflashsupport, emerge libflashsupport