MIX_GetNumAudioDecoders(3)
β¨ 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 π
MIX_GetAudioDecoder(3)β the one you loop with, they're a duo fr fr π
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
- 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