MIX_PlayTag(3)

NAME
MIX_PlayTag - Start (or restart) mixing all tracks with a specific tag for playback.

SYNOPSIS
#include <SDL3_mixer/SDL_mixer.h>

bool MIX_PlayTag(MIX_Mixer *mixer, const char *tag, SDL_PropertiesID options);

DESCRIPTION
This function follows all the same rules as MIX_PlayTrack(); please refer to its documentation for the details. Unlike that function, MIX_PlayTag() operates on multiple tracks at once that have the specified tag applied, via MIX_TagTrack().

If all of your tagged tracks have different sample rates, it would make sense to use the *_MILLISECONDS_NUMBER properties in your options, instead of *_FRAMES_NUMBER, and let SDL_mixer figure out how to apply it to each track.

This function returns true if all tagged tracks are started (or restarted). If any track fails, this function returns false, but all tracks that could start will still be started even when this function reports failure.

From the point of view of the mixing process, all tracks that successfully (re)start will do so at the exact same moment.

FUNCTION PARAMETERS

mixer
    the mixer on which to look for tagged tracks.

tag the tag to use when searching for tracks.

options
    the set of options that will be applied to each track.

RETURN VALUE
Returns true on success, false on error; call SDL_GetError() for details.

THREAD SAFETY
It is safe to call this function from any thread.

AVAILABILITY
This function is available since SDL_mixer 3.0.0.

SEE ALSO
MIX_PlayTrack(3), MIX_TagTrack(3), MIX_StopTrack(3), MIX_PauseTrack(3), MIX_TrackPlaying(3)