1SDL::Mixer::Groups(3) User Contributed Perl DocumentationSDL::Mixer::Groups(3)
2
3
4

NAME

6       SDL::Mixer::Groups - Audio channel group functions
7

CATEGORY

9       Mixer
10

METHODS

12   reserve_channels
13        my $reserved = SDL::Mixer::Groups::reserve_channels( $num );
14
15       $num is the number of channels to reserve from default mixing. Zero
16       removes all reservations.
17
18       Reserve $num channels from being used when playing samples when passing
19       in "-1" as a channel number to playback functions.  The channels are
20       reserved starting from channel 0 to "$num-1". Passing in zero will
21       unreserve all channels. Normally SDL_mixer starts without any channels
22       reserved.
23
24       The following functions are affected by this setting:
25
26       ·   SDL::Mixer::Channels::play_channel
27
28       ·   SDL::Mixer::Channels::play_channel_timed
29
30       ·   SDL::Mixer::Channels::fade_in_channel
31
32       ·   SDL::Mixer::Channels::fade_in_channel_timed
33
34       Returns: The number of channels reserved. Never fails, but may return
35       less channels than you ask for, depending on the number of channels
36       previously allocated (see SDL::Mixer::Channels::allocate_channels).
37
38   group_channel
39        my $grouped = SDL::Mixer::Groups::group_channel( $channel, $group );
40
41       Add a channel to group id (any positive integer), or reset it's group
42       to the default group by passing (-1).
43
44       Returns: True(1) on success. False(0) is returned when the channel
45       specified is invalid.
46
47   group_channels
48        my $grouped = SDL::Mixer::Groups::group_channels( $from_channel, $to_channel, $group );
49
50       Add a range of channels to group id (any positive integer), or reset
51       their group to the default group by passing (-1).
52
53       Returns: The number of affected channels.
54
55   group_available
56        my $channel = SDL::Mixer::Groups::group_count( $group );
57
58       "group_newer" returns the first available channel of this group.
59
60   group_count
61        my $channels = SDL::Mixer::Groups::group_count( $group );
62
63       "group_newer" returns the number of channels in this group.
64
65   group_oldest
66        my $channel = SDL::Mixer::Groups::group_oldest( $group );
67
68       "group_newer" returns the channel number which started to play at
69       first.
70
71   group_newer
72        my $channel = SDL::Mixer::Groups::group_newer( $group );
73
74       "group_newer" returns the channel number which started to play at last.
75
76   fade_out_group
77        SDL::Mixer::Groups::fade_out_group( $group, $ms );
78
79       Fades out the channels by the given group id. The fade-out-time is
80       specified by $ms.
81
82       Returns the number of affected channels.
83
84   halt_group
85        SDL::Mixer::Groups::hals_group( $group );
86
87       Halts the channels by the given group id.
88
89       Returns 0.
90

AUTHORS

92       See "AUTHORS" in SDL.
93
94
95
96perl v5.28.0                      2018-07-15             SDL::Mixer::Groups(3)
Impressum