MIX_TagTrack(3)
π MIX_TagTrack(3) π
okay bestie, welcome to the SDL_mixer3 girlies' corner of the manual β¨ this one lives in the SDL_mixer3 FUNCTIONS section and it's literally so cute, let's go π
β¨ NAME β¨
MIX_TagTrack β slap an arbitrary tag onto a track, no cap π·οΈ
πΈ SYNOPSIS πΈ
#include <SDL3_mixer/SDL_mixer.h>
bool MIX_TagTrack(MIX_Track *track, const char *tag);
π¦ DESCRIPTION π¦
ok so a tag can be any valid C string in UTF-8 encoding. that's it. that's the rule π
and likeβ¦ why would you even want that? because grouping tracks is lowkey iconic, that's why. picture this: everything in-game gets tagged "game", and then when the user pops open the settings menu, your app can pause every single track involved in gameplay all at once β while background music and menu sound effects just keep vibing πΆβ¨ main character energy fr fr.
a track can have as many tags as desired, until the machine runs out of memory π (we don't talk about that part).
it's also totally legal to add the same tag to a track more than once π«Ά the extra attempts will report success but won't actually change anything. so like, no harm, no foul, no drama.
and when you're done with a tag? tags can later be removed with MIX_UntagTrack() π§Ήβ¨
π FUNCTION PARAMETERS π
trackβ the track you're adding a tag to π―tagβ the tag you're adding π·οΈ
β RETURN VALUE β
returns true on success, false on error π and if it's an error you gotta call SDL_GetError() for the details, iykyk π
π₯ THREAD SAFETY π₯
it is safe to call this function from any thread. go off, multithreaded queen πβ¨
π AVAILABILITY π
this function is available since SDL_mixer 3.0.0 π so if you're on anything olderβ¦ bestie. upgrade. π
π SEE ALSO π
and that's the whole page, periodt π this masterpiece was brought to you by SDL_mixer 3.2.4 β mwah, love u, go tag some tracks π«Άπβ¨
π¦ where this page comes from
- fedora 44: SDL3_mixer-doc 3.2.4-3.fc44 Β· Zlib AND (GPL-2.0-or-later OR LGPL-2.0-or-later)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms