Mix_ChannelFinished
Name
Mix_ChannelFinished -- Add a callback for when a channel finishes its chunk.
Synopsis
#include "SDL_mixer.h" void Mix_ChannelFinished(void (*channel_finished)(int channel));
Description
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 Mix_HaltChannel(), etc. do not call SDL_LockAudio() from this callback; you will either be inside the audio callback, or SDL_mixer will explicitly lock the audio before calling your callback
Return Value
This is a void function
Example
See Also
Comments
One good use for this function is for playing sequential buffers. Start the mixer on the next chunk in your callback function, and the sound will be sequential and unbroken. The call must start the next chunk immediately, or as close to as possible, for this to be without gaps in the sound.
