Ignore:
Timestamp:
Dec 21, 2007, 11:20:29 PM (17 years ago)
Author:
jhawk <jhawk>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
283d671f
Parents:
2fa5bdc
git-author:
jhawk <jhawk> (12/21/07 23:20:29)
git-committer:
jhawk <jhawk> (12/21/07 23:20:29)
Message:

Try to support WAV. First cu. What a failure.

File:
1 edited

Legend:

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

    r2fa5bdc r5e66bb4  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.14 2007-12-20 13:36:37 unknown Exp $
     4# $Id: sipbmp3-filter,v 1.15 2007-12-22 04:20:29 jhawk Exp $
    55# $Source: /tmp/tmp.UFBNno9997/RCS/sipbmp3-filter,v $
    66#
     
    9595  # Ogg-Vorbis audio file
    9696  &play_ogg_audio(\%opts);
     97  exit 0;
     98} elsif ($magic0 == 0x52 && $magic1 == 0x49) {
     99  &play_wav_audio(\%opts);
    97100  exit 0;
    98101} else {
     
    628631  close(ZEPHYR);
    629632}
     633
     634# Play a WAV audio file
     635sub play_wav_audio {
     636  # Retrieve those command line opts.
     637  my %opts = %{shift(@_)};
     638
     639  print ZEPHYR "No info\n";
     640  print ZEPHYR "Filename: $opts{'J'}\n";
     641  close(ZEPHYR);
     642
     643  # Play the file
     644
     645  system("chmod a+rw /dev/audio");
     646  system("ps -aef | grep audioplay | awk '{print $2}' | xargs kill -9");
     647  system("/usr/bin/audioplay $opts{'J'}");
     648}
Note: See TracChangeset for help on using the changeset viewer.