updated docs
[sdlgit/SDL-Site.git] / pages / SDL-Mixer-Groups.html-inc
index 4984465..f35aaf9 100644 (file)
 <h3 id="TOP">Index</h3>
 
 <ul><li><a href="#NAME">NAME</a></li>
-<li><a href="#CATEGORY">CATEGORY</a>
+<li><a href="#CATEGORY">CATEGORY</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#reserve_channels">reserve_channels</a></li>
+<li><a href="#group_channel">group_channel</a></li>
+<li><a href="#group_channels">group_channels</a></li>
+<li><a href="#group_available">group_available</a></li>
+<li><a href="#group_count">group_count</a></li>
+<li><a href="#group_oldest">group_oldest</a></li>
+<li><a href="#group_newer">group_newer</a></li>
+<li><a href="#fade_out_group">fade_out_group</a></li>
+<li><a href="#halt_group">halt_group</a></li>
+</ul>
+</li>
+<li><a href="#AUTHORS">AUTHORS</a>
 </li>
 </ul><hr />
 <!-- INDEX END -->
 
 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="NAME_CONTENT">
-<p>SDL::Mixer::Groups -- SDL_Mixer groups functions and bindings</p>
+<p>SDL::Mixer::Groups - Audio channel group functions</p>
 
 </div>
 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="CATEGORY_CONTENT">
-<p>TODO, Mixer</p>
+<p>Mixer</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="reserve_channels">reserve_channels</h2>
+<div id="reserve_channels_CONTENT">
+<pre> my $reserved = SDL::Mixer::Groups::reserve_channels( $num );
+
+</pre>
+<p><code>$num</code> is the number of channels to reserve from default mixing. Zero removes all reservations. </p>
+<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. 
+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 
+without any channels reserved.</p>
+<p>The following functions are affected by this setting: </p>
+<ul>
+               <li><a href="/SDL-Mixer-Channels.html#play_channel">SDL::Mixer::Channels::play_channel</a>      </li>
+               <li><a href="/SDL-Mixer-Channels.html#play_channel_timed">SDL::Mixer::Channels::play_channel_timed</a>  </li>
+               <li><a href="/SDL-Mixer-Channels.html#fade_in_channel">SDL::Mixer::Channels::fade_in_channel</a>        </li>
+               <li><a href="/SDL-Mixer-Channels.html#fade_in_channel_timed">SDL::Mixer::Channels::fade_in_channel_timed</a></li>
+</ul>
+
+<p>Returns: The number of channels reserved. Never fails, but may return less channels than you ask for, depending on the number of channels 
+previously allocated (see <a href="/SDL-Mixer-Channels.html#allocate_channels">SDL::Mixer::Channels::allocate_channels</a>).</p>
+
+</div>
+<h2 id="group_channel">group_channel</h2>
+<div id="group_channel_CONTENT">
+<pre> my $grouped = SDL::Mixer::Groups::group_channel( $channel, $group );
+
+</pre>
+<p>Add a channel to group id (any positive integer), or reset it's group to the default group by passing (-1).</p>
+<p>Returns: True(1) on success. False(0) is returned when the channel specified is invalid.</p>
+
+</div>
+<h2 id="group_channels">group_channels</h2>
+<div id="group_channels_CONTENT">
+<pre> my $grouped = SDL::Mixer::Groups::group_channels( $from_channel, $to_channel, $group );
+
+</pre>
+<p>Add a range of channels to group id (any positive integer), or reset their group to the default group by passing (-1).</p>
+<p>Returns: The number of affected channels.</p>
+
+</div>
+<h2 id="group_available">group_available</h2>
+<div id="group_available_CONTENT">
+<pre> my $channel = SDL::Mixer::Groups::group_count( $group );
+
+</pre>
+<p><code>group_newer</code> returns the first available channel of this group.</p>
+
+</div>
+<h2 id="group_count">group_count</h2>
+<div id="group_count_CONTENT">
+<pre> my $channels = SDL::Mixer::Groups::group_count( $group );
+
+</pre>
+<p><code>group_newer</code> returns the number of channels in this group.</p>
+
+</div>
+<h2 id="group_oldest">group_oldest</h2>
+<div id="group_oldest_CONTENT">
+<pre> my $channel = SDL::Mixer::Groups::group_oldest( $group );
+
+</pre>
+<p><code>group_newer</code> returns the channel number which started to play at first.</p>
+
+</div>
+<h2 id="group_newer">group_newer</h2>
+<div id="group_newer_CONTENT">
+<pre> my $channel = SDL::Mixer::Groups::group_newer( $group );
+
+</pre>
+<p><code>group_newer</code> returns the channel number which started to play at last.</p>
+
+</div>
+<h2 id="fade_out_group">fade_out_group</h2>
+<div id="fade_out_group_CONTENT">
+<pre> SDL::Mixer::Groups::fade_out_group( $group, $ms );
+
+</pre>
+<p>Fades out the channels by the given group id. The fade-out-time is specified by <code>$ms</code>.</p>
+<p>Retuns the number of affected channels.</p>
+
+</div>
+<h2 id="halt_group">halt_group</h2>
+<div id="halt_group_CONTENT">
+<pre> SDL::Mixer::Groups::hals_group( $group );
+
+</pre>
+<p>Halts the channels by the given group id.</p>
+<p>Retuns <code>0</code>.</p>
+
+</div>
+<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHORS_CONTENT">
+<p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>
 
 </div>
 </div>
\ No newline at end of file