| 1 |
This is Info file RPTP.info, produced by Makeinfo-1.63 from the input |
| 2 |
file RPTP.texi. |
| 3 |
|
| 4 |
This file documents RPTP protocol. |
| 5 |
|
| 6 |
Copyright (C) 1995 Mark Boyns |
| 7 |
|
| 8 |
Permission is granted to make and distribute verbatim copies of this |
| 9 |
manual provided the copyright notice and this permission notice are |
| 10 |
preserved on all copies. |
| 11 |
|
| 12 |
Permission is granted to copy and distribute modified versions of |
| 13 |
this manual under the conditions for verbatim copying, provided also |
| 14 |
that the entire resulting derived work is distributed under the terms |
| 15 |
of a permission notice identical to this one. |
| 16 |
|
| 17 |
Permission is granted to copy and distribute translations of this |
| 18 |
manual into another language, under the above conditions for modified |
| 19 |
versions. |
| 20 |
|
| 21 |
|
| 22 |
File: RPTP.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) |
| 23 |
|
| 24 |
RPTP |
| 25 |
**** |
| 26 |
|
| 27 |
This document describes the Remote Play Transfer Protocol, otherwise |
| 28 |
known as RPTP. |
| 29 |
|
| 30 |
* Menu: |
| 31 |
|
| 32 |
* Overview:: |
| 33 |
* Attributes:: |
| 34 |
* Events:: |
| 35 |
* Event Notification:: |
| 36 |
* Commands:: |
| 37 |
* Connecting:: |
| 38 |
* Timeouts:: |
| 39 |
* Attribute Index:: Attribute Index. |
| 40 |
* Event Index:: Event Index. |
| 41 |
* Command Index:: Command Index. |
| 42 |
|
| 43 |
|
| 44 |
File: RPTP.info, Node: Overview, Next: Attributes, Prev: Top, Up: Top |
| 45 |
|
| 46 |
Overview |
| 47 |
******** |
| 48 |
|
| 49 |
RPTP is a command-based TCP interface to control the rplay audio |
| 50 |
server. The protocol is simple, the client sends a command and the |
| 51 |
server sends back a result. |
| 52 |
|
| 53 |
Name-value pairs are used in both commands and results. A name-value |
| 54 |
pair is of the form `name=value' where `name' is an attribute name and |
| 55 |
`value' is the value of the attribute. Multiple name-value pairs on a |
| 56 |
line are separated by a spaces and/or tabs. When `value' contains |
| 57 |
spaces or tabs it must be quoted as `name="value"'. |
| 58 |
|
| 59 |
Commands consist of a command name followed by command attributes. |
| 60 |
An example would be `play volume=50 sound=bogus.au'. In this case, the |
| 61 |
command is `play' and its attributes are `volume=50' and |
| 62 |
`sound=bogus.au'. |
| 63 |
|
| 64 |
The server responds to each command with a result line. Each result |
| 65 |
line begins with a special character which is used to determine command |
| 66 |
success or failure. The following characaters are defined: |
| 67 |
|
| 68 |
`+' |
| 69 |
Successful command execution (RPTP_OK) |
| 70 |
|
| 71 |
`-' |
| 72 |
Error (RPTP_ERROR) |
| 73 |
|
| 74 |
`!' |
| 75 |
Connection timeout (RPTP_TIMEOUT) |
| 76 |
|
| 77 |
`@' |
| 78 |
Event notification (RPTP_NOTIFY) |
| 79 |
|
| 80 |
After this first character, the result line contains name-value |
| 81 |
pairs. For example, if the server wanted to report an error to the |
| 82 |
client, the result line could be: `-error="sorry, you can't do that"'. |
| 83 |
|
| 84 |
There is one RPTP command that returns more than one line. This is |
| 85 |
the list command which returns a normal result line followed by zero or |
| 86 |
more lines terminated by a line containing only a `.'. These additional |
| 87 |
lines do not begin with any special characters. Future versions may |
| 88 |
include an attribute that clients can use to determine the number of |
| 89 |
lines that will be returned. |
| 90 |
|
| 91 |
All RPTP lines are terminated using a carriage return `\r' (ASCII 13) |
| 92 |
followed by a newline `\n' (ASCII 10). |
| 93 |
|
| 94 |
|
| 95 |
File: RPTP.info, Node: Attributes, Next: Events, Prev: Overview, Up: Top |
| 96 |
|
| 97 |
Attributes |
| 98 |
********** |
| 99 |
|
| 100 |
The following is a list of attributes that can be found within the |
| 101 |
name-value lists. |
| 102 |
|
| 103 |
- Attribute: access |
| 104 |
A set of characters defining access permissions. These characters |
| 105 |
can include `r' - read access, `w' - write access, and `x' - |
| 106 |
execute access. |
| 107 |
|
| 108 |
Example: |
| 109 |
access=rwx |
| 110 |
|
| 111 |
- Attribute: application |
| 112 |
The name of an rplay application. |
| 113 |
|
| 114 |
Example: |
| 115 |
application="rptp 3.2.0a7" |
| 116 |
|
| 117 |
- Attribute: audio-bits |
| 118 |
The number of bits in an audio sample or audio device. The value |
| 119 |
can be 8, 16, and maybe 24 and 32 in the future. |
| 120 |
|
| 121 |
Example: |
| 122 |
audio-bits=16 |
| 123 |
|
| 124 |
- Attribute: audio-bufsize |
| 125 |
The size in bytes of the audio buffer. |
| 126 |
|
| 127 |
Example: |
| 128 |
audio-bufsize=1600 |
| 129 |
|
| 130 |
- Attribute: audio-byte-order |
| 131 |
The byte order of the audio data. The value can be either |
| 132 |
big-endian or little-endian. |
| 133 |
|
| 134 |
Example: |
| 135 |
audio-byte-order=big-endian |
| 136 |
|
| 137 |
- Attribute: audio-channels |
| 138 |
The number of channels in an audio sample or audio device. The |
| 139 |
value can be 1 or 2. |
| 140 |
|
| 141 |
Example: |
| 142 |
audio-channels=2 |
| 143 |
|
| 144 |
- Attribute: audio-device |
| 145 |
The name of an audio device. The value can be any audio device |
| 146 |
name. |
| 147 |
|
| 148 |
Example: |
| 149 |
audio-device=/dev/audio |
| 150 |
|
| 151 |
- Attribute: audio-format |
| 152 |
The format of an audio sample or audio device. The value can be |
| 153 |
ulaw, linear-8, ulinear-8, linear-16, or ulinear-16. (linear = |
| 154 |
signed, ulinear = unsigned) |
| 155 |
|
| 156 |
Example: |
| 157 |
audio-format=ulaw |
| 158 |
|
| 159 |
- Attribute: audio-offset |
| 160 |
Number of bytes to skip from the current position in the audio |
| 161 |
data. |
| 162 |
|
| 163 |
Example: |
| 164 |
audio-offset=32. |
| 165 |
|
| 166 |
- Attribute: audio-port |
| 167 |
Audio output ports. The value can be speaker, headphone, and |
| 168 |
lineout. Multiple ports should be separated using a comma. |
| 169 |
|
| 170 |
Example: |
| 171 |
audio-port=headphone,speaker |
| 172 |
|
| 173 |
- Attribute: audio-rate |
| 174 |
The rate at which audio buffers are being written. |
| 175 |
|
| 176 |
Example: |
| 177 |
audio-rate=10 |
| 178 |
|
| 179 |
- Attribute: audio-sample-rate |
| 180 |
The sample rate of an audio sample or audio device. |
| 181 |
|
| 182 |
Example: |
| 183 |
audio-sample-rate=11025 |
| 184 |
|
| 185 |
- Attribute: audio-volume |
| 186 |
The volume of an audio sample or audio device. The value can be |
| 187 |
an integer between 0 and 255. |
| 188 |
|
| 189 |
Example: |
| 190 |
audio-volume=120 |
| 191 |
|
| 192 |
- Attribute: bits |
| 193 |
See audio-bits. |
| 194 |
|
| 195 |
- Attribute: channels |
| 196 |
See audio-channels. |
| 197 |
|
| 198 |
- Attribute: count |
| 199 |
The number of times a sound will be played or a generic number of |
| 200 |
items. |
| 201 |
|
| 202 |
Example: |
| 203 |
count=5 |
| 204 |
|
| 205 |
- Attribute: event |
| 206 |
The name of an RPTP event. |
| 207 |
|
| 208 |
Example: |
| 209 |
event=play |
| 210 |
|
| 211 |
- Attribute: error |
| 212 |
An error message. |
| 213 |
|
| 214 |
Example: |
| 215 |
error="access denied" |
| 216 |
|
| 217 |
- Attribute: format |
| 218 |
See audio-format. |
| 219 |
|
| 220 |
- Attribute: host |
| 221 |
A hostname. |
| 222 |
|
| 223 |
Example: |
| 224 |
host=mojo |
| 225 |
|
| 226 |
- Attribute: id |
| 227 |
A spool id. The value can be an integer between 0 and 999. A |
| 228 |
value of 0 refers to all ids. An id always begins with the `#' |
| 229 |
character since ids can be intermixed with sound names. |
| 230 |
Therefore, sounds can never begin with `#'. |
| 231 |
|
| 232 |
Example: |
| 233 |
id=#219 |
| 234 |
|
| 235 |
- Attribute: idle |
| 236 |
The amount of time a RPTP connection has been idle. |
| 237 |
|
| 238 |
Example: |
| 239 |
idle=1+01:37:05 |
| 240 |
|
| 241 |
- Attribute: input |
| 242 |
Where audio is coming from. |
| 243 |
|
| 244 |
Example: |
| 245 |
input=flow |
| 246 |
|
| 247 |
- Attribute: input-bits |
| 248 |
See audio-bits. |
| 249 |
|
| 250 |
- Attribute: input-byte-order |
| 251 |
See audio-byte-order. |
| 252 |
|
| 253 |
- Attribute: input-channels |
| 254 |
See audio-channels. |
| 255 |
|
| 256 |
- Attribute: input-format |
| 257 |
See audio-format. |
| 258 |
|
| 259 |
- Attribute: input-offset |
| 260 |
See audio-offset. |
| 261 |
|
| 262 |
- Attribute: input-sample-rate |
| 263 |
See audio-sample-rate. |
| 264 |
|
| 265 |
- Attribute: left |
| 266 |
The output level of the left speaker. Valid levels range from 0 |
| 267 |
to 255. |
| 268 |
|
| 269 |
- Attribute: list-count |
| 270 |
The number of times a list of sounds will be played. |
| 271 |
|
| 272 |
Example: |
| 273 |
list-count=5 |
| 274 |
|
| 275 |
- Attribute: message |
| 276 |
A generic message. |
| 277 |
|
| 278 |
Example: |
| 279 |
message="stop successful" |
| 280 |
|
| 281 |
- Attribute: notify |
| 282 |
A list of RPTP events. Multiple events should be separated using |
| 283 |
a comma. |
| 284 |
|
| 285 |
Example: |
| 286 |
notify=play,pause,done |
| 287 |
|
| 288 |
- Attribute: pause |
| 289 |
The number of sounds paused. |
| 290 |
|
| 291 |
Example: |
| 292 |
pause=1 |
| 293 |
|
| 294 |
- Attribute: play |
| 295 |
The number of sounds playing. |
| 296 |
|
| 297 |
Example: |
| 298 |
play=3 |
| 299 |
|
| 300 |
- Attribute: position |
| 301 |
The current second offset in a sound. |
| 302 |
|
| 303 |
- Attribute: priority |
| 304 |
The priority of a sound. The value should be an integer between 0 |
| 305 |
and 255 where 0 is the lowest priority and 255 is the highest. |
| 306 |
|
| 307 |
Example: |
| 308 |
priority=0 |
| 309 |
|
| 310 |
- Attribute: random |
| 311 |
Play a random sound from a list of sounds. |
| 312 |
|
| 313 |
Example: |
| 314 |
random=true |
| 315 |
|
| 316 |
- Attribute: remain |
| 317 |
Number of seconds remaining in a sound. |
| 318 |
|
| 319 |
- Attribute: right |
| 320 |
The output level of the right speaker. Valid levels range from 0 |
| 321 |
to 255. |
| 322 |
|
| 323 |
- Attribute: sample |
| 324 |
The current sample offset in a sound. |
| 325 |
|
| 326 |
- Attribute: samples |
| 327 |
The total number of samples in a sound. |
| 328 |
|
| 329 |
- Attribute: sample-rate |
| 330 |
See audio-sample-rate. |
| 331 |
|
| 332 |
- Attribute: seconds |
| 333 |
Number of seconds in a sound. |
| 334 |
|
| 335 |
Example: |
| 336 |
seconds=247.54 |
| 337 |
|
| 338 |
- Attribute: size |
| 339 |
The number of bytes in an audio file. |
| 340 |
|
| 341 |
Example: |
| 342 |
size=1868508 |
| 343 |
|
| 344 |
- Attribute: sound |
| 345 |
The name of a sound. |
| 346 |
|
| 347 |
Example: |
| 348 |
sound=petergun.au |
| 349 |
|
| 350 |
- Attribute: uptime |
| 351 |
The amount of time an RPTP server has been running. |
| 352 |
|
| 353 |
Example: |
| 354 |
uptime=27+09:19:10 |
| 355 |
|
| 356 |
- Attribute: version |
| 357 |
The version of rplay. |
| 358 |
|
| 359 |
Example: |
| 360 |
version=3.2.0a8 |
| 361 |
|
| 362 |
- Attribute: volume |
| 363 |
See audio-volume. |
| 364 |
|
| 365 |
|
| 366 |
File: RPTP.info, Node: Events, Next: Event Notification, Prev: Attributes, Up: Top |
| 367 |
|
| 368 |
Events |
| 369 |
****** |
| 370 |
|
| 371 |
RPTP supports both synchronous and asynchronous event notification. |
| 372 |
Events can be use to monitor the status of the server or wait for |
| 373 |
something special to happen. These events are: |
| 374 |
|
| 375 |
`all' |
| 376 |
All events. |
| 377 |
|
| 378 |
`any' |
| 379 |
See all. |
| 380 |
|
| 381 |
`continue' |
| 382 |
A sound has been continued. |
| 383 |
|
| 384 |
`done' |
| 385 |
A sound is finished. |
| 386 |
|
| 387 |
`level' |
| 388 |
Used to obtain the output level of the left and right speakers. |
| 389 |
Level values range from 0 to 255. |
| 390 |
|
| 391 |
`none' |
| 392 |
No events. |
| 393 |
|
| 394 |
`pause' |
| 395 |
A sound has been paused. |
| 396 |
|
| 397 |
`play' |
| 398 |
A sound has been played. |
| 399 |
|
| 400 |
`position' |
| 401 |
Used to obtain the current sample position of a sound that's being |
| 402 |
played. |
| 403 |
|
| 404 |
`skip' |
| 405 |
A sound has been skipped. |
| 406 |
|
| 407 |
`state' |
| 408 |
A server state change. |
| 409 |
|
| 410 |
`stop' |
| 411 |
A sound has been stopped. |
| 412 |
|
| 413 |
`volume' |
| 414 |
The volume has changed. |
| 415 |
|
| 416 |
|
| 417 |
File: RPTP.info, Node: Event Notification, Next: Commands, Prev: Events, Up: Top |
| 418 |
|
| 419 |
Event Notification |
| 420 |
****************** |
| 421 |
|
| 422 |
RPTP clients can receive event notification messages from the server. |
| 423 |
The event notification messages sent by the server always begin with the |
| 424 |
`@' character followed by a list of attributes. This character is used |
| 425 |
to help RPTP clients distinguish notification messages from other RPTP |
| 426 |
responses. Using a special character is especially useful for clients |
| 427 |
that deal with server messages asychronously. |
| 428 |
|
| 429 |
Each message will always contain an event attribute to inform the |
| 430 |
client which event occurred. The message can also contain several other |
| 431 |
attributes to provide the client with more event information. |
| 432 |
|
| 433 |
The following is a list of sample event messages: |
| 434 |
`continue' |
| 435 |
Example: |
| 436 |
@event=continue id=#160 sound=bogus.au |
| 437 |
|
| 438 |
`done' |
| 439 |
Example: |
| 440 |
@event=done id=#23 sound=bogus.au |
| 441 |
|
| 442 |
`level' |
| 443 |
Example: |
| 444 |
@event=level volume=46 left=23 right=23 |
| 445 |
|
| 446 |
`pause' |
| 447 |
Example: |
| 448 |
@event=pause id=#160 sound=bogus.au |
| 449 |
|
| 450 |
`play' |
| 451 |
Example: |
| 452 |
@event=play id=#160 sound=bogus.au volume=127 sample-rate=8000 seconds=1.19 count=1 |
| 453 |
|
| 454 |
`position' |
| 455 |
Example: |
| 456 |
@event=position id=#24 position=0.50 remain=0.69 seconds=1.19 sample=4000 samples=9542 |
| 457 |
|
| 458 |
`skip' |
| 459 |
Example: |
| 460 |
@event=skip id=#160 sound=bogus.au |
| 461 |
|
| 462 |
`state' |
| 463 |
Example: |
| 464 |
@event=state play=1 pause=1 volume=120 |
| 465 |
|
| 466 |
`stop' |
| 467 |
Example: |
| 468 |
@event=stop id=#160 sound=bogus.au |
| 469 |
|
| 470 |
`volume' |
| 471 |
Example: |
| 472 |
@event=volume volume=200 |
| 473 |
|
| 474 |
Notification messages can be enabled and disabled using the `set' |
| 475 |
command. For example, `set notify=play,pause' tells the server to send |
| 476 |
notification messages when sounds are played or paused. |
| 477 |
|
| 478 |
For fun you might try connecting to your rplay server with telnet and |
| 479 |
monitor its events in real-time. This can be done using the following: |
| 480 |
|
| 481 |
$ telnet somehost.sdsu.edu 5556 |
| 482 |
|
| 483 |
Once connected, type `set notify=all' and you will receive |
| 484 |
notification for all server events. |
| 485 |
|
| 486 |
|
| 487 |
File: RPTP.info, Node: Commands, Next: Connecting, Prev: Event Notification, Up: Top |
| 488 |
|
| 489 |
Commands |
| 490 |
******** |
| 491 |
|
| 492 |
Clients use commands to interact with the server. All commands will |
| 493 |
return errors using a result line beginning with `-'. This line will |
| 494 |
always contain the `error' attribute which contains a text error |
| 495 |
message. An example error response would be: `-error="access denied"'. |
| 496 |
|
| 497 |
The follow is a list of all the RPTP commands. Almost all commands |
| 498 |
accept attributes which can be specified in any order. More commands |
| 499 |
and command attributes can and probably will be added in the future. |
| 500 |
|
| 501 |
- Command: access |
| 502 |
Obtain client access permissions. |
| 503 |
|
| 504 |
This command returns one line containing the `access' attribute. |
| 505 |
|
| 506 |
- Command: application NAME |
| 507 |
Set the name of the client application. |
| 508 |
|
| 509 |
This command returns one line containing the `name' of the |
| 510 |
application. |
| 511 |
|
| 512 |
Example: |
| 513 |
application Xrplay 2.0 |
| 514 |
+Xrplay 2.0 |
| 515 |
|
| 516 |
*Caution:* This command is considered obsolete and may be removed |
| 517 |
in the future. Please use the `set' command instead. |
| 518 |
|
| 519 |
- Command: continue ID|SOUND ... |
| 520 |
Continue playing a paused sound. |
| 521 |
|
| 522 |
This command returns one line containing the `message' attribute. |
| 523 |
|
| 524 |
Example: |
| 525 |
continue sound=bogus.au |
| 526 |
+message="continue successful" |
| 527 |
|
| 528 |
- Command: done ID|SOUND ... |
| 529 |
Force a playing or paused sound to be done. In most cases this is |
| 530 |
the same as stop. |
| 531 |
|
| 532 |
This command returns one line containing the `message' attribute. |
| 533 |
|
| 534 |
Example: |
| 535 |
done sound=bogus.au |
| 536 |
message="done successful" |
| 537 |
|
| 538 |
- Command: find SOUND |
| 539 |
Search for a sound. |
| 540 |
|
| 541 |
This command returns one line containing the `sound' and `size' |
| 542 |
attributes. |
| 543 |
|
| 544 |
Example: |
| 545 |
find sound=bogus.au |
| 546 |
+sound=bogus.au size=9574 |
| 547 |
|
| 548 |
- Command: get SOUND |
| 549 |
Retrieve a sound. |
| 550 |
|
| 551 |
This command returns one line containing the `sound' and `size' |
| 552 |
attributes followed by `size' bytes of audio data. |
| 553 |
|
| 554 |
Example: |
| 555 |
get sound=bogus.au |
| 556 |
+sound=bogus.au size=9574 |
| 557 |
... 9574 bytes of audio data ... |
| 558 |
|
| 559 |
- Command: help |
| 560 |
Obtain a list of server-supported commands. |
| 561 |
|
| 562 |
- Command: info SOUND |
| 563 |
Obtain information about a sound. |
| 564 |
|
| 565 |
This command returns one line containing information about the |
| 566 |
sound. The following attributes may be included: `sound', `size', |
| 567 |
`bits', `sample-rate', and `channels'. |
| 568 |
|
| 569 |
Example: |
| 570 |
info sound=bogus.au |
| 571 |
+sound=bogus.au size=9574 bits=8 sample-rate=8000 channels=1 |
| 572 |
|
| 573 |
- Command: list [CONNECTIONS|HOSTS|SERVERS|SPOOL|SOUNDS] |
| 574 |
List the specified server information. |
| 575 |
|
| 576 |
`connections' |
| 577 |
the server's RPTP connections |
| 578 |
|
| 579 |
`hosts' |
| 580 |
the server's rplay.hosts. |
| 581 |
|
| 582 |
`servers' |
| 583 |
the server's rplay.servers. |
| 584 |
|
| 585 |
`spool' |
| 586 |
the server's audio spool. |
| 587 |
|
| 588 |
`sounds' |
| 589 |
the server's rplay.conf and rplay.cache. |
| 590 |
|
| 591 |
This command returns one line containing the `message' attribute |
| 592 |
followed by zero or more lines terminated by a line containing only |
| 593 |
a `.'. |
| 594 |
|
| 595 |
Example: |
| 596 |
list connections |
| 597 |
+message="connections" |
| 598 |
host=130.191.225.64 type=client what=idle |
| 599 |
host=127.0.0.1 type=client what="notify 00000080" idle=.06 application="Xrplay 2.0" |
| 600 |
. |
| 601 |
|
| 602 |
list hosts |
| 603 |
+message="hosts" |
| 604 |
host=mojo access=rwx |
| 605 |
host=127.0.0.1 access=rwx |
| 606 |
. |
| 607 |
|
| 608 |
list servers |
| 609 |
+message="servers" |
| 610 |
host=hercules.sdsu.edu port=5556 |
| 611 |
host=pandora.sdsu.edu port=5556 |
| 612 |
. |
| 613 |
|
| 614 |
list spool |
| 615 |
+message="spool" |
| 616 |
id=#437 state=play sound=petergun host=130.191.225.64 volume=127 \backslash |
| 617 |
priority=0 count=1 seconds=227.75 sample_rate=8000 |
| 618 |
. |
| 619 |
|
| 620 |
list sounds |
| 621 |
+message="sounds" |
| 622 |
sound=monster2.au |
| 623 |
sound=monster1.au |
| 624 |
sound=monkey-3.au |
| 625 |
sound=monkey-2.au |
| 626 |
sound=monkey-1.au |
| 627 |
. |
| 628 |
|
| 629 |
*Caution:* This command does not use name-value pairs as arguments. |
| 630 |
|
| 631 |
- Command: pause ID|SOUND |
| 632 |
Pause a playing sound. |
| 633 |
|
| 634 |
This command returns one line containing the `message' attribute. |
| 635 |
|
| 636 |
Example: |
| 637 |
pause sound=bogus.au |
| 638 |
+message="pause successful" |
| 639 |
|
| 640 |
- Command: play |
| 641 |
Play a sound. |
| 642 |
|
| 643 |
This command accepts several attribute arguments, but only the |
| 644 |
`sound' attribute is required and it may be repeated to play a list |
| 645 |
of sounds sequentially. |
| 646 |
|
| 647 |
The `sound' attribute can be preceded by any of the following |
| 648 |
attributes: |
| 649 |
`count' |
| 650 |
`list-count' |
| 651 |
`priority' |
| 652 |
`random' |
| 653 |
`sample-rate' |
| 654 |
`volume' |
| 655 |
`input' |
| 656 |
`input-bits' |
| 657 |
`input-byte-order' |
| 658 |
`input-channels' |
| 659 |
`input-format' |
| 660 |
`input-offset' |
| 661 |
`input-sample-rate' |
| 662 |
This command returns one line containing the `id' attribute. |
| 663 |
|
| 664 |
Example: |
| 665 |
play sample-rate=4000 priority=255 sound=Debbie |
| 666 |
+id=#84 |
| 667 |
|
| 668 |
- Command: put ID|SIZE |
| 669 |
Give the server an entire sound or send flow data to a particular |
| 670 |
spool id. |
| 671 |
|
| 672 |
This command returns one line containing the `sound' or `id' and |
| 673 |
`size' attributes. After this line is received by the client, the |
| 674 |
server assumes the client will then send `size' bytes of audio |
| 675 |
data. If the specified spool id doesn't exist, the server will |
| 676 |
return an error. |
| 677 |
|
| 678 |
Example: |
| 679 |
put sound=bogus.au size=9574 |
| 680 |
+sound=bogus.au size=9574 |
| 681 |
|
| 682 |
or |
| 683 |
|
| 684 |
put id=#200 size=8000 |
| 685 |
+id=#200 size=8000 |
| 686 |
|
| 687 |
- Command: quit |
| 688 |
Terminate the RPTP session. |
| 689 |
|
| 690 |
This command returns nothing, the server simply closes the |
| 691 |
connection. |
| 692 |
|
| 693 |
- Command: reset |
| 694 |
Tell the server to reset itself. A reset usually includes |
| 695 |
re-reading all configuration files, closing all connections, and |
| 696 |
removing all sounds from the spool. |
| 697 |
|
| 698 |
If possible, the server will return one line containing the |
| 699 |
`message' attribute. The server will probably close the connect |
| 700 |
so the line may not be sent. |
| 701 |
|
| 702 |
- Command: set NAME[=VALUE] ... |
| 703 |
Get and set server attributes. The current set of supported |
| 704 |
server attributes is: |
| 705 |
`application' |
| 706 |
`level-notify-rate' |
| 707 |
`notify' |
| 708 |
`notify-rate' |
| 709 |
`position-notify-rate' |
| 710 |
`priority-threshold' |
| 711 |
`volume' |
| 712 |
This command returns one line containing the server's values for |
| 713 |
the specified attributes. If an attribute cannot be set, the |
| 714 |
server will return a value of `-1' for that attribute. |
| 715 |
|
| 716 |
Example: |
| 717 |
set application="Xrplay 2.0" notify=state volume=127 |
| 718 |
+application="Xrplay 2.0" notify=state volume=127 |
| 719 |
|
| 720 |
or |
| 721 |
|
| 722 |
set volume |
| 723 |
+volume=127 |
| 724 |
|
| 725 |
*Caution:* This command does not use name-value pairs to "get" the |
| 726 |
value of attributes. |
| 727 |
|
| 728 |
- Command: skip ID|COUNT |
| 729 |
Skip around to sounds in a sound list. The sound list must be |
| 730 |
referenced by ID. The number of sounds to skip (COUNT) can be |
| 731 |
negative (skip backwards), zero (skip to the beginning of the |
| 732 |
current sound), or positive (skip forward). Skipping before the |
| 733 |
beginning of the sound list will cause the first sound to be |
| 734 |
played. Skipping after the last sound will terminate the spool |
| 735 |
entry. Skipping a paused sound will cause the next sound (the |
| 736 |
skipee?) to also be paused. |
| 737 |
|
| 738 |
This command returns one line containing the `message' attribute. |
| 739 |
|
| 740 |
Example: |
| 741 |
skip id=#0 count=1 |
| 742 |
+message="skipped" |
| 743 |
|
| 744 |
- Command: status |
| 745 |
Obtain a server's current status. |
| 746 |
|
| 747 |
This command returns one line containing several attributes. |
| 748 |
|
| 749 |
Example: |
| 750 |
status |
| 751 |
+host=mojo version=3.2.0a8 uptime=01:32 audio-bits=8 audio-bufsize=800 \ |
| 752 |
audio-channels=1 audio-device=/dev/audio audio-format=ulaw \ |
| 753 |
audio-port=speaker audio-rate=10 audio-sample-rate=8000 volume=127 \ |
| 754 |
curr-bufsize=800 curr-rate=10 |
| 755 |
|
| 756 |
- Command: stop ID|SOUND ... |
| 757 |
Stop a paused or playing sound. |
| 758 |
|
| 759 |
This command returns one line containing the `message' attribute. |
| 760 |
|
| 761 |
Example: |
| 762 |
stop sound=bogus.au |
| 763 |
+message="stop successful" |
| 764 |
|
| 765 |
- Command: version |
| 766 |
Obtain the version number of the server. |
| 767 |
|
| 768 |
This command returns one line containing the `version' attribute. |
| 769 |
|
| 770 |
Example: |
| 771 |
version |
| 772 |
+version=3.2.0a8 |
| 773 |
|
| 774 |
- Command: volume [NEW-VOLUME] |
| 775 |
Get and set the volume of the audio device. |
| 776 |
|
| 777 |
This command returns one line containing the volume of the audio |
| 778 |
device. |
| 779 |
|
| 780 |
- Command: wait ID|EVENT|COMMAND |
| 781 |
Wait for a spool id, an event, or wait for the completion of a RPTP |
| 782 |
command. |
| 783 |
|
| 784 |
This comand returns one line that always contains the event |
| 785 |
attribute. Other attributes may also be included to provide more |
| 786 |
event information. |
| 787 |
|
| 788 |
Example: |
| 789 |
wait play sound=bogus |
| 790 |
+event=done id=#267 sound=bogus.au |
| 791 |
|
| 792 |
or |
| 793 |
|
| 794 |
wait event=volume |
| 795 |
+event=volume volume=135 |
| 796 |
|
| 797 |
or |
| 798 |
|
| 799 |
wait id=#300 |
| 800 |
+event=done id=#300 sound=tap2.au |
| 801 |
|
| 802 |
or |
| 803 |
|
| 804 |
wait event=any |
| 805 |
+event=play id=#360 sound=tap2.au volume=127 sample-rate=8000 seconds=0.21 count=1 |
| 806 |
|
| 807 |
*Caution:* This command is considered obsolete and may be removed |
| 808 |
in the future. Please use the `set' command instead. |
| 809 |
|
| 810 |
|
| 811 |
File: RPTP.info, Node: Connecting, Next: Timeouts, Prev: Commands, Up: Top |
| 812 |
|
| 813 |
Connecting |
| 814 |
********** |
| 815 |
|
| 816 |
An initial connection to a RPTP server is considered to be a RPTP |
| 817 |
command. This means that the server will always send a response to |
| 818 |
every client connection. The response sent is one line that begins with |
| 819 |
`+' for a successful connection and `-' for errors. The rest of the |
| 820 |
line consists of server attributes that can be used to find out more |
| 821 |
information about the server. An example would be: |
| 822 |
|
| 823 |
+host=hercules version=3.2.0b3 uptime=00:47:20 audio-bits=16 \ |
| 824 |
audio-bufsize=2450 audio-byte-order=big-endian audio-channels=1 \ |
| 825 |
audio-device=/dev/audio audio-format=linear-16 \ |
| 826 |
audio-port=speaker,headphone,lineout audio-rate=10 \ |
| 827 |
audio-sample-rate=11025 volume=120 curr-bufsize=2450 curr-rate=9 \ |
| 828 |
priority-threshold=0 |
| 829 |
|
| 830 |
Note that a `\' was used in the above example to split up the long |
| 831 |
attribute line. |
| 832 |
|
| 833 |
|
| 834 |
File: RPTP.info, Node: Timeouts, Next: Attribute Index, Prev: Connecting, Up: Top |
| 835 |
|
| 836 |
Timeouts |
| 837 |
******** |
| 838 |
|
| 839 |
RPTP servers can be configured to close connections on idle clients. |
| 840 |
Before the connection is closed, the server will send a timeout |
| 841 |
notification to the client. The notification is one line that begins |
| 842 |
with `!'. The reset of the line will contain attributes which should |
| 843 |
contain information about the timeout. For example: |
| 844 |
|
| 845 |
!message="Connection timed out after 300 idle seconds." |
| 846 |
|
| 847 |
|
| 848 |
File: RPTP.info, Node: Attribute Index, Next: Event Index, Prev: Timeouts, Up: Top |
| 849 |
|
| 850 |
Attribute Index |
| 851 |
*************** |
| 852 |
|
| 853 |
* Menu: |
| 854 |
|
| 855 |
* access: Attributes. |
| 856 |
* application: Attributes. |
| 857 |
* audio-bits: Attributes. |
| 858 |
* audio-bufsize: Attributes. |
| 859 |
* audio-byte-order: Attributes. |
| 860 |
* audio-channels: Attributes. |
| 861 |
* audio-device: Attributes. |
| 862 |
* audio-format: Attributes. |
| 863 |
* audio-offset: Attributes. |
| 864 |
* audio-port: Attributes. |
| 865 |
* audio-rate: Attributes. |
| 866 |
* audio-sample-rate: Attributes. |
| 867 |
* audio-volume: Attributes. |
| 868 |
* bits: Attributes. |
| 869 |
* channels: Attributes. |
| 870 |
* count: Attributes. |
| 871 |
* error: Attributes. |
| 872 |
* event: Attributes. |
| 873 |
* format: Attributes. |
| 874 |
* host: Attributes. |
| 875 |
* id: Attributes. |
| 876 |
* idle: Attributes. |
| 877 |
* input: Attributes. |
| 878 |
* input-bits: Attributes. |
| 879 |
* input-byte-order: Attributes. |
| 880 |
* input-channels: Attributes. |
| 881 |
* input-format: Attributes. |
| 882 |
* input-offset: Attributes. |
| 883 |
* input-sample-rate: Attributes. |
| 884 |
* left: Attributes. |
| 885 |
* list-count: Attributes. |
| 886 |
* message: Attributes. |
| 887 |
* notify: Attributes. |
| 888 |
* pause: Attributes. |
| 889 |
* play: Attributes. |
| 890 |
* position: Attributes. |
| 891 |
* priority: Attributes. |
| 892 |
* random: Attributes. |
| 893 |
* remain: Attributes. |
| 894 |
* right: Attributes. |
| 895 |
* sample: Attributes. |
| 896 |
* sample-rate: Attributes. |
| 897 |
* samples: Attributes. |
| 898 |
* seconds: Attributes. |
| 899 |
* size: Attributes. |
| 900 |
* sound: Attributes. |
| 901 |
* uptime: Attributes. |
| 902 |
* version: Attributes. |
| 903 |
* volume: Attributes. |
| 904 |
|
| 905 |
|
| 906 |
File: RPTP.info, Node: Event Index, Next: Command Index, Prev: Attribute Index, Up: Top |
| 907 |
|
| 908 |
Event Index |
| 909 |
*********** |
| 910 |
|
| 911 |
* Menu: |
| 912 |
|
| 913 |
* all: Events. |
| 914 |
* any: Events. |
| 915 |
* continue: Events. |
| 916 |
* done: Events. |
| 917 |
* level: Events. |
| 918 |
* none: Events. |
| 919 |
* pause: Events. |
| 920 |
* play: Events. |
| 921 |
* position: Events. |
| 922 |
* skip: Events. |
| 923 |
* state: Events. |
| 924 |
* stop: Events. |
| 925 |
* volume: Events. |
| 926 |
|
| 927 |
|
| 928 |
File: RPTP.info, Node: Command Index, Prev: Event Index, Up: Top |
| 929 |
|
| 930 |
Command Index |
| 931 |
************* |
| 932 |
|
| 933 |
* Menu: |
| 934 |
|
| 935 |
* access: Commands. |
| 936 |
* application: Commands. |
| 937 |
* continue: Commands. |
| 938 |
* done: Commands. |
| 939 |
* find: Commands. |
| 940 |
* get: Commands. |
| 941 |
* help: Commands. |
| 942 |
* info: Commands. |
| 943 |
* list: Commands. |
| 944 |
* pause: Commands. |
| 945 |
* play: Commands. |
| 946 |
* put: Commands. |
| 947 |
* quit: Commands. |
| 948 |
* reset: Commands. |
| 949 |
* set: Commands. |
| 950 |
* skip: Commands. |
| 951 |
* status: Commands. |
| 952 |
* stop: Commands. |
| 953 |
* version: Commands. |
| 954 |
* volume: Commands. |
| 955 |
* wait: Commands. |
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
Tag Table: |
| 960 |
Node: Top731 |
| 961 |
Node: Overview1170 |
| 962 |
Node: Attributes3059 |
| 963 |
Node: Events8728 |
| 964 |
Node: Event Notification9612 |
| 965 |
Node: Commands11672 |
| 966 |
Node: Connecting21105 |
| 967 |
Node: Timeouts22048 |
| 968 |
Node: Attribute Index22548 |
| 969 |
Node: Event Index25229 |
| 970 |
Node: Command Index25983 |
| 971 |
|
| 972 |
End Tag Table |