chiark / gitweb /
disobedience, playrtp: Have `playrtp' handle volume control.
[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.
9086a105 39.SH OPTIONS
b6579a61 40.TP
ba32e50c
RK
41.B \-\-api\fR, -\fB-A\fR \fIAPI\fR
42Select the playback API.
43The possibilities are, depending on platform and compilation options:
44.RS 8
b6579a61 45.TP
de0ef46e
RK
46.B pulseaudio
47PulseAudio.
48.TP
ba32e50c
RK
49.B alsa
50ALSA.
51Linux only.
b6579a61 52.TP
ba32e50c
RK
53.B oss
54OSS.
55.TP
56.B coreaudio
57Core Audio.
58OS X only.
59.TP
60.B command
61Pipe audio to a command.
62.RE
63.IP
64The default is the first of the possibilities above that is supported.
9086a105 65.TP
0d350ff0 66.B \-\-device \fIDEVICE\fR, \fB\-D \fIDEVICE\fR
c0c23a60 67Specifies the audio device to use.
f5fd9a6b
RK
68See
69.B "DEVICE NAMES"
70below for more information.
9086a105 71.TP
e979b844
RK
72.B \-\-command \fICOMMAND\fR, \fB-e \fICOMMAND\fR
73Instead of sending to a physical audio device, invoke \fICOMMAND\fR using the
74shell and write audio samples to its standard input.
75Currently the input will be 44100KHz 16-bit signed stereo samples.
76If \fICOMMAND\fR exits it is re-executed; any samples that had been written to
77the pipe but not processed by the previous instance will be lost.
78.IP
79.B \-\-device
c4e0bd8e 80is redundant with this option, but you might want to set
287ad384 81.BR \-\-pause\-mode .
e979b844
RK
82.IP
83As an example,
84.B "-e \(aqcat > dump\(aq"
85would log audio data to a file for later processing.
86You could convert it to another format with, for instance:
87.IP
88.B "sox -c2 -traw -r44100 -s -w dump dump.wav"
89.TP
287ad384
RK
90.B \-\-pause\-mode \fIMODE\fR, \fB-P \fIMODE
91Set the pause mode for \fB\-\-command\fR to either \fBsilence\fR (the default), in
92which pauses are represented by sending silent samples, or \fBsuspend\fR, in which
93writes to the subprocess are suspended, requiring it to infer a pause from flow
94control.
95.TP
0d350ff0 96.B \-\-config \fIPATH\fR, \fB\-C \fIPATH
c0c23a60
RK
97Set the configuration file.
98The default is
b6579a61
RK
99.IR pkgconfdir/config .
100.TP
0d350ff0 101.B \-\-socket \fIPATH\fR, \fB\-s \fIPATH
c0c23a60
RK
102Set the control socket.
103Normally this would not be used manually.
b6579a61 104.TP
0d350ff0 105.B \-\-help\fR, \fB\-h
f2a6202f
RK
106Display a usage message.
107.TP
0d350ff0 108.B \-\-version\fR, \fB\-V
f2a6202f
RK
109Display version number.
110.SS "Buffer Control Options"
111You shouldn't need to use these options.
7edc7e42 112Their effects are subject to change between version without warning.
0e72bf84 113You should consult the source code for details of their effects.
f2a6202f 114.TP
0d350ff0 115.B \-\-min \fIFRAMES\fR, \fB\-m \fIFRAMES\fR
c0c23a60 116Specifies the buffer low watermark in frames.
7edc7e42 117This also acts as the target buffer occupancy.
9086a105 118.TP
0d350ff0 119.B \-\-max \fIFRAMES\fR, \fB\-x \fIFRAMES\fR
c0c23a60
RK
120Specifies the maximum buffer size in frames.
121If there are this many frames in the buffer then reading from the
122network socket will be suspended.
0e72bf84 123The default is twice the \fB\-\-min\fR value.
9086a105 124.TP
0d350ff0 125.B \-\-rcvbuf \fIBYTES\fR, \fB\-R \fIBYTES\fR
c0c23a60 126Specifies socket receive buffer size.
0e72bf84
RK
127The default is not to change the buffer size, i.e. you get whatever the
128local operating system chooses.
c0c23a60 129The buffer size will not be reduced below the operating system's default.
7edc7e42
RK
130.TP
131.B \-\-monitor\fR, \fB\-M
132Periodically report how close to the buffer low watermark the buffer is.
133If you have trouble with poor playback quality, enable this option to see if
134the buffer is emptying out (or overfilling, though there are measures to
135prevent that from happening).
ba32e50c
RK
136.SS "Deprecated Options"
137These options may be removed in a future version.
138Use \fB\-\-api\fR instead.
139.TP
140.B \-\-alsa\fR, \fB\-a
141Use ALSA to play sound.
142Only available on Linux.
143.TP
144.B \-\-oss\fR, \fB\-o
145Use OSS to play sound.
146Only available on Linux and FreeBSD.
147.TP
148.B \-\-core\-audio\fR, \fB\-c
149Use Core Audio to play sound.
150Only available on Macs.
b6579a61
RK
151.SH "REMOTE CONTROL"
152The
0d350ff0 153.B \-\-socket
b6579a61 154option is used by Disobedience to control a background
0d350ff0 155.B disorder\-playrtp
c0c23a60
RK
156daemon.
157The socket will be created as a UNIX domain stream socket.
158When a connection is received a single line is read from it.
159The following commands are known:
b6579a61
RK
160.TP
161.B stop
162Causes
0d350ff0 163.B disorder\-playrtp
b6579a61
RK
164to terminate.
165.TP
166.B query
167Causes the string "running" to be sent back.
af21fb6b
MW
168.TP
169.B getvol
170Print the left and right volume levels,
171as two decimal integers between 0 and 100,
172separated by a space.
173.TP
174.BI "setvol " left " " right
175Set the left and right volume levels to the given decimal values,
176which should be between 0 and 100;
177echo back the new values as for
178.B getvol
179above.
b6579a61 180.PP
c0c23a60
RK
181Other commands are ignored.
182After the first command the connection is closed.
b6579a61
RK
183Only one connection at a time will be serviced.
184.PP
185This protocol is not guaranteed to be stable.
f5fd9a6b
RK
186.SH "DEVICE NAMES"
187.SS "Core Audio"
188On a Mac, the device name can either be the human-readable name of the desired
189output or its UID.
190To get a list of the human-readable names, visit System Preferences -> Sound;
191the Type column has the name you want.
192.PP
193For example, you might use "Built-in Output" for the built-in speaker
194or "Built-in Line Output" if you have connected external speakers.
195Remember to quote the name.
9086a105 196.SH "SEE ALSO"
b6579a61 197.BR disobedience (1),
9086a105
RK
198.BR disorder_config (5),
199.BR disorderd (8)
200.\" Local Variables:
201.\" mode:nroff
202.\" fill-column:79
203.\" End: