MIX_GetTrackTags(3)

πŸ“¦
version 3.2.4 Β· 2 versions
, in fedora 44

✨ NAME ✨

MIX_GetTrackTags β€” bestie, this one grabs all the tags currently linked up with a track πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3_mixer/SDL_mixer.h>

char ** MIX_GetTrackTags(MIX_Track *track, int *count);

🌸 DESCRIPTION 🌸

Okay so here's the tea: this function hands you the tags that are currently associated with a track. It's giving "here's everything I got" energy. πŸ¦‹

But listen β€” tags are not provided in any guaranteed order. Like, no order at all. Not alphabetical, not insertion, not vibe-based. Do not come for me expecting a sorted list, because the order is simply not promised. Periodt. πŸ’…

πŸ’œ FUNCTION PARAMETERS πŸ’œ

  • track β€” the track you're querying, aka the main character here πŸ‘‘
  • count β€” a pointer that gets filled in with the number of tags returned. Lowkey optional, because it can be NULL 🫢

πŸ”₯ RETURN VALUE πŸ”₯

It returns an array of the tags, NULL-terminated β€” or NULL on failure 😭. If it does fail, hmu with SDL_GetError() for the deets on what went wrong.

⚠️ Important bestie alert: this is a single allocation, and you gotta free it with SDL_free() the moment you're done with it. Not using it anymore? SDL_free() it. It's the respectful thing to do. No cap. πŸ’€

🧚 THREAD SAFETY 🧚

Good news, gorgeous: it is safe to call this function from any thread 🌈. Go forth and multithread, you icon.

⭐ AVAILABILITY ⭐

This function has been available since SDL_mixer 3.0.0 β€” so if you're on anything older, sorry babe, it's not there πŸ™ˆ


And that's the whole page, bestie!! This was pulled straight from the SDL_mixer 3.2.4 manual, under the MIX_GetTrackTags(3) section of the SDL_mixer3 functions. Slay, go free your allocations πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from