AudioCD::Mac 0.25 review

Download
by rbytes.net on

AudioCD::Mac is a MacPerl extension for controlling Audio CDs. SYNOPSIS #!perl -w use AudioCD; use strict; m

License: Perl Artistic License
File size: 14K
Developer: Chris Nandor
0 stars award from rbytes.net

AudioCD::Mac is a MacPerl extension for controlling Audio CDs.

SYNOPSIS

#!perl -w
use AudioCD;
use strict;
my $cd = new AudioCD;

$cd->volume(255);
$cd->play(2);
print "Now playingn" if $cd->status == CD_PLAY;
printf "Volume is %dn", $cd->volume;
sleep(5);

$cd->pause;
print "Now pausedn" if $cd->status == CD_PAUSE;
sleep(5);

$cd->volume(100);
$cd->continue;
print "Now playingn" if $cd->status == CD_PLAY;
printf "Volume is %dn", $cd->volume;
sleep(5);

my @info = $cd->info;
printf "Currently at track %d, %.2d:%.2dn", @info[0..2];

$cd->stop;
my $status = $cd->status;
print "Now stoppedn" if
($status == CD_FINISH || $status == CD_STOP);

if (do 'CDDB.pm') { # sold separately
my $cddb = new CDDB;
my @cddb_info = $cddb->calculate_id( $cd->cddb_toc );
my @discs = $cddb->get_discs(@cddb_info[0, 3, 4]);
print "You were probably listening to $discs[0]->[2]n";
}

$cd->eject;

This is the MacPerl module to be used by the AudioCD module. Other modules can be written for other platforms, but this one is Mac specific, calling Mac OS APIs to control the CD player.

Requirements:
Perl

What's New in This Release:
Significant clean up of Perl and XS code, lots of misc. changes.
Hopefully fixed cd_toc to give all the right values.
Fixed eject problems.

"no pointer is a pointer, too" -- Matthias Neeracher

AudioCD::Mac 0.25 search tags