Mark McConnell > Audio-Mad > Audio::Mad

Download:
Audio-Mad-0.6.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.6   Source  

NAME ^

Audio::Mad - 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('', <STDIN>);
  $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;
  }

DESCRIPTION ^

 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.

EXPORT ^

None by default.

EXPORT_OK ^

AUTHOR ^

Mark McConnell <mischke@cpan.org>

SEE ALSO ^

perl(1)

Audio::Mad::Stream(3) Audio::Mad::Frame(3) Audio::Mad::Synth(3) Audio::Mad::Resample(3) Audio::Mad::Dither(3) Audio::Mad::Timer(3)

syntax highlighting: