[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4.5 Mix_GroupAvailable

int Mix_GroupAvailable(int tag)

tag
A group number Any positive numbers (including zero).
-1 will search ALL channels.

Find the first available (not playing) channel in group tag.

Returns: The channel found on success. -1 is returned when no channels in the group are available.

 
// find the first available channel in group 1
int channel;
channel=Mix_GroupAvailable(1);
if (channel==-1) {
    // no channel available...
    // perhaps search for oldest or newest channel in use...
}

See Also:
4.4.6 Mix_GroupOldest, 4.4.7 Mix_GroupNewer, 4.4.2 Mix_GroupChannel, 4.4.3 Mix_GroupChannels



This document was generated on November, 13 2009 using texi2html