Audio::Mad 0.6 review

Download
by rbytes.net on

Audio::Mad is a Perl interface to the mad MPEG decoder library. SYNOPSIS use Audio::Mad qw(:all); my $stream = new A

License: Perl Artistic License
File size: 128K
Developer: Mark McConnell
0 stars award from rbytes.net

Audio::Mad is a Perl interface to the mad MPEG decoder library.

SYNOPSIS

use Audio::Mad qw(:all);

my $stream = new Audio::Mad::Stream();
my $frame = new Audio::Mad::Frame();
my $synth = new Audio::Mad::Synth();
my $timer = new Audio::Mad::Timer();
my $resample = new Audio::Mad::Resample(44100, 22050);
my $dither = new Audio::Mad::Dither();

my $buffer = join('', );
$stream->buffer($buffer);

FRAME: {
if ($frame->decode($stream) == -1) {
last FRAME unless ($stream->err_ok());

warn "decoding error: " . $stream->error();
next FRAME;
}

$synth->synth($frame);
my $pcm = $dither->dither($resample->resample($synth->samples()));

print $pcm;
next FRAME;
}

This module is an attempt to provide a perl interface to the MAD (MPEG Audio Decoder) library, written by Robert Leslie. It has been designed to be 100% object oriented, and to follow the MAD interface as closely as possible.

So far, most of the MAD library, plus two companion modules are provided as part of the interface. Seperate documentation is provided in perldoc for all of the modules in the Audio::Mad framework.

Requirements:
Perl

Audio::Mad 0.6 keywords