From 6094c7e482046b943dbc0f307e0b5c3278aa450e Mon Sep 17 00:00:00 2001 Message-Id: <6094c7e482046b943dbc0f307e0b5c3278aa450e.1715695552.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 22 Apr 2008 21:47:33 +0100 Subject: [PATCH] Network play setup support in debconf scripts. Organization: Straylight/Edgeware From: Richard Kettlewell --- debian/config.disorder-server | 21 ++++++++++++++++++++- debian/templates.disorder-server | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/debian/config.disorder-server b/debian/config.disorder-server index 83ffd80..210a339 100755 --- a/debian/config.disorder-server +++ b/debian/config.disorder-server @@ -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 <> /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 diff --git a/debian/templates.disorder-server b/debian/templates.disorder-server index f2ad1e0..7694dd9 100644 --- a/debian/templates.disorder-server +++ b/debian/templates.disorder-server @@ -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 -- [mdw]