SDL Wiki
(This function is part of SDL_mixer, a separate library from SDL.)


Check if a music decoder is available by name.

Header File

Defined in SDL_mixer.h


SDL_bool Mix_HasMusicDecoder(const char *name);

Function Parameters

name the decoder name to query.

Return Value

Returns SDL_TRUE if a decoder by that name is available, SDL_FALSE otherwise.


This result can change between builds AND runs of the program, if external libraries that add functionality become available. You must successfully call Mix_OpenAudio() before calling this function, as decoders are activated at device open time.

Decoder names are arbitrary but also obvious, so you have to know what you're looking for ahead of time, but usually it's the file extension in capital letters (some example names are "MOD", "MP3", "FLAC").


This function is available since SDL_mixer 3.0.0

See Also

CategoryAPI, CategoryAPIFunction

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.