summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-05-25 15:44:24 +0000
committerPierre Ossman <ossman@cendio.se>2006-05-25 15:44:24 +0000
commitea7995b764ed716bbe17576ebdba3a435de095d3 (patch)
treec6e031c3ee27da683748beacc8727ceb1ae07f6c
parent0387b30994185a44e6df737c529ddda24325c671 (diff)
Fix padsp script so that it accepts parameters, setting relevant environment
variables as needed. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@970 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/utils/padsp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/utils/padsp b/src/utils/padsp
index 9f38cf3d..dc89bfb7 100644
--- a/src/utils/padsp
+++ b/src/utils/padsp
@@ -19,6 +19,57 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
+while getopts 'hs:n:m:MSDd' param ; do
+ case $param in
+ s)
+ POLYP_SERVER="$OPTARG"
+ export POLYP_SERVER
+ ;;
+ n)
+ PA_CLIENT_NAME="$OPTARG"
+ export PA_CLIENT_NAME
+ ;;
+ m)
+ PA_STREAM_NAME="$OPTARG"
+ export PA_STREAM_NAME
+ ;;
+ M)
+ PA_NO_MIXER=1
+ export PA_NO_MIXER
+ ;;
+ S)
+ PA_NO_SNDSTAT=1
+ export PA_NO_SNDSTAT
+ ;;
+ D)
+ PA_NO_DSP=1
+ export PA_NO_DSP
+ ;;
+ d)
+ PADSP_DEBUG=1
+ export PADSP_DEBUG
+ ;;
+ *)
+ echo "$0 - redirect OSS audio devices to Polypaudio"
+ echo " "
+ echo "$0 [options] application [arguments]"
+ echo " "
+ echo "options:"
+ echo " -h show brief help"
+ echo " -s <host>[:<port>] contact a specific Polypaudio server"
+ echo " -n <name> client name to report to the server"
+ echo " -m <name> stream name to report to the server"
+ echo " -M disable /dev/mixer emulation"
+ echo " -S disable /dev/sndstat emulation"
+ echo " -D disable /dev/dsp emulation"
+ echo " -d enable debug output"
+ exit 0
+ ;;
+ esac
+done
+
+shift $(( $OPTIND - 1 ))
+
if [ x"$LD_PRELOAD" = x ] ; then
LD_PRELOAD="libpolypdsp.so"
else