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...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.