Ignore:
Timestamp:
Nov 25, 2009, 2:10:09 AM (15 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
af7788c
Parents:
331360d
git-author:
Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
git-committer:
Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
Message:

Changed 'sipbmp3' to 'gutenbach' by popular demand. Have not checked for errors, yet.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • gutenbach/debian/lib/gutenbach-filter

    r331360d rc631d1a  
    1 #!/usr/bin/perl
     1#!/usr/athena/bin/perl
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
    5 # $Source: /usr/local/bin/RCS/sipbmp3-filter,v $
     4# $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
     5# $Source: /usr/local/bin/RCS/gutenbach-filter,v $
    66#
    77# TODO
     
    2323use IPC::Open2;
    2424
    25 my $zephyr_class = "lprmp3";
    26 my $host = "hostname";
    27 my $queue = "printername";
     25my $zephyr_class = "gutenbach";
     26my $host = `hostname`;
     27my $queue = "gutenbach";
     28my $mixer = "PCM";
     29my $channel = "Front Left";
    2830
    2931# Configuration
    30 my $config_file = "/usr/lib/sipbmp3/config/sipbmp3-filter-config.pl";
     32my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl";
    3133if (-r $config_file) {
    3234    # Inline the configuration file
     
    4042
    4143close(STDERR);
    42 open(STDERR, ">>", "/tmp/sipbmp3.log") or warn "Couldn't open log: $!";
     44open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!";
    4345
    4446$ENV{"TERM"}="vt100";
     
    9597# Status messages at start of playback
    9698open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i ' .
    97   $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     99  $queue.'@'.$host.' -s "Gutenbach Music Spooler"');
    98100
    99101# For the Now Playing remctl command
    100 open(STATUS, '>', '/var/run/sipbmp3/status') or die("Can't open status file /var/run/sipbmp3/status");
     102open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status");
    101103
    102104print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n");
     
    106108sub clear_status {
    107109    # Possible race condition if the previous status is still going
    108     open(STA, '>', '/var/run/sipbmp3/status');
     110    open(STA, '>', '/var/run/gutenbach/status');
    109111    close(STA);
    110112    open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
    111         $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     113        $queue.'@'.$host.' -s "Gutenbach Music Spooler"');
    112114    print(ZEPH "Playback aborted.\n");
    113115    close(ZEPH);
     
    266268    # Prepare to write status:
    267269    open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '.$zephyr_class.' -i ' .
    268          $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     270         $queue.'@'.$host.' -s "Gutenbach Music Spooler"');
    269271   
    270272    # fork for mpg123
     
    290292       
    291293        close(ZEPHYR);
    292         open(STATUS, '>', '/var/run/sipbmp3/status');
     294        open(STATUS, '>', '/var/run/gutenbach/status');
    293295        close(STATUS);
    294296    }
Note: See TracChangeset for help on using the changeset viewer.