I've seen many tutorials for SDL_mixer but none of them use the Mix_Init function. I saw this Mix_Init function on the documentation page: https://web.archive.org/web/20210615233017/https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html
The tutorials only used a function called Mix_OpenAudio for initializing SDL_mixer.
If I call the function Mix_OpenAudio, will it automatically call the function Mix_Init? Is Mix_Init function is only some type of checker function?
Check the documentation at https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_9.html :
If you need support for compressed audio formats like flac, mp3, ogg vorbis - you need to call this function with list of formats you need. I'll result in loading required code to decompress that formats, if it isn't built into SDL_mixer. If you only use WAV you may omit
Mix_Init
call.