Site Index:

Journal
Wedding
Old Stuff
Pictures
Programming
Ramblings
Links

mus123

This program has served a two-fold purpose for me. I've been looking for an excuse to learn Perl, and I've wanted a command-line audio player that plays more than one audio format. This could potentially play anything, but for now it plays mpeg audio using mpg321, ogg vorbis using ogg123 and wave audio using the 'play' program.

It reads in a bunch of filenames from the command line, figures out what kind of files they are based on file extension (.mp3 or .ogg or whatever) and plays them in order with the appropriate player. If random is specified, it randomizes the list, and then plays that straight through once. It can also pull filenames out of a list file, and intelligently figure out where the files are based on where the list is. Fun stuff.

In a new version, I'd like to be able switch between random and straight play while it's running ("I'd like to listen to more Moxy Fruvous.."), and I've gotta get quitting the program to run smoother than the current "Jam ctrl-C quickly until it stops" method. Both of these, I think will come from better understanding how to use signals with Perl.

Anyway, here's the Perl code, and here's the source, syntax highlighted and line-numbered. Have fun. :)