clients/playrtp.c: Improve message reporting a unicast stream request.
[disorder] / doc / disorder-playrtp.1.in
CommitLineData
9086a105 1.\"
ba32e50c 2.\" Copyright (C) 2007-2009, 2013 Richard Kettlewell
9086a105 3.\"
e7eb3a27 4.\" This program is free software: you can redistribute it and/or modify
9086a105 5.\" it under the terms of the GNU General Public License as published by
e7eb3a27 6.\" the Free Software Foundation, either version 3 of the License, or
9086a105 7.\" (at your option) any later version.
e7eb3a27
RK
8.\"
9.\" This program is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
9086a105 14.\" You should have received a copy of the GNU General Public License
e7eb3a27 15.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
9086a105
RK
16.\"
17.TH disorder-playrtp 1
18.SH NAME
19disorder-playrtp \- play DisOrder network broadcasts
20.SH SYNOPSIS
0d350ff0 21.B disorder\-playrtp
9086a105 22.RI [ OPTIONS ]
0d350ff0 23.RB [ \-\- ]
c897bb65 24.RI [[ ADDRESS ]
18e5cbdc 25.IR PORT ]
9086a105 26.SH DESCRIPTION
0d350ff0 27\fBdisorder\-playrtp\fR plays a network broadcast sent from the specified
9086a105 28address.
f2a6202f 29.PP
c897bb65 30If neither an address nor port are specified then the local DisOrder
6fba990c
RK
31configuration is consulted to find the server and the server is asked where the
32RTP stream is.
33.PP
34If just a port is specified then the RTP stream is assumed to be unicast or
35broadcast to that port.
36.PP
c897bb65
RK
37If an address and a port are specified then the RTP stream is assumed to be
38multicast to that group address and port.
169f1a6f
MW
39.PP
40Alternatively, the
41.I ADDRESS
42can start with a
43.RB ` \- ',
44in which case
45.B disorder-playrtp
46will request a dedicated unicast stream from the server. The
47.RB ` \- '
48may be followed by an optional port, or address/port pair, which will be the
49local address/port to bind to and announce to the server.
9086a105 50.SH OPTIONS
b6579a61 51.TP
ba32e50c
RK
52.B \-\-api\fR, -\fB-A\fR \fIAPI\fR
53Select the playback API.
54The possibilities are, depending on platform and compilation options:
55.RS 8
b6579a61 56.TP
de0ef46e
RK
57.B pulseaudio
58PulseAudio.
59.TP
ba32e50c
RK
60.B alsa
61ALSA.
62Linux only.
b6579a61 63.TP
ba32e50c
RK
64.B oss
65OSS.
66.TP
67.B coreaudio
68Core Audio.
69OS X only.
70.TP
71.B command
72Pipe audio to a command.
73.RE
74.IP
75The default is the first of the possibilities above that is supported.
9086a105 76.TP
0d350ff0 77.B \-\-device \fIDEVICE\fR, \fB\-D \fIDEVICE\fR
c0c23a60 78Specifies the audio device to use.
f5fd9a6b
RK
79See
80.B "DEVICE NAMES"
81below for more information.
9086a105 82.TP
e979b844
RK
83.B \-\-command \fICOMMAND\fR, \fB-e \fICOMMAND\fR
84Instead of sending to a physical audio device, invoke \fICOMMAND\fR using the
85shell and write audio samples to its standard input.
86Currently the input will be 44100KHz 16-bit signed stereo samples.
87If \fICOMMAND\fR exits it is re-executed; any samples that had been written to
88the pipe but not processed by the previous instance will be lost.
89.IP
90.B \-\-device
c4e0bd8e 91is redundant with this option, but you might want to set
287ad384 92.BR \-\-pause\-mode .
e979b844
RK
93.IP
94As an example,
95.B "-e \(aqcat > dump\(aq"
96would log audio data to a file for later processing.
97You could convert it to another format with, for instance:
98.IP
99.B "sox -c2 -traw -r44100 -s -w dump dump.wav"
100.TP
287ad384
RK
101.B \-\-pause\-mode \fIMODE\fR, \fB-P \fIMODE
102Set the pause mode for \fB\-\-command\fR to either \fBsilence\fR (the default), in
103which pauses are represented by sending silent samples, or \fBsuspend\fR, in which
104writes to the subprocess are suspended, requiring it to infer a pause from flow
105control.
106.TP
0d350ff0 107.B \-\-config \fIPATH\fR, \fB\-C \fIPATH
c0c23a60
RK
108Set the configuration file.
109The default is
b6579a61
RK
110.IR pkgconfdir/config .
111.TP
0d350ff0 112.B \-\-socket \fIPATH\fR, \fB\-s \fIPATH
c0c23a60
RK
113Set the control socket.
114Normally this would not be used manually.
b6579a61 115.TP
0d350ff0 116.B \-\-help\fR, \fB\-h
f2a6202f
RK
117Display a usage message.
118.TP
0d350ff0 119.B \-\-version\fR, \fB\-V
f2a6202f
RK
120Display version number.
121.SS "Buffer Control Options"
122You shouldn't need to use these options.
7edc7e42 123Their effects are subject to change between version without warning.
0e72bf84 124You should consult the source code for details of their effects.
f2a6202f 125.TP
0d350ff0 126.B \-\-min \fIFRAMES\fR, \fB\-m \fIFRAMES\fR
c0c23a60 127Specifies the buffer low watermark in frames.
7edc7e42 128This also acts as the target buffer occupancy.
9086a105 129.TP
0d350ff0 130.B \-\-max \fIFRAMES\fR, \fB\-x \fIFRAMES\fR
c0c23a60
RK
131Specifies the maximum buffer size in frames.
132If there are this many frames in the buffer then reading from the
133network socket will be suspended.
0e72bf84 134The default is twice the \fB\-\-min\fR value.
9086a105 135.TP
0d350ff0 136.B \-\-rcvbuf \fIBYTES\fR, \fB\-R \fIBYTES\fR
c0c23a60 137Specifies socket receive buffer size.
0e72bf84
RK
138The default is not to change the buffer size, i.e. you get whatever the
139local operating system chooses.
c0c23a60 140The buffer size will not be reduced below the operating system's default.
7edc7e42
RK
141.TP
142.B \-\-monitor\fR, \fB\-M
143Periodically report how close to the buffer low watermark the buffer is.
144If you have trouble with poor playback quality, enable this option to see if
145the buffer is emptying out (or overfilling, though there are measures to
146prevent that from happening).
ba32e50c
RK
147.SS "Deprecated Options"
148These options may be removed in a future version.
149Use \fB\-\-api\fR instead.
150.TP
151.B \-\-alsa\fR, \fB\-a
152Use ALSA to play sound.
153Only available on Linux.
154.TP
155.B \-\-oss\fR, \fB\-o
156Use OSS to play sound.
157Only available on Linux and FreeBSD.
158.TP
159.B \-\-core\-audio\fR, \fB\-c
160Use Core Audio to play sound.
161Only available on Macs.
b6579a61
RK
162.SH "REMOTE CONTROL"
163The
0d350ff0 164.B \-\-socket
b6579a61 165option is used by Disobedience to control a background
0d350ff0 166.B disorder\-playrtp
c0c23a60
RK
167daemon.
168The socket will be created as a UNIX domain stream socket.
169When a connection is received a single line is read from it.
170The following commands are known:
b6579a61
RK
171.TP
172.B stop
173Causes
0d350ff0 174.B disorder\-playrtp
b6579a61
RK
175to terminate.
176.TP
177.B query
178Causes the string "running" to be sent back.
af21fb6b
MW
179.TP
180.B getvol
181Print the left and right volume levels,
182as two decimal integers between 0 and 100,
183separated by a space.
184.TP
185.BI "setvol " left " " right
186Set the left and right volume levels to the given decimal values,
187which should be between 0 and 100;
188echo back the new values as for
189.B getvol
190above.
b6579a61 191.PP
c0c23a60
RK
192Other commands are ignored.
193After the first command the connection is closed.
b6579a61
RK
194Only one connection at a time will be serviced.
195.PP
196This protocol is not guaranteed to be stable.
f5fd9a6b
RK
197.SH "DEVICE NAMES"
198.SS "Core Audio"
199On a Mac, the device name can either be the human-readable name of the desired
200output or its UID.
201To get a list of the human-readable names, visit System Preferences -> Sound;
202the Type column has the name you want.
203.PP
204For example, you might use "Built-in Output" for the built-in speaker
205or "Built-in Line Output" if you have connected external speakers.
206Remember to quote the name.
9086a105 207.SH "SEE ALSO"
b6579a61 208.BR disobedience (1),
9086a105
RK
209.BR disorder_config (5),
210.BR disorderd (8)
211.\" Local Variables:
212.\" mode:nroff
213.\" fill-column:79
214.\" End: