NAME

Audio::Mad::Dither - Dithering routines for mad_fixed_t data

SYPNOSIS

my $dither = new Audio::Mad::Dither (MAD_DITHER_S16_LE);
my $s16le = $dither->dither($fixed_l, $fixed_r);
$dither->init(MAD_DITHER_S24_BE);
my $s24be = $dither->dither($fixed_l);

DESCRIPTION

This module provides a means of dithering and converting
streams of mad_fixed_t samples into a small variety of
pcm sample streams.
The underlying module converts the streams using the linear
quantization method provided in the mad-0.14.2b
distribution.

METHODS

  • new ([type])

    Creates a new Audio::Mad::Dither object, and returns a
    handle to it. You may provide an optional type parmater,
    corresponding to a MAD_DITHER constant, or accept the
    default of signed 16 bit little endian samples.
  • init ([type])

    Reinitializes an Audio::Mad::Dither object into producing
    a different type of pcm stream.
  • dither (left, [right])

    Returns a formatted stream of pcm samples, dithered from
    the mad_fixed_t streams of samples: left, and optionally
    right (mono streams only have left channel). The data
    returned here is appropriate to be sent to at a /dev/dsp
    or similar device.

AUTHOR

Mark McConnell <mischke@cpan.org>