X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Mixer-Channels.html-inc;h=0c8a0ffdaaa9fc1ea07e64ff483255bb5852a715;hb=1f1aba66ccca27efdefae3c658bf3e11886a5dd0;hp=f254f2d2254d2c348c1c9178e897c1b977ce4e16;hpb=05971ac01a9556f7e769cda59ef5b419a60a0aa7;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Mixer-Channels.html-inc b/pages/SDL-Mixer-Channels.html-inc index f254f2d..0c8a0ff 100644 --- a/pages/SDL-Mixer-Channels.html-inc +++ b/pages/SDL-Mixer-Channels.html-inc @@ -167,7 +167,27 @@ current volume.

channel_finished

-

TODO

+
 SDL::Mixer::Channels::channel_finished( $callback );
+
+
+

Add your own callback when a channel has finished playing. NULL to disable callback. The callback may be called from the mixer's audio +callback or it could be called as a result of halt_channel, etc. do not call lock_audio from this callback; you will either be inside +the audio callback, or SDL_mixer will explicitly lock the audio before calling your callback.

+

Example 1:

+
 my $callback = sub{ printf("[channel_finished] callback called for channel %d\n", shift); };
+
+ SDL::Mixer::Channels::channel_finished( $callback );
+
+
+

Example 2:

+
 sub callback
+ {
+     ...
+ }
+
+ SDL::Mixer::Channels::channel_finished( \&callback );
+
+

playing