Commit | Line | Data |
d49f81db |
1 | <div class="pod"> |
2 | <!-- INDEX START --> |
3 | <h3 id="TOP">Index</h3> |
4 | |
5 | <ul><li><a href="#NAME">NAME</a></li> |
b5d537cc |
6 | <li><a href="#CATEGORY">CATEGORY</a></li> |
b5d537cc |
7 | <li><a href="#METHODS">METHODS</a> |
8 | <ul><li><a href="#reserve_channels">reserve_channels</a></li> |
9 | <li><a href="#group_channel">group_channel</a></li> |
10 | <li><a href="#group_channels">group_channels</a></li> |
11 | <li><a href="#group_available">group_available</a></li> |
12 | <li><a href="#group_count">group_count</a></li> |
13 | <li><a href="#group_oldest">group_oldest</a></li> |
14 | <li><a href="#group_newer">group_newer</a></li> |
15 | <li><a href="#fade_out_group">fade_out_group</a></li> |
c7e8d3c6 |
16 | <li><a href="#halt_group">halt_group</a></li> |
b5d537cc |
17 | </ul> |
d49f81db |
18 | </li> |
c7e8d3c6 |
19 | <li><a href="#AUTHORS">AUTHORS</a> |
20 | </li> |
d49f81db |
21 | </ul><hr /> |
22 | <!-- INDEX END --> |
23 | |
24 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
25 | <div id="NAME_CONTENT"> |
92e293d6 |
26 | <p>SDL::Mixer::Groups - Audio channel group functions</p> |
d49f81db |
27 | |
28 | </div> |
29 | <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p> |
30 | <div id="CATEGORY_CONTENT"> |
b5d537cc |
31 | <p>Mixer</p> |
32 | |
33 | </div> |
b5d537cc |
34 | <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
35 | <div id="METHODS_CONTENT"> |
36 | |
37 | </div> |
38 | <h2 id="reserve_channels">reserve_channels</h2> |
39 | <div id="reserve_channels_CONTENT"> |
92e293d6 |
40 | <pre> my $reserved = SDL::Mixer::Groups::reserve_channels( $num ); |
41 | |
42 | </pre> |
43 | <p><code>$num</code> is the number of channels to reserve from default mixing. Zero removes all reservations. </p> |
44 | <p>Reserve <code>$num</code> channels from being used when playing samples when passing in <code>-1</code> as a channel number to playback functions. |
45 | The channels are reserved starting from channel <code>0</code> to <code>$num-1</code>. Passing in zero will unreserve all channels. Normally SDL_mixer starts |
46 | without any channels reserved.</p> |
47 | <p>The following functions are affected by this setting: </p> |
48 | <ul> |
1dbe1697 |
49 | <li><a href="/SDL-Mixer-Channels.html#play_channel">SDL::Mixer::Channels::play_channel</a> </li> |
50 | <li><a href="/SDL-Mixer-Channels.html#play_channel_timed">SDL::Mixer::Channels::play_channel_timed</a> </li> |
51 | <li><a href="/SDL-Mixer-Channels.html#fade_in_channel">SDL::Mixer::Channels::fade_in_channel</a> </li> |
52 | <li><a href="/SDL-Mixer-Channels.html#fade_in_channel_timed">SDL::Mixer::Channels::fade_in_channel_timed</a></li> |
92e293d6 |
53 | </ul> |
54 | |
55 | <p>Returns: The number of channels reserved. Never fails, but may return less channels than you ask for, depending on the number of channels |
1dbe1697 |
56 | previously allocated (see <a href="/SDL-Mixer-Channels.html#allocate_channels">SDL::Mixer::Channels::allocate_channels</a>).</p> |
b5d537cc |
57 | |
58 | </div> |
59 | <h2 id="group_channel">group_channel</h2> |
60 | <div id="group_channel_CONTENT"> |
92e293d6 |
61 | <pre> my $grouped = SDL::Mixer::Groups::group_channel( $channel, $group ); |
62 | |
63 | </pre> |
64 | <p>Add a channel to group id (any positive integer), or reset it's group to the default group by passing (-1).</p> |
65 | <p>Returns: True(1) on success. False(0) is returned when the channel specified is invalid.</p> |
b5d537cc |
66 | |
67 | </div> |
68 | <h2 id="group_channels">group_channels</h2> |
69 | <div id="group_channels_CONTENT"> |
92e293d6 |
70 | <pre> my $grouped = SDL::Mixer::Groups::group_channels( $from_channel, $to_channel, $group ); |
71 | |
72 | </pre> |
73 | <p>Add a range of channels to group id (any positive integer), or reset their group to the default group by passing (-1).</p> |
74 | <p>Returns: The number of affected channels.</p> |
b5d537cc |
75 | |
76 | </div> |
77 | <h2 id="group_available">group_available</h2> |
78 | <div id="group_available_CONTENT"> |
92e293d6 |
79 | <pre> my $channel = SDL::Mixer::Groups::group_count( $group ); |
80 | |
81 | </pre> |
82 | <p><code>group_newer</code> returns the first available channel of this group.</p> |
b5d537cc |
83 | |
84 | </div> |
85 | <h2 id="group_count">group_count</h2> |
86 | <div id="group_count_CONTENT"> |
92e293d6 |
87 | <pre> my $channels = SDL::Mixer::Groups::group_count( $group ); |
88 | |
89 | </pre> |
90 | <p><code>group_newer</code> returns the number of channels in this group.</p> |
b5d537cc |
91 | |
92 | </div> |
93 | <h2 id="group_oldest">group_oldest</h2> |
94 | <div id="group_oldest_CONTENT"> |
92e293d6 |
95 | <pre> my $channel = SDL::Mixer::Groups::group_oldest( $group ); |
96 | |
97 | </pre> |
98 | <p><code>group_newer</code> returns the channel number which started to play at first.</p> |
b5d537cc |
99 | |
100 | </div> |
101 | <h2 id="group_newer">group_newer</h2> |
102 | <div id="group_newer_CONTENT"> |
92e293d6 |
103 | <pre> my $channel = SDL::Mixer::Groups::group_newer( $group ); |
104 | |
105 | </pre> |
106 | <p><code>group_newer</code> returns the channel number which started to play at last.</p> |
b5d537cc |
107 | |
108 | </div> |
109 | <h2 id="fade_out_group">fade_out_group</h2> |
110 | <div id="fade_out_group_CONTENT"> |
92e293d6 |
111 | <pre> SDL::Mixer::Groups::fade_out_group( $group, $ms ); |
112 | |
113 | </pre> |
114 | <p>Fades out the channels by the given group id. The fade-out-time is specified by <code>$ms</code>.</p> |
115 | <p>Retuns the number of affected channels.</p> |
b5d537cc |
116 | |
117 | </div> |
118 | <h2 id="halt_group">halt_group</h2> |
119 | <div id="halt_group_CONTENT"> |
92e293d6 |
120 | <pre> SDL::Mixer::Groups::hals_group( $group ); |
121 | |
122 | </pre> |
123 | <p>Halts the channels by the given group id.</p> |
124 | <p>Retuns <code>0</code>.</p> |
d49f81db |
125 | |
126 | </div> |
c7e8d3c6 |
127 | <h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
128 | <div id="AUTHORS_CONTENT"> |
1dbe1697 |
129 | <p>See <a href="/SDL.html#AUTHORS">/SDL.html#AUTHORS</a>.</p> |
c7e8d3c6 |
130 | |
131 | </div> |
d49f81db |
132 | </div> |