Whoops... forgot the attachment....

sorry,
--Paco


On Tue, 20 Jun 2000 [EMAIL PROTECTED] wrote:

> On Tue, 20 Jun 2000 [EMAIL PROTECTED] wrote:
> > 
> > Hey... this is fairly new.  Somebody hacked XMMS so that it plays SHN
> > files directly.  The relevant info is in the text below.
> > 
> > Note that you can also do this:
> > 
> >      [EMAIL PROTECTED]%> shorten -x <file>.shn - | play -t wav -
> > 
> > from the command line to play a SHN without making the intermediate .WAV
> > file.  It works fine, but you don't get a nice GUI or the ability to
> > pause, ffwd, or rewind the audio.
> 
> 
> Just in case anybody out there isn't familiar with perl, I though I'd send
> this email out to help them.  Attached is my script for playing SHNs  out
> of directories or off of a CD.
> 
> To use it, put it in your path somewhere (make sure it's executable!), and
> type:
> 
>       shnplay /my/shn/file/directory/or/CDROM/path
> 
> That's is.  It will play each file with a ".shn" extention in that
> directory without making big WAV files as an intermediate step.
> 
> SInce the shorten algorithm is so fast, playing SHN files like this only
> uses up about 10% of my CPU. (550MHz Athlon.)
> 
> BTW:  it's nice to have a topic on this mailing list aside from "how do I
> get this card working" or "is there planned support for this card" and the
> like.  Those are all good posts to this list, but we never really have too
> many actual discussions about stuff.  We just help each other make the
> boxes make noise.
> 
> 

#!/usr/bin/perl
{
        my ($location) = shift || die "Syntax: shnplay <path to .SHN files>\n";
        chdir ("$location") || die "Directory $location does not exist!\n";

        @SHNlist = `ls -1 *.shn`;

        for($i=0;$i<$#SHNlist+1;$i+=1)
        {
                chomp($SHNlist[$i]);
                system "shorten -x $SHNlist[$i] - | play -t wav -";
        }
}

Reply via email to