Accepting request 23382 from home:lnussel:branches:openSUSE:Factory
Copy from home:lnussel:branches:openSUSE:Factory/pulseaudio via accept of submit request 23382 revision 2. Request was accepted with message: reviewed ok. OBS-URL: https://build.opensuse.org/request/show/23382 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=26
This commit is contained in:
parent
1a0e4ba1e9
commit
1f50d2c672
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de
|
||||
|
||||
- clean up and fix setup-pulseaudio to not corrupt /etc/environment
|
||||
(bnc#547384)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 6 19:10:19 UTC 2009 - sreeves@novell.com
|
||||
|
||||
|
@ -5,12 +5,13 @@ LIST_OF_OSS_APPS="aumix sox"
|
||||
show_help() {
|
||||
echo "setup-pulseaudio [ --enable | --disable | --status ]"
|
||||
echo ""
|
||||
echo "Sets up PulseAudio configuration for all sound-based applications"
|
||||
echo "Modifies configuration files of some applications for PulseAudio"
|
||||
echo " --enable Enables PulseAudio"
|
||||
echo " --disable Disables PulseAudio"
|
||||
echo " --status Shows activation state (disabled or enabled) for PulseAudio"
|
||||
echo ""
|
||||
echo "You need to be root for this command to succeed"
|
||||
echo "You may need to re-login for changes to take effect"
|
||||
exit
|
||||
}
|
||||
|
||||
@ -48,27 +49,28 @@ enable_libao() {
|
||||
|
||||
enable_mplayer() {
|
||||
echo "Enabling PulseAudio for mplayer..."
|
||||
# Maybe it would be better to just add a alias mplayer=mplayer -ao pulse to /etc/environment?
|
||||
if test -f /etc/mplayer/mplayer.conf; then
|
||||
if grep "ao=pulse" /etc/mplayer/mplayer.conf; then
|
||||
echo "Default driver is pulse already in /etc/mplayer/mplayer.conf"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
if grep -q '^ao=' /etc/mplayer/mplayer.conf; then
|
||||
perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/pulse/client.conf
|
||||
else
|
||||
echo "ao=pulse" >> /etc/mplayer/mplayer.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf
|
||||
}
|
||||
|
||||
enable_openal() {
|
||||
echo "Enabling PulseAudio for openal..."
|
||||
# FIXME: openal uses ~/.openalrc
|
||||
echo ""
|
||||
# nothing to do here. openal-soft is patched to prefer pulse but
|
||||
# it won't autostart the daemon.
|
||||
return 0
|
||||
}
|
||||
|
||||
enable_oss() {
|
||||
# this is broken. /etc/environment must only contain environment
|
||||
# variables. It's not a shell script
|
||||
return 0
|
||||
|
||||
echo "Enabling PulseAudio for OSS..."
|
||||
for app in $LIST_OF_OSS_APPS; do
|
||||
if grep "alias $app=padsp $app" /etc/environment; then
|
||||
@ -90,6 +92,10 @@ enable_sdl() {
|
||||
}
|
||||
|
||||
enable_timidity() {
|
||||
# this is broken. /etc/environment must only contain environment
|
||||
# variables. It's not a shell script
|
||||
return 0
|
||||
|
||||
echo "Enabling PulseAudio for Timidity..."
|
||||
# Use esound output for timidity
|
||||
if grep "alias timidity=timidity -Oe" /etc/environment; then
|
||||
@ -100,9 +106,9 @@ enable_timidity() {
|
||||
}
|
||||
|
||||
enable_xine() {
|
||||
echo "Enabling PulseAudio for Xine..."
|
||||
#echo "Enabling PulseAudio for Xine..."
|
||||
# FIXME: xine uses $HOME/.xine/config
|
||||
echo ""
|
||||
return 0
|
||||
}
|
||||
|
||||
enable_autospawn() {
|
||||
@ -120,27 +126,30 @@ disable_alsa() {
|
||||
}
|
||||
|
||||
disable_libao() {
|
||||
echo "Disabling PulseAudio for libao..."
|
||||
if test -f /etc/libao.conf; then
|
||||
echo "Disabling PulseAudio for libao..."
|
||||
perl -pi -e "s|default_driver=pulse||g;" /etc/libao.conf
|
||||
fi
|
||||
}
|
||||
|
||||
disable_mplayer() {
|
||||
echo "Disabling PulseAudio for mplayer..."
|
||||
if test -f /etc/mplayer/mplayer.conf; then
|
||||
echo "Disabling PulseAudio for mplayer..."
|
||||
perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf
|
||||
fi
|
||||
}
|
||||
|
||||
disable_openal() {
|
||||
echo "Disabling PulseAudio for openal..."
|
||||
# FIXME: openal uses ~/.openalrc
|
||||
echo ""
|
||||
# nothing to do here. openal-soft is patched to prefer pulse but
|
||||
# it won't autostart the daemon.
|
||||
return 0
|
||||
}
|
||||
|
||||
disable_oss() {
|
||||
echo "Disabling PulseAudio for OSS..."
|
||||
# this is broken. /etc/environment must only contain environment
|
||||
# variables. It's not a shell script
|
||||
return 0
|
||||
|
||||
for app in $LIST_OF_OSS_APPS; do
|
||||
perl -pi -e "s|alias $app=padsp $app||g;" /etc/environment
|
||||
done
|
||||
@ -154,14 +163,18 @@ disable_sdl() {
|
||||
}
|
||||
|
||||
disable_timidity() {
|
||||
# this is broken. /etc/environment must only contain environment
|
||||
# variables. It's not a shell script
|
||||
return 0
|
||||
|
||||
echo "Disabling PulseAudio for Timidity..."
|
||||
perl -pi -e "s|alias timidity=timidity -Oe||g;" /etc/environment
|
||||
}
|
||||
|
||||
disable_xine() {
|
||||
echo "Disabling PulseAudio for Xine..."
|
||||
#echo "Disabling PulseAudio for Xine..."
|
||||
# FIXME: xine uses $HOME/.xine/config
|
||||
echo ""
|
||||
return 0
|
||||
}
|
||||
|
||||
disable_autospawn() {
|
||||
|
Loading…
Reference in New Issue
Block a user