Tao.Sdl SDK Documentation

SdlMixer.Mix_GroupAvailable Method 

Get first inactive channel in group.

[Visual Basic]
Public Shared Function Mix_GroupAvailable( _
   ByVal tag As Integer _
) As Integer
[C#]
public static int Mix_GroupAvailable(
   int tag
);

Parameters

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

Return Value

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

Remarks

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

Binds to C-function in SDL_mixer.h

int Mix_GroupAvailable(int tag)
            

Example

            // 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

SdlMixer Class | Tao.Sdl Namespace | Mix_GroupOldest | Mix_GroupNewer | Mix_GroupChannel | Mix_GroupChannels