JukePeg is an MP3 decoder/player that is controlled from a socket interface - easily driven from Perl. It supports more than one output device (and can play different tracks to each), and is able to fade-in, fade-out and overlap tracks. The volume, fade-in, fade-out and overlap settings can be set on a track by track basis.
The MPEG decoder is taken from the FreeAmp (http://www.freeamp.org) source, so many thanks to them. On IA32 the decoder will use assembler functions for some of the decoder if you have the NASM assembler installedon that machine.
An alternative MPEG decoder from the MPG123 project (http://www.mpg123.com) is also included; JukePeg can be built using either decoder.
The code was built and tested on an IA32 Debian system (2.2r2) using the GCC 2.95.2 compiler (a quick test was also done on a DEC Alpha box). I'd be interested to hear from anyone who builds it on a big-endian machine.
If you have multiple sound devices you can list them in the DEVICES entry in /etc/jukepeg.conf so that JukePeg controls all of them.