Sebastian Hesselbarth
Fri, 20 Jun 2008 03:01:20 -0700
David Hwang wrote:
Does anyone know how to get pulseaudio to use $AUDIODEV instead of assuming /dev/dsp?
Hi,
below is my config for pulseaudio as default audio device for all
users on linux (debian).
This script replaces /usr/bin/gnome-session and is therefore loaded
every time a user creates a session. The correct oss device is replaced
in utpulse.pa and copied in the users home directory.
The .asoundrc also allows the user to have alsa devices that get
redirected to pulse.
Regards,
Sebastian
---->8---- /usr/bin/gnome-session-sunray (linked as /usr/bin/gnome-session)
#!/bin/bash
if [ ! "x${UTAUDIODEV}" == "x" ] ; then
if [ ! -d ${HOME}/.pulse ] ; then
mkdir ${HOME}/.pulse
fi
# create pulseaudio configuration for utaudio
PULSECONF=${HOME}/.pulse/default.pa
sed "s|UTAUDIODEV|$UTAUDIODEV|g" /opt/SUNWutref/lib/utpulse.pa > ${PULSECONF}
# create asoundrc for pulseaudio redirection
ASOUNDRC=${HOME}/.asoundrc
echo -n > ${ASOUNDRC}
echo "pcm.!default { " >> ${ASOUNDRC}
echo " type pulse" >> ${ASOUNDRC}
echo "}" >> ${ASOUNDRC}
echo "ctl.!default { " >> ${ASOUNDRC}
echo " type pulse" >> ${ASOUNDRC}
echo "}" >> ${ASOUNDRC}
# start pulseaudio deamon
pulseaudio -D
fi
exec /usr/bin/gnome-session.orig "$@"
----8<----
---->8---- /opt/SUNWutref/lib/utpulse.pa
load-module module-oss device=UTAUDIODEV playback=1 record=1 fragment_size=8192
load-module module-native-protocol-unix
----8<----
_______________________________________________
SunRay-Users mailing list
SunRay-Users@filibeto.org
http://www.filibeto.org/mailman/listinfo/sunray-users