</div>
<h2 id="channel_finished">channel_finished</h2>
<div id="channel_finished_CONTENT">
-<p>TODO</p>
+<pre> SDL::Mixer::Channels::channel_finished( $callback );
+
+</pre>
+<p>Add your own callback when a channel has finished playing. <code>NULL</code> to disable callback. The callback may be called from the mixer's audio
+callback or it could be called as a result of <a href="http://search.cpan.org/perldoc?halt_channel">halt_channel</a>, etc. do not call <code>lock_audio</code> from this callback; you will either be inside
+the audio callback, or SDL_mixer will explicitly lock the audio before calling your callback.</p>
+<p>Example 1:</p>
+<pre> my $callback = sub{ printf("[channel_finished] callback called for channel %d\n", shift); };
+
+ SDL::Mixer::Channels::channel_finished( $callback );
+
+</pre>
+<p>Example 2:</p>
+<pre> sub callback
+ {
+ ...
+ }
+
+ SDL::Mixer::Channels::channel_finished( \&callback );
+
+</pre>
</div>
<h2 id="playing">playing</h2>
</div>
<h2 id="load_MUS">load_MUS</h2>
<div id="load_MUS_CONTENT">
+<pre> my $music = SDL::Mixer::Music::load_MUS( $file );
+
+</pre>
+<p><code>load_MUS</code> loads a music file into a <code>SDL::Music::MixMusic</code> structure. This can be passed to <a href="http://search.cpan.org/perldoc?play_music">play_music</a>.</p>
</div>
<h2 id="free_music">free_music</h2>
</div>
<h2 id="play_music">play_music</h2>
<div id="play_music_CONTENT">
+<pre> my $play_music = SDL::Mixer::Music::play_music( $mix_music, $repeats );
+
+</pre>
+<p><code>play_music</code> plays a given <code>SDL::Mixer::MixMusic</code>.
+Passing -1 to <code>$repeats</code> will loop the music infinitely. </p>
+<p>Example:</p>
+<pre> my $music = SDL::Mixer::Music::load_MUS( 'music.mp3' );
+
+ unless(SDL::Mixer::Music::play_music($sample_music, -1))
+ {
+ print("Something went wrong!\n");
+ }
+
+
+
+
+</pre>
</div>
<h2 id="fade_in_music">fade_in_music</h2>
</div>
<h2 id="halt_music">halt_music</h2>
<div id="halt_music_CONTENT">
+<pre> SDL::Mixer::Music::halt_music();
+
+</pre>
+<p>Halts the music.</p>
</div>
<h2 id="fade_out_music">fade_out_music</h2>
</div>
<h2 id="fading_music">fading_music</h2>
<div id="fading_music_CONTENT">
+<pre> my $fading_music = SDL::Mixer::Channels::fading_music();
+
+</pre>
+<p>Returns one of the following:</p>
+<ul>
+ <li>MIX_NO_FADING </li>
+ <li>MIX_FADING_OUT </li>
+ <li>MIX_FADING_IN</li>
+</ul>
+
</div>
<h2 id="pause_music">pause_music</h2>
<div id="pause_music_CONTENT">
+<pre> SDL::Mixer::Music::pause_music();
+
+</pre>
+<p>Pauses the music.</p>
</div>
<h2 id="resume_music">resume_music</h2>
<div id="resume_music_CONTENT">
+<pre>
+
+
+ SDL::Mixer::Music::resume_music();
+
+</pre>
+<p>Resumes the music.</p>
</div>
<h2 id="rewind_music">rewind_music</h2>
<div id="rewind_music_CONTENT">
+<pre>
+
+
+ SDL::Mixer::Music::rewind_music();
+
+</pre>
+<p>Rewinds the music.</p>
</div>
<h2 id="paused_music">paused_music</h2>
<div id="paused_music_CONTENT">
+<pre> my $paused = SDL::Mixer::Music::paused_music();
+
+</pre>
+<p>Returns <code>1</code> if the music is paused, otherwise <code>0</code>.</p>
</div>
<h2 id="playing_music">playing_music</h2>
<div id="playing_music_CONTENT">
+<pre> my $playing_music = SDL::Mixer::Music::playing_music();
+
+</pre>
+<p>Returns <code>1</code> if the music is playing sound, otherwise <code>0</code>. It does'nt check if the music is paused.</p>
</div>
</div>
\ No newline at end of file