mixGroupChannel function

bool mixGroupChannel(
  1. int which,
  2. int tag
)

Assign a tag to a channel.

A tag is an arbitrary number that can be assigned to several mixer channels, to form groups of channels.

If 'tag' is -1, the tag is removed (actually -1 is the tag used to represent the group of all the channels).

This function replaces the requested channel's current tag; you may only have one tag per channel.

You may not specify MAX_CHANNEL_POST for a channel.

\param which the channel to set the tag on. \param tag an arbitrary value to assign a channel. \returns true on success or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL_mixer 3.0.0.

extern SDL_DECLSPEC bool SDLCALL Mix_GroupChannel(int which, int tag)

Implementation

bool mixGroupChannel(int which, int tag) {
  final mixGroupChannelLookupFunction = libSdl3Mixer.lookupFunction<
      Uint8 Function(Int32 which, Int32 tag),
      int Function(int which, int tag)>('Mix_GroupChannel');
  return mixGroupChannelLookupFunction(which, tag) == 1;
}