SDL Wiki
(This function is part of SDL_mixer, a separate library from SDL.)


Add your own callback when a channel has finished playing.


void Mix_ChannelFinished(void (SDLCALL *channel_finished)(int channel));

Function Parameters


callback function


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.


This function is available since SDL_mixer 2.0.0.


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.