chiark / gitweb /
docs updates
authorrjk@greenend.org.uk <>
Mon, 24 Sep 2007 15:57:53 +0000 (16:57 +0100)
committerrjk@greenend.org.uk <>
Mon, 24 Sep 2007 15:57:53 +0000 (16:57 +0100)
CHANGES
README.streams
doc/disorder-playrtp.1.in
doc/disorder_config.5.in
server/speaker-network.c

diff --git a/CHANGES b/CHANGES
index c95c17ebae15a404ec6cbf4c619214a040615b76..ab023a3857c647ff0c1bda95a72f465c2e74ce59 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -38,10 +38,10 @@ crash when random play was enabled has been fixed.
 A new configuration option 'queue_pad' allows the number of random
 tracks kept on the queue to be controlled.
 
-New configuration options 'speaker_command', 'sample_format' and
-'sox_generation' direct the speaker process to send audio data to a
-subcommand instead of straight to the sound card, for instance for
-broadcasting over a network.
+** Network Play
+
+DisOrder can broadcast audio over a network, allowing it to be played on
+multiple client machines.  See README.streams for details.
 
 ** disorderfm
 
index 82226d6b6f15cd1874897b1e3624f07775e2c9d2..aa4c26b0c11237e9c1284e6379c395a8b5745ac0 100644 (file)
@@ -26,8 +26,34 @@ interrupt the playing track, you have to scratch it manually.  Go back to
 normal play by scratching the stream.
 
 
-Creating A Stream Of DisOrder Output
-====================================
+RTP Streaming
+=============
+
+DisOrder is now capable to transmitting RTP streams over a suitable network.
+To enable this make sure that allplayers use the speaker process, i.e. execraw
+rather than exec (or it won't work properly) and configure the network speaker
+backend:
+
+    speaker_backend network
+    broadcast 172.17.207.255 9003
+    broadcast_from 172.17.207.2 9002
+
+broadcast_from is optional but may be convenient for some cases.
+
+To play, use the disorder-playrtp client.
+
+   disorder-playrtp 0.0.0.0 9003
+
+Currently only 16-bit 44100Hz stereo is supported, which requires about
+1.4Mbit/s.  Possibly other lower-quality but lower-bandwidth encodings will be
+supported in future.
+
+If you have a too-recent version of sox you may need to set the sox_generation
+option.
+
+
+Icecast Streaming
+=================
 
 This can be achieved using the speaker_command option and Icecast (see
 http://www.icecast.org/).  It will only work if you use the speaker process,
@@ -83,11 +109,8 @@ to pause a stream in any case.  I used IceCast 2.3.1 and Ices 2.0.1.  You can
 play the stream with XMMS or whatever.  The total setup seems to play rather
 behind the 'current' time, watch this space for a fix (or contribute one!)
 
-Other DisOrder options you can set are sox_generation which you should set to
-if you have a sufficently recent version of sox, due to an incompatile change
-in its command syntax; and sample_format which determines what format is
-supplied to the speaker_command.  See disorder_config(5) for further
-information.
+If you have a too-recent version of sox you may need to set the sox_generation
+option.
 
 
 Local Variables:
index 860051795a56405ee1905ddcac2fec62d7f118da..18ca1495e0d1b7bcaa568621ecb111acab1d3dbf 100644 (file)
@@ -28,8 +28,6 @@ disorder-playrtp \- play DisOrder network broadcasts
 .SH DESCRIPTION
 \fBdisorder-playrtp\fR plays a network broadcast sent from the specified
 address.
-.PP
-It is currently a work in progress!
 .SH OPTIONS
 .TP
 .B --device \fIDEVICE\fR, \fB-D \fIDEVICE\fR
@@ -49,6 +47,9 @@ Specifies the maximum buffer size in frames.  If there are this many frames in
 the buffer then reading from the network socket will be suspended.  The default
 is four times the \fB--buffer\fR value.
 .TP
+.B --rcvbuf \fIBYTES\fR, \fB-R \fIBYTES\fR
+Specifies socket receive buffer size.
+.TP
 .B --help\fR, \fB-h
 Display a usage message.
 .TP
index be922d2eb582e5dda1d9c750a9622a48de07231c..cc8bd39bbb08a21da64e22d5bc9f1581cc4642e7 100644 (file)
@@ -350,7 +350,9 @@ is specified, or (currently) on non-Linux systems.
 .TP
 .B network
 Transmit audio over the network.  This is the default if
-\fBbroadcast\fR is specified.
+\fBbroadcast\fR is specified.  You can use
+.BR disorder-playrtp (1)
+to receive and play the resulting stream on Linux and OS X.
 .RE
 .TP
 .B sox_generation \fB0\fR|\fB1
index 3d3bbc0c811d8d453d1efd30027cd9b1d609125d..fab81a8f6bb55cfc11488805a6b874eae1ae0ff4 100644 (file)
@@ -103,6 +103,11 @@ static void network_init(void) {
   socklen_t len;
   char *sockname, *ssockname;
 
+  /* Override sample format */
+  config->sample_format.rate = 44100;
+  config->sample_format.channels = 2;
+  config->sample_format.bits = 16;
+  config->sample_format.byte_format = AO_FMT_BIG;
   res = get_address(&config->broadcast, &pref, &sockname);
   if(!res) exit(-1);
   if(config->broadcast_from.n) {
@@ -139,10 +144,6 @@ static void network_init(void) {
   /* Select an SSRC */
   gcry_randomize(&rtp_id, sizeof rtp_id, GCRY_STRONG_RANDOM);
   info("selected network backend, sending to %s", sockname);
-  if(config->sample_format.byte_format != AO_FMT_BIG) {
-    info("forcing big-endian sample format");
-    config->sample_format.byte_format = AO_FMT_BIG;
-  }
 }
 
 /** @brief Play over the network */