MIX_TagTrack(3)

NAME
MIX_TagTrack - Assign an arbitrary tag to a track.

SYNOPSIS
#include <SDL3_mixer/SDL_mixer.h>

bool MIX_TagTrack(MIX_Track *track, const char *tag);

DESCRIPTION
A tag can be any valid C string in UTF-8 encoding. It can be useful to group tracks in various ways. For example, everything in-game might be marked as "game", so when the user brings up the settings menu, the app can pause all tracks involved in gameplay at once, but keep background music and menu sound effects running.

A track can have as many tags as desired, until the machine runs out of memory.

It's legal to add the same tag to a track more than once; the extra attempts will report success but not change anything.

Tags can later be removed with MIX_UntagTrack().

FUNCTION PARAMETERS

track
    the track to add a tag to.

tag the tag to add.

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_UntagTrack(3)