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


Get a list of chunk/music decoders that this build of SDL_mixer provides.


int Mix_GetNumChunkDecoders(void);

Return Value

Returns number of chunk decoders


This list 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 these functions.

Appearing in this list doesn't promise your specific audio file will decode...but it's handy to know if you have, say, a functioning Timidity install.

These return values are static, read-only data; do not modify or free it. The pointers remain valid until you call Mix_CloseAudio().


This function is available since SDL_mixer 2.0.0.

Code Examples

int i;
const int total = Mix_GetNumChunkDecoders();
for (i = 0; i < total; i++) {
    printf("Supported chunk decoder: [%s]\n", Mix_GetChunkDecoder(i));


[ 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.