Mix_Playing
Name
Mix_Playing -- Check the status of a specific channel.
Synopsis
#include "SDL_mixer.h" int Mix_Playing(int which);
Description
Mix_Playing tells you if channel is playing, or not.
Parameter
- channel
- Channel to test whether it is playing or not.
- -1 will tell you how many channels are playing.
Return Value
Returns zero if the channel is not playing. Otherwise if you passed in -1, the number of channels playing is returned. If you passed in a specific channel, then 1 is returned if it is playing.
Note: Does not check if the channel has been paused.
Example
// check how many channels are playing samples
printf("%d channels are playing\n", Mix_Playing(-1));
