mixSetTrackGroup function mixer

bool mixSetTrackGroup(
  1. Pointer<MixTrack> track,
  2. Pointer<MixGroup> group
)

Assign a track to a mixing group.

All tracks in a group are mixed together, and that output is made available to the app before it is mixed into the final output.

Tracks can only be in one group at a time, and the track and group must have been created on the same MIX_Mixer.

Setting a track to a NULL group will remove it from any app-created groups, and reassign it to the mixer's internal default group.

\param track the track to set mixing group assignment. \param group the new mixing group to assign to. May be NULL. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_mixer 3.0.0.

\sa MIX_CreateGroup \sa MIX_SetGroupPostMixCallback

extern SDL_DECLSPEC bool SDLCALL MIX_SetTrackGroup(MIX_Track *track, MIX_Group *group)

Implementation

bool mixSetTrackGroup(Pointer<MixTrack> track, Pointer<MixGroup> group) {
  final mixSetTrackGroupLookupFunction = _libMixer
      .lookupFunction<
        Uint8 Function(Pointer<MixTrack> track, Pointer<MixGroup> group),
        int Function(Pointer<MixTrack> track, Pointer<MixGroup> group)
      >('MIX_SetTrackGroup');
  return mixSetTrackGroupLookupFunction(track, group) == 1;
}