====== PulseAudio ======
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].
===== Installation =====
==== Package overview ====
=== Packages ===
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.
=== USE Flags ===
To find what USE-flags pulseaudio carries, run,
# emerge -pv pulseaudio paprefs pavucontrol pavumeter
==== Emerge ====
Emerge pulseaudio by running
# emerge -av pulseaudio paprefs pavucontrol pavumeter
===== Configuration =====
==== Configuration Files ====
PulseAudio has three configuration files.
* /etc/pulse/client.conf
* /etc/pulse/daemon.conf
* /etc/pulse/default.pa
===== Pulse Audio Server =====
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
==== System-wide Instance: Start at Boot ====
Alternatively, You can use a system-wide instance for the PulseAudio server.
* This is not recommended unless you are running a thin client.
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 pulse
$ gpasswd -a pulse-access
===== Application support =====
==== ALSA ====
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
}
==== gStreamer ====
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
===== Troubleshooting =====
==== Flash doesn't play audio ====
If you want to have Flash support on your system you will have to install libflashsupport, emerge libflashsupport