NAME
MPEG::MP3Play - Perl extension for playing back MPEG music
SYNOPSIS
use MPEG::MP3Play;
my $mp3 = new MPEG::MP3Play;
$mp3->play ("test.mp3");
while ( 1 ) {
my $msg = $mp3->get_message_wait;
last if ( $msg->{code} == &XA_MSG_NOTIFY_PLAYER_STATE and
$msg->{state} == &XA_PLAYER_STATE_EOF )
}
DESCRIPTION
This Perl module enables you to playback MPEG music.
PREREQUISITES
MPEG::MP3Play is build against the 3.0 version of the Xaudio SDK and uses the async interface of the Xaudio library.
I don't know if older versions will work properly. The SDK is not part of this distribution, so get and install it first (http://www.xaudio.com/).
test.pl uses Term::ReadKey if it's installed.
INSTALLATION
First, generate the Makefile:
perl Makefile.PL
You will be prompted for the location of the Xaudio SDK. The directory must contain the include and lib subdirectories, where the Xaudio header and library files are installed.
make
Now copy a mp3 file called 'test.mp3' into the actual directory. It will be played, if everything built properly.
make test
Ok, now install it and enjoy!
make install
METHODS
Actually not documented yet, because of frequently changes. This will be changed very soon. Use the source, instead ;)
TODO
Oh wow, there's much to do. This is the 0.02 release of the module, and it has actually a really poor interface ;) Also this is my first XS module, so I want to learn much about C/Perl glues in the near future.
I'm planning a full OO interface for playing back MPEG files, so this module can be used by Perl MPEG players as a backend. I'm a GTK fan, so it's possible, that I write a Perl/GTK based MPEG player.
Ideas, code and any help are very appreciated.
AUTHOR
Joern Reder, joern@netcologne.de
COPYRIGHT
Copyright (C) 1999 by Joern Reder, All Rights Reserved
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The Xaudio SDK is copyright by MpegTV,LLC. Please refer to the LICENSE text published on http://www.xaudio.com/.
SEE ALSO
perl(1).