1 <?xml version=
"1.0" encoding=
"iso-8859-1"?> <!-- -*-html-helper-*- -->
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>polypaudio: Simple Command Line Language
</title>
6 <link rel=
"stylesheet" type=
"text/css" href=
"style.css" />
10 <h1>Simple Command Line Language
</h1>
12 <p><tt>polypaudio
</tt> provides a simple command line language used by
13 configuration scripts as well as the modules
<tt>module-cli
</tt>
14 and
<tt>module-cli-protocol-{unix,tcp}
</tt>. Empty lines and lines
15 beginning with a hashmark (
<tt>#
</tt>) are silently ignored. Several
16 commands are supported:
</p>
18 <h2>Miscellaneous Commands
</h2>
20 <h3><tt>help
</tt></h3>
22 <p>Show a quick help on the commands available.
</p>
24 <h3><tt>exit
</tt></h3>
26 <p>Terminate the daemon. If you want to terminate a CLI connection
27 (
"log out") you might want to use
<tt>C-d
</tt>.
</p>
29 <h2>Status Commands
</h2>
31 <h3><tt>modules
</tt></h3>
33 <p>Show all currently loaded modules with their arguments.
</p>
35 <h3><tt>sinks/sources
</tt></h3>
37 <p>Show all currently registered sinks (resp. sources).
</p>
39 <h3><tt>clients
</tt></h3>
41 <p>Show all currently active clients.
</p>
43 <h3><tt>sink_inputs/sink_outputs
</tt></h3>
45 <p>Show all currently active inputs to sinks (resp. outputs of sources).
</p>
47 <h3><tt>stat
</tt></h3>
49 <p>Show some simple statistics about the allocated memory blocks and
50 the space used by them.
</p>
52 <h3><tt>info
</tt></h3>
54 <p>A combination of all status commands described above.
<tt>ls
</tt>
55 and
<tt>list
</tt> are synonyms for
<tt>info
</tt>.
</p>
57 <h2>Module Management
</h2>
59 <h3><tt>load
</tt></h3>
61 <p>Load a module specified by its name and arguments. For most modules
62 it is OK to be loaded more than once.
</p>
64 <h3><tt>unload
</tt></h3>
66 <p>Unload a module specified by its index in the module list as
67 returned by
<tt>modules
</tt>.
</p>
69 <h2>Configuration Commands
</h2>
71 <h3><tt>sink_volume
</tt></h3>
73 <p>Set the volume of the specified sink. You may specify the sink either
74 by its index in the sink list or by its name. The volume should be an
75 integer value greater or equal than
0 (= muted). Volume
256
76 (
<tt>0x100</tt>) is normal volume, values greater than this amplify
77 the audio signal with clipping.
</p>
79 <h3><tt>sink_input_volume
</tt></h3>
81 <p>Set the volume of a sink input specified by its index the the sink
82 input list. The same volume rules apply as with
<tt>sink_volume
</tt>.
</p>
84 <h3><tt>sink_default/source_default
</tt></h3>
86 <p>Make a sink (resp. source) the default. You may specify the sink
87 (resp. ssource) by its index in the sink (resp. source) list or by its
90 <h2>Killing clients/streams
</h2>
92 <h3><tt>kill_client
</tt></h3>
94 <p>Remove a client forcibly from the server. There is no protection that
95 the client reconnects immediately.
</p>
97 <h3><tt>kill_sink_input/kill_source_output
</tt></h3>
99 <p>Remove a sink input (resp. source output) forcibly from the
100 server. This will not remove the owning client or any other streams
101 opened by the client from the server.
</p>
103 <h2>Meta Commands
</h2>
105 <p>In addition the the commands described above there a few meta
106 directives supported by the command line interpreter:
</p>
108 <h3><tt>.include
</tt></h3>
110 <p>Executes the commands from the specified script file.
</p>
112 <h3><tt>.fail/.nofail
</tt></h3>
114 <p>Enable (resp. disable) that following failing commands will cancel
115 the execution of the current script file. This is a ignored when used
116 on the interactive command line.
</p>
118 <h3><tt>.verbose/.noverbose
</tt></h3>
119 <p>Enable (resp. disable) extra verbosity.
</p>
121 <h2>Example Configuration Script
</h2>
124 #!/usr/bin/polaudio -F
127 load module-alsa-sink device=plughw:
0,
0 rate=
48000
128 load module-alsa-source device=hw:
1,
0
130 # Load several protocols
131 load module-esound-protocol-tcp
132 load module-simple-protocol-tcp
133 load module-native-protocol-unix
134 load module-cli-protocol-unix
136 # Load the CLI module (This is similar to passing
"-C" on the command line of polypaudio)
141 # Make some devices default
142 sink_default alsa_output
143 source_default alsa_input
145 # Use digital amplification
146 sink_volume alsa_output
0x200
150 <address class=
"grey">Lennart Poettering
<@PACKAGE_BUGREPORT@
>, July
2004</address>
151 <div class=
"grey"><i>$Id$
</i></div>