The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Allegro::Sound - Allegro sound initialization/volume routines

SYNOPSIS

   use Allegro;

   $al    = Allegro->new() or die;
   $sound = $al->Sound() or die $al->error;

   $sound->volume(digi => 50);

DESCRIPTION

This module includes the routines to initialize the Allegro sound card drivers.

Both Allegro::Sample and Allegro::MIDI will use this module implicitly, so you don't need a "use Allegro::Sound".

METHODS

new

Installs the digital sound and MIDI drivers.

   $al->Sound(digi => 'auto',
              midi => 'none');

Currently only auto and none are valid drivers.

digi

Desired digital card driver. Defaults to 'auto'.

midi

Desired MIDI driver. Defaults to 'none'.

shutdown

Uninstalls both the digital sound and MIDI drivers.

   $sound->shutdown;
volume

Sets global volume.

   $sound->volume(digi => $digital_volume,
                  midi => $midi_volume);
digi

Digital sound volume. Valid values are 0-255.

midi

MIDI volume. Valid values are 0-255.

Either may be omitted to keep the current volume.

AUTHOR

Colin O'Leary <colino@cpan.org>

COPYRIGHT

Copyright 2003 by Colin O'Leary. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The Allegro library is copyright its authors, and is giftware. See http://alleg.sf.net for more information.

SEE ALSO

Allegro - Base Allegro routines
Allegro::Sample - Digital sound routines
Allegro::MIDI - MIDI routines