chiark / gitweb /
Network play setup support in debconf scripts.
authorRichard Kettlewell <rjk@greenend.org.uk>
Tue, 22 Apr 2008 20:47:33 +0000 (21:47 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Tue, 22 Apr 2008 20:47:33 +0000 (21:47 +0100)
debian/config.disorder-server
debian/templates.disorder-server

index 83ffd80e760500e2a00b5340adf3e72a4b1b4c83..210a3396ff4c28e915a198a140dbf9b33bb4fdd9 100755 (executable)
@@ -26,8 +26,9 @@ db_input high disorder/roots || true
 db_input high disorder/encoding || true
 db_input high disorder/port || true
 db_input medium disorder/scratches || true
-db_input medium disorder/smtp_server || true
+db_input high disorder/smtp_server || true
 db_input high disorder/mail_sender || true
+db_input high disorder/interface || true
 db_go || true
 
 db_get disorder/roots || true
@@ -42,6 +43,18 @@ db_get disorder/smtp_server || true
 smtp_server="$RET"
 db_get disorder/mail_sender || true
 mail_sender="$RET"
+db_get disorder/interface || true
+interface="$RET"
+
+if test "x$interface" = xnetwork; then
+  db_input high disorder/mcast_address || true
+  db_input high disorder/mcast_port || true
+  db_go || true
+  db_get disorder/mcast_address || true
+  mcast_address="$RET"
+  db_get disorder/mcast_port || true
+  mcast_port="$RET"
+fi
 
 mkdir -p /etc/disorder
 cat > /etc/disorder/conf.debconf.new <<EOF
@@ -80,4 +93,10 @@ if test "$port" != none && test "$port" != ""; then
   echo "listen 0.0.0.0 $port" >> /etc/disorder/conf.debconf.new
 fi
 
+if test "x$interface" = xnetwork; then
+  echo "" >> /etc/disorder/conf.debconf.new
+  echo "# Target address for RTP frames" >> /etc/disorder/conf.debconf.new
+  echo "broadcast $mcast_address $mcast_port" >> /etc/disorder/conf.debconf.new
+fi
+
 mv /etc/disorder/conf.debconf.new /etc/disorder/conf.debconf
index f2ad1e06040a0e120b983f4ac8817ec9b84f6199..7694dd96c6a12bcd8c8fde11319d64cb9621f29b 100644 (file)
@@ -28,6 +28,31 @@ Description: Port number for clients to connect to
  can be set to 'none' to permit only local clients or a port number for
  remote clients to connect to, e.g. using Disobedience.
 
+Template: disorder/interface
+Type: select
+Choices: local, network
+Default: local
+Description: Interface to use to play sound
+ 'local' means the default local sound device will be used.  Use this
+ if you want to play through your sound card and don't want to play on any
+ other computers.
+ .
+ 'network' means sound will be transmitted over the network using RTP,
+ for instance to a multicast address.  Use this option if you want to play
+ sound through more than one computer.
+
+Template: disorder/mcast_address
+Type: string
+Description: Destination address for network sound transmission
+ Sound data will be sent to this address using the RTP protocol.  Users
+ would use (for instance) disorder-playrtp to play it.  Typically this
+ would be a multicast address but this is not mandatory.
+
+Template: disorder/mcast_port
+Type: string
+Description: Destination port for network sound transmission
+ Sound data will be sent to this UDP port using the RTP protocol.
+
 Template: disorder/smtp_server
 Type: string
 Default: localhost