Debian Codegraph @

doc/RPLAY.texi

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename RPLAY.info
4 @settitle The RPLAY Protocol
5 @iftex
6 @finalout
7 @end iftex
8 @setchapternewpage odd
9 @c %**end of header
10
11 @ifinfo
12
13 This file documents RPLAY protocol.
14
15 Copyright (C) 1995 Mark Boyns
16
17 Permission is granted to make and distribute verbatim copies of
18 this manual provided the copyright notice and this permission notice
19 are preserved on all copies.
20
21 @ignore
22 Permission is granted to process this file through Tex and print the
23 results, provided the printed document carries copying permission
24 notice identical to this one except for the removal of this paragraph
25 (this paragraph not being relevant to the printed manual).
26
27 @end ignore
28 Permission is granted to copy and distribute modified versions of this
29 manual under the conditions for verbatim copying, provided also that the
30 entire resulting derived work is distributed under the terms of a
31 permission notice identical to this one.
32
33 Permission is granted to copy and distribute translations of this manual
34 into another language, under the above conditions for modified versions.
35 @end ifinfo
36
37 @titlepage
38 @title The RPLAY Protocol
39
40 @author by Mark Boyns
41 @page
42 @vskip 0pt plus 1filll
43 Copyright @copyright{} 1995 Mark Boyns
44
45 Permission is granted to make and distribute verbatim copies of
46 this manual provided the copyright notice and this permission notice
47 are preserved on all copies.
48
49 Permission is granted to copy and distribute modified versions of this
50 manual under the conditions for verbatim copying, provided that the
51 entire resulting derived work is distributed under the terms of a
52 permission notice identical to this one.
53
54 Permission is granted to copy and distribute translations of this manual
55 into another language, under the above conditions for modified versions.
56
57 @end titlepage
58 @page
59
60 @node Top, Overview, (dir), (dir)
61 @top RPLAY
62
63 @ifinfo
64 This file documents the RPLAY protocol.
65 @end ifinfo
66
67 @menu
68 * Overview:: Prelimary information
69 * Commands:: List of supported commands.
70 * Attributes:: List of supported command attributes.
71 * Packet description:: What a RPLAY packet looks like.
72 @end menu
73
74 @node Overview, Commands, Top, Top
75 @chapter Overview
76
77 The @code{RPLAY} protocol uses simple binary UDP packets to control the
78 audio server. Communication between the client and server is one-way -
79 packets are sent to the server and the server @emph{never} replies.
80
81 @node Commands, Attributes, Overview, Top
82 @chapter Commands
83
84 @code{RPLAY} is based on a small set of commands which are used to
85 control the audio server. These commands are:
86
87 @table @code
88 @item RPLAY_PLAY
89 Play a sound.
90
91 @item RPLAY_STOP
92 Stop a sound.
93
94 @item RPLAY_PAUSE
95 Pause a sound.
96
97 @item RPLAY_CONTINUE
98 Continue a sound.
99
100 @item RPLAY_PING
101 Wakeup the server. This command was introduced to solve a problem with
102 TCP clients that are trying to connect to a server that's started by
103 inetd using a UDP port.
104
105 @item RPLAY_RESET
106 Force the server to reset itself. A reset normally involves re-reading
107 all database files, closing all connections, and stops all playing
108 sounds.
109
110 @item RPLAY_DONE
111 Force a sound to be done. In most cases this is the same as
112 @samp{RPLAY_STOP}.
113
114 @end table
115
116 @node Attributes, Packet description, Commands, Top
117 @chapter Attributes
118
119 Most @code{RPLAY} commands use attributes to modify their behaviour.
120 These attributes are:
121
122 @table @code
123 @item RPLAY_COUNT
124 The number of times to play a sound. The value should be between 0 and
125 255 inclusive. A value of 0 will play the sound forever. The default
126 is RPLAY_DEFAULT_COUNT.
127
128 @item RPLAY_LIST_COUNT
129 The number of times to play a sound list. The value should be between 0
130 and 255 inclusive. A value of 0 will play the sound forever. The
131 default is RPLAY_DEFAULT_LIST_COUNT.
132
133 @item RPLAY_PRIORITY
134 The priority of a sound. The value should be between RPLAY_MIN_PRIORITY
135 (0) and RPLAY_MAX_PRIORITY (255). The default is RPLAY_DEFAULT_PRIORITY (0).
136
137 @item RPLAY_RPTP_FROM_SENDER
138 Tell the rplay server that it should try to contact the sender's RPTP
139 server to obtain RPLAY_SOUND. This is only used if the rplay
140 server does not already have the sound.
141
142 @item RPLAY_RPTP_SERVER
143 Tell the rplay server which RPTP server should be used to try and obtain
144 RPLAY_SOUND. This is only used if the rplay server does not already have
145 the sound and RPLAY_RPTP_SEARCH is true.
146
147 @item RPLAY_RPTP_SEARCH
148 Tell the rplay server whether or not it should search for RPLAY_SOUND.
149
150 @item RPLAY_RPTP_SERVER_PORT
151 Tell the rplay server which port should be used to contact the RPTP
152 server when using RPLAY_RPTP_SEARCH.
153
154 @item RPLAY_SAMPLE_RATE
155 Play a sound at a specified sample rate. A value of 0 will use the
156 sound's default sample rate. The default value is
157 RPLAY_DEFAULT_SAMPLE_RATE (0).
158
159 @item RPLAY_SOUND
160 The name of a sound.
161
162 @item RPLAY_VOLUME
163 The volume of a sound. The value should be between RPLAY_MIN_VOLUME (0)
164 and RPLAY_MAX_VOLUME (255). The default is RPLAY_DEFAULT_VOLUME (127).
165
166 @end table
167
168 @node Packet description, , Attributes, Top
169 @chapter Packet description
170
171 RPLAY packets always begin with a RPLAY_ID byte followed by a RPLAY
172 command. (@pxref{Commands}) The remaining contents is a list of
173 attributes (@pxref{Attributes}) and their corresponding values.
174 The packet is terminated with the RPLAY_NULL attribute.
175
176 A packet will never contain an attribute that is set to a default value.
177 This feature allows new attributes to be added without breaking old
178 servers and it also makes packets very small.
179
180 @noindent
181 Here's an example packet:
182
183 @example
184 RPLAY_ID RPLAY_PLAY RPLAY_SOUND RPLAY_NULL
185 30 1 5 bogus.au 0
186 @end example
187
188 @noindent
189 Note that numbers in RPLAY packets are stored in one byte and strings
190 are always null-terminated. The above example in hexadecimal would be:
191
192 @example
193 1E 01 05 62 6f 67 75 73 2E 61 75 00 00
194 @end example
195
196 @summarycontents
197 @contents
198
199 @bye
200