Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perl Mp3 Player

by t0mas (Priest)
on Sep 19, 2002 at 05:28 UTC ( [id://199080]=note: print w/replies, xml ) Need Help??


in reply to Perl Mp3 Player

Once upon a time, I did a learning project (for the Win32::GUI) module that I called MonkAmp. It was a win32 mp3 player that uses an XS interface to the amp11lib (GNU GPLd) that I wrote for this project.

If you want to play with it yourself, I found amp11 and amp11lib at http://www.ph.tum.de/~nbeisert/amp11.html and http://marvin.cc.fer.hr/~elf/amp11lib/. Amp11lib have a very nice well-defined interface.

If you want my code, please /msg me with your email address and I'll try to get the time to find the code, pack and send it to you.

Good luck,

/brother t0mas

Update:

You can use the built-in mci functions of Windows to do somthing like:
#!/usr/bin/perl -w use strict; use Win32::API; use vars qw($mci $retstring $stop); #- Import mciSendStringA $mci = new Win32::API("winmm", "mciSendStringA", 'PPNN', 'N') or die "No we have no bananas...."; #- Init $retstring $retstring=" "x256; #- Open mp3 file $mci->Call("open whatever.mp3 alias mysound",$retstring,256,0); #- Play it $mci->Call("play mysound from 1",$retstring,256,0); #- Until... print "press Enter to stop playing...."; $stop=<STDIN>; #- Stop $mci->Call("stop mysound",$retstring,256,0); #- Close $mci->Call("close mysound",$retstring,256,0);
Works like a charm om my Windows ;-) Let's call it BUUAmp...

Replies are listed 'Best First'.
Re^2: Perl Mp3 Player
by capfan (Sexton) on Jan 07, 2012 at 12:14 UTC
    One can play mp3 files using Perl & SDL, too. cf. http://reneeb-perlblog.blogspot.com/2012/01/mp3s-mit-perl-abspielen.html

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://199080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-19 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found