Rechercher une page de manuel
SDL::Mixer.3pm
Langue: en
Version: 2009-11-24 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- new()
- query_spec()
- reserve_channels
- allocate_channels()
- group_channel(channel,group)
- group_channels(from,to,group)
- group_available(group)
- group_count(group)
- group_oldest()
- group_newer()
- play_channel()
- play_music()
- fade_in_channel(channel,chunk,loops,ms,ticks)
- fade_in_music(music,loops,ms)
- channel_volume(channel,volume)
- mucis_volume(volume)
- halt_channel(channel)
- halt_group(group)
- halt_music()
- channel_expire(channel,ticks)
- fade_out_channel(channel,ms)
- fade_out_group(group,ms)
- fade_out_music(ms)
- fading_music()
- fading_channel()
- pause( channel )
- resume(channel)
- paused()
- pause_music()
- resume_music()
- rewind_music()
- music_paused()
- playing()
- playing_music ()
- AUTHORS
- SEE ALSO
NAME
SDL::Mixer - a SDL perl extensionSYNOPSIS
$mixer = new SDL::Mixer -frequency => MIX_DEFAULT_FREQUENCY, -format => MIX_DEFAULT_FORMAT, -channels => MIX_DEFAULT_CHANNELS, -size => 4096;
DESCRIPTION
SDL::Mixer allows you access to the SDL mixer library, enablig sound and music volume setting, playing, pausing and resuming, as well as fading the sound and music in and out.METHODS
new()
$mixer = SDL::Mixer->new( -frequency => MIX_DEFAULT_FREQUENCY, -format => MIX_DEFAULT_FORMAT, -channels => MIX_DEFAULT_CHANNELS, -size => 4096);
Creates a new SDL::Mixer object. $size is the buffer size in bytes.
query_spec()
my $specs = SDL::Mixer::query_spec();
Returns a hash reference, containing the following keys and their respective values:
-status -frequency -channels -format
reserve_channels
$mixer->reserve_channels(4);
Reserve so many channels.
allocate_channels()
$mixer->reserve_channels(2);
Allocate so many channels.
group_channel(channel,group)
Group the channel number $channel into group $group.group_channels(from,to,group)
Groups a range of channelsgroup_available(group)
Return true when the group is available.group_count(group)
Returns the number of channels in the groupgroup_oldest()
group_newer()
play_channel()
play_music()
Play $music $loop times.fade_in_channel(channel,chunk,loops,ms,ticks)
Fades a channel infade_in_music(music,loops,ms)
Fades the music in over a number of ms, looping as it doeschannel_volume(channel,volume)
Sets the volume for a single channelmucis_volume(volume)
Set the volume for the music.halt_channel(channel)
Stops a specific channelhalt_group(group)
Stops a group of channelshalt_music()
Stops the musicchannel_expire(channel,ticks)
Ignores the channel after "ticks" has expiredfade_out_channel(channel,ms)
Fade the channel number $channel in $ms ms out.fade_out_group(group,ms)
Fade the channel group $group in $ms ms out.fade_out_music(ms)
Fade the music in $ms ms out.fading_music()
Return true when the music is currently fading in or out.fading_channel()
Return true when the channel number $channel is currently fading in or out.pause( channel )
Pause the channel $channel.resume(channel)
Resume the channel $channel.paused()
Return true when the channel is currently paused.pause_music()
Pause the music play.resume_music()
Resume the music play.rewind_music()
Resets the music file to the beginningmusic_paused()
Return true when the music is currently paused.playing()
Return true when the channel is currently playing.playing_music ()
Return true when the music is currently playing.AUTHORS
David J. Goehrig, basic doc added by Tels <http://bloodgate.com>.SEE ALSO
perl, SDL::Music and SDL::Sound.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre