2006-05-23 14:42:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
#
|
|
|
|
|
# This file is part of polypaudio.
|
|
|
|
|
#
|
|
|
|
|
# polypaudio is free software; you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# polypaudio is distributed in the hope that it will be useful, but
|
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
# General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
# along with polypaudio; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
# USA.
|
|
|
|
|
|
2006-05-25 15:44:24 +00:00
|
|
|
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 ))
|
|
|
|
|
|
2006-05-23 14:42:23 +00:00
|
|
|
if [ x"$LD_PRELOAD" = x ] ; then
|
2006-05-25 13:56:14 +00:00
|
|
|
LD_PRELOAD="libpolypdsp.so"
|
2006-05-23 14:42:23 +00:00
|
|
|
else
|
2006-05-25 13:56:14 +00:00
|
|
|
LD_PRELOAD="$LD_PRELOAD libpolypdsp.so"
|
2006-05-23 14:42:23 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export LD_PRELOAD
|
|
|
|
|
|
|
|
|
|
exec "$@"
|