MIX_PlayTag(3)
π MIX_PlayTag(3) π
okay bestie, welcome to the MIX_PlayTag(3) page from the SDL_mixer3 FUNCTIONS manual, aka the vibe check you didn't know you needed πΈ
β¨ NAME β¨
MIX_PlayTag β start (or restart) mixing all the tracks that rock 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 π¦
so this one is literally the group-chat version of MIX_PlayTrack() β it follows all the same rules as that function, no cap. please go read its documentation for the deets, fr fr. the difference? MIX_PlayTrack() deals with one track, and MIX_PlayTag() is out here handling multiple tracks at once, all the ones that have the specified tag applied, via MIX_TagTrack(). icon behaviour, honestly π
if all 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 just let SDL_mixer figure out how to apply it to each track. she's smart like that, let her cook π
this function returns true if all tagged tracks are started (or restarted). if any track fails, this function returns false β but bestie, listen, all the tracks that could start will still be started even when this function reports failure. not me being honest about the partial slay π
and from the point of view of the mixing process, all tracks that successfully (re)start will do so at the exact same moment. synchronized queens, every single one π
π FUNCTION PARAMETERS π
mixerβ the mixer on which to look for tagged tracks, iykyk πtagβ the tag to use when searching for tracks, the little label that says "yes, her" πoptionsβ the set of options that will be applied to each track β¨
π RETURN VALUE π
returns true on success, false on error β and if it's erroring, call SDL_GetError() for the details, she'll spill the tea π
π§ THREAD SAFETY π§
it is safe to call this function from any thread. multitasking main character energy, periodt π
β AVAILABILITY β
this function is available since SDL_mixer 3.0.0. vintage but still iconic π«Ά
π SEE ALSO π
aaaaand that's the page, bestie!! this whole thing came to you courtesy of SDL_mixer 3.2.4 πΈ go forth and play those tagged tracks, you absolute legend β mwah πβ¨
π¦ 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