Add a missing pa_xfree.
[pulseaudio.git] / src / daemon / esdcompat.in
blob942389d2dfbdb08a43d759ffd5ee21e9c223bea2
1 #!/bin/sh
3 # $Id$
5 # This file is part of PulseAudio.
7 # PulseAudio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # PulseAudio is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with PulseAudio; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 # USA.
22 VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
24 fail() {
25 echo "ERROR: $1"
26 exit 1
29 ARGS=" --log-target=syslog"
31 while [ "$#" -gt "0" ]; do
33 case "$1" in
34 "")
37 -v|--version)
38 echo "$VERSION_STRING"
39 exit 0
42 -h|--help)
43 cat <<EOF
44 $VERSION_STRING
46 Usage: $0 [options]
48 -v --version print version information
49 -h --help show this help
51 Ignored directives:
53 -tcp use tcp/ip sockets in addition to unix domain
54 -promiscuous don't require authentication
55 -d DEVICE force esd to use sound device DEVICE
56 -b run server in 8 bit sound mode
57 -r RATE run server at sample rate of RATE
58 -as SECS free audio device after SECS of inactivity
59 -unix use unix domain sockets instead of tcp/ip
60 -public make tcp/ip access public (other than localhost)
61 -terminate terminate esd daemone after last client exits
62 -nobeeps disable startup beeps
63 -trust start esd even if use of /tmp/.esd can be insecure
64 -port PORT listen for connections at PORT (only for tcp/ip)
65 -bind ADDRESS binds to ADDRESS (only for tcp/ip)
66 EOF
67 exit 0
70 -spawnpid)
71 shift
72 ARGS="$ARGS '-Lmodule-esound-compat-spawnpid pid=$1'"
75 -spawnfd)
76 shift
77 ARGS="$ARGS '-Lmodule-esound-compat-spawnfd fd=$1'"
80 -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)
81 # Ignore these commands
82 ;;
84 -d|-r|-as|-port|-bind)
85 # Ignore these commands and their arguments
86 shift
91 fail "Unknown command: $1"
93 esac
95 shift
96 done
98 eval "exec '@PA_BINARY@'$ARGS"