- Timestamp:
- Dec 20, 2002, 10:58:23 PM (22 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- 3304401
- Parents:
- b0d9dda
- git-author:
- arolfe <arolfe> (12/20/02 22:58:23)
- git-committer:
- arolfe <arolfe> (12/20/02 22:58:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gutenbach/debian/lib/sipbmp3-filter
rb0d9dda r148111e 2 2 # Play the data on STDIN as an audio file 3 3 # 4 # $Id: sipbmp3-filter,v 1. 1 2002-12-13 03:04:17arolfe Exp $4 # $Id: sipbmp3-filter,v 1.2 2002-12-21 03:58:23 arolfe Exp $ 5 5 # 6 6 # TODO … … 21 21 &use_winamp_genres(); 22 22 23 print STDERR "STDERR FROM SPOOL FILTER\n"; 24 23 25 # set real uid to be effective uid 24 26 $< = $>; … … 28 30 29 31 # Select the correct output device and set the volume 30 system("/ mit/outland/bin/audio_setdevice -out headphones -volume 1002>&1 </dev/null > /dev/null");32 system("/usr/local/bin/audio_setdevice -out headphones 2>&1 </dev/null > /dev/null"); 31 33 32 34 # The command line we get from lpd is (no spaces between options and args): … … 56 58 57 59 # Status messages at start of playback 58 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3 -s "SIPB LPR music spooler"');60 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3@xcb -s "SIPB LPR music spooler"'); 59 61 print(ZEPHYR "User $opts{'n'} on host $opts{'H'} is playing:\n"); 60 62 … … 170 172 } 171 173 172 system("ps -aef| grep ogg123 | awk '{print $2}' | xargs kill -9");173 system("ps -aef| grep mpg123 | awk '{print $2}' | xargs kill -9");174 system("ps ax | grep ogg123 | awk '{print $2}' | xargs kill -9"); 175 system("ps ax | grep mpg123 | awk '{print $2}' | xargs kill -9"); 174 176 system("chmod a+rw /dev/audio"); 175 177 system("/mit/infoagents/bin/mpg123 -b 16384 -q $up $uri >/tmp/mpg123.out 2>&1"); 176 178 177 179 # Done. Status: 178 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3 -s "SIPB LPR music spooler"');180 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3@xcb -s "SIPB LPR music spooler"'); 179 181 180 182 # Check if there were any errors … … 303 305 304 306 system("chmod a+rw /dev/audio"); 305 system("ps -aef| grep ogg123 | awk '{print $2}' | xargs kill -9");306 system("ps -aef| grep mpg123 | awk '{print $2}' | xargs kill -9");307 system("ps ax | grep ogg123 | awk '{print $2}' | xargs kill -9"); 308 system("ps ax | grep mpg123 | awk '{print $2}' | xargs kill -9"); 307 309 system("/mit/infoagents/bin/mpg123 -b 16384 -q - >/tmp/mpg123.out 2>&1"); 308 310 309 311 # Done. Status: 310 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3 -s "SIPB LPR music spooler"');312 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3@xcb -s "SIPB LPR music spooler"'); 311 313 312 314 # Check if there were any errors … … 376 378 377 379 # Done. Status: 378 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3 -s "SIPB LPR music spooler"');380 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3@xcb -s "SIPB LPR music spooler"'); 379 381 380 382 # Check if there were any errors … … 461 463 462 464 # Done. Status: 463 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3 -s "SIPB LPR music spooler"');465 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c sipb-auto -i sipbmp3@xcb -s "SIPB LPR music spooler"'); 464 466 465 467 # Check if there were any errors
Note: See TracChangeset
for help on using the changeset viewer.