primus has asked for the wisdom of the Perl Monks concerning the following question:


salutations monks,

even though i immensly enjoy WinAmp 2.81, i sigh knowing that it is not written in perl. so, i was thinking about writing a suave perl/Tk MP3 player.

i figure that there are probably ones somewhere out there on the web, but that's not of concern. writting this would be for the pure joy of using perl. i just have one problem: i really dont know how to play an MP3 with perl...

there is this module on CPAN, MP3::Player::PtkConcert, and i am not quite sure what it does... i am hoping to be able to play MP3s on both win32 and nix OSes.

thanks for the help monks... i give a salute to perl

Replies are listed 'Best First'.
Re: perl MP3 player
by thewalledcity (Friar) on Jan 14, 2003 at 17:57 UTC
Re: perl MP3 player
by Fletch (Bishop) on Jan 14, 2003 at 17:55 UTC

    Well, there is at least one POE component on CPAN for driving mpg123.

    Waxing editorial . . .

    Then again, there's the overriding "If it's not broke . . ." sentement. Playing MP3's requires quite a bit of number crunching (which isn't perl's fort&eaccute;), and Tk just looks so circa-early-90s-Motif-esquely ugly. XMMS and WinAmp:

    • Already exist
    • Already work

    Unless you're interested in signal processing or something to use Inline::C with, you could probably find a better project.

Re: perl MP3 player
by BUU (Prior) on Jan 15, 2003 at 00:08 UTC
    In addition to the above listed modules, you might want to try just writing (another) front end to mpg123. Just please, don't distribute it as over 4000 curently exist.
Re: perl MP3 player
by hangareighteen (Monk) on Jan 15, 2003 at 10:57 UTC
    I have written a perl interface to the MAD mpeg decoding library. I have written several pure perl mpeg players using this library, it's Audio::Mad and it's fairly alpha just yet. It hasn't received much testing and I haven't advocated it's use too much; but it works for me. I also wrote a POE component based on this module which handles the decoding process on it's own and sends out status updates. It's not released, but if you're interested, I could easily put it up.