MIX_GetNumAudioDecoders(3)

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

✨ MIX_GetNumAudioDecoders(3) ✨

okay bestie, welcome to the SDL_mixer3 FUNCTIONS corner of the manual πŸ’– this one's a lil function that lives in SDL_mixer3, and it's giving very "count my stuff for me" energy. no cap.


πŸŽ€ NAME πŸŽ€

MIX_GetNumAudioDecoders β€” reports the number of audio decoders available for use πŸ¦‹


🌸 SYNOPSIS 🌸

#include <SDL3_mixer/SDL_mixer.h>

int MIX_GetNumAudioDecoders(void);

like, that's it. that's the whole vibe. no arguments, no drama πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so, what even is an audio decoder? bestie, an audio decoder is the lil icon that turns specific audio file formats into usable PCM data. like, imagine there's a lil MP3 decoder doing its thing, or a WAV decoder, etc etc. and SDL_mixer probably has several decoders built in already, because of course it does πŸ’œ

the return value can be used to call MIX_GetAudioDecoder() in a loop. so you get the count, then you go shopping through them one by one. iconic behaviour honestly.

and here's the important lil fact: the number of decoders available is decided during MIX_Init() and does not change until the library is deinitialized. so don't go expecting it to shift on you mid-run, it's loyal like that 🫢


⭐ RETURN VALUE ⭐

returns the number of decoders available. a whole number, just for you πŸ“


πŸ”₯ THREAD SAFETY πŸ”₯

it is safe to call this function from any thread. so go ahead, call it from all of them, it can handle the attention πŸ’…βœ¨


🌈 AVAILABILITY 🌈

this function is available since SDL_mixer 3.0.0. old enough to have main character energy at this point πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie, no notes πŸ’€

k bye, this was SDL_mixer version 3.2.4, brought to you by the fine folks behind the SDL_mixer manual, dated when it was dated πŸŽ€βœ¨ mwah πŸ’‹

πŸ“¦ where this page comes from