Audio::RaveMP is a Perl interface to Sensory Science RaveMP player.
SYNOPSIS
use Audio::RaveMP ();
The Audio::RaveMP module provides a Perl interface to the Sensory Science RaveMP player.
METHODS
new
my $rmp = Audio::RaveMP->new;
permitted
Check parallel port permissions (must be root at the moment):
unless ($rmp->permitted) {
print "$!n";
exit 1;
}
is_ready
Check that RaveMP is connected and powered up:
unless ($rmp->is_ready) {
print "Device is not ready (not connected or powered up?)n";
exit 2;
}
show_status
Show status messages:
$rmp->show_status(1);
$rmp->show_status(0);
upload
Upload a file. The second argument is the name to upload to, which is optional and defaults to the upload name:
unless ($rmp->upload("we_eat_rhythm.mp3")) {
print "upload failedn";
}
unless ($rmp->upload("we_eat_rhythm.mp3", "We Eat Rhythm")) {
print "upload failedn";
}
remove
Remove a file specified by the give slot number:
unless ($rmp->remove(8)) {
print "unable to remove file at slot 8n";
}
download
Download the file specified by the give slot number. The last argument is the name of the destination file, which is optional and defaults to the name of the downloaded file:
unless ($rmp->download("we_eat_rhythm.mp3")) {
print "download failedn";
}
unless ($rmp->download("We Eat Rhythm", "we_eat_rhythm.mp3")) {
print "download failedn";
}
contents
Return an array reference of file contents in the player. Each element is an object blessed into the Audio::RaveMPSlot class:
my $contents = $rmp->contents;
for my $slot (@$contents) {
printf "%d, %s -> %sn",
$slot->number, $slot->type, $slot->filename;
}
Product's homepage
Requirements:
· Perl