Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > main-testing-src > by-pkgid > 21c921d7e2a28ff702b2a7da09d43ed6 > files > 93

pulseaudio-0.9.21-26.0.4mdv2010.1.src.rpm

From 292c6a4d562cc9b3f8cd19974793e7eb86fb1c73 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <development@colin.guthr.ie>
Date: Tue, 5 Aug 2008 20:41:31 +0100
Subject: [PATCH 501/503] Some customisations to esdcompat in order to adhere to our way of enabling/disabling pulseaudio

---
 src/daemon/esdcompat.in |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/daemon/esdcompat.in b/src/daemon/esdcompat.in
index 6650180..872dbb2 100755
--- a/src/daemon/esdcompat.in
+++ b/src/daemon/esdcompat.in
@@ -24,7 +24,19 @@ fail() {
     exit 1
 }
 
-ARGS=" --log-target=syslog"
+# Start Mandriva customisation
+CONFIG=/etc/sound/profiles/current/profile.conf
+
+PULSE_ARGS=" --log-target=syslog"
+[ -r "$CONFIG" ] && . $CONFIG
+
+if [ "$SOUNDPROFILE" != "pulse" ]; then
+  echo "Not starting PulseAudio daemon due to sound profile." >&2
+  exit
+fi
+
+ARGS=" $PULSE_ARGS"
+# End Mandriva customisation
 
 while [ "$#" -gt "0" ]; do
 
@@ -74,10 +86,10 @@ EOF
             shift
             ARGS="$ARGS '-Lmodule-esound-compat-spawnfd fd=$1'"
             ;;
-        
-        -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)  
+
+        -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)
             # Ignore these commands
-            ;; 
+            ;;
 
         -d|-r|-as|-port|-bind)
             # Ignore these commands and their arguments
-- 
1.6.4