Allegro::Sample - Allegro digital sound routines
use Allegro;
$al = Allegro->new() or die; $al->Sound(digi => 'auto') or die $al->error;
$spl = $al->Sample(file => "test.wav") or die; $spl->play(loop => 1);
sleep 10;
The Allegro::Sample module provides an interface to the Allegro sample routines. An Allegro module should already be initialized for this to work.
$spl = $al->Sample(file => $filename);
I<file> is the name of the file to load, and is required.
$spl->play(volume => $vol,
pan => $pan,
freq => $freq,
loop => $loop);
$spl->stop() to end
it.
$spl->adjust(...);
$spl->stop;
Colin O'Leary <colin@mx3.org>
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.