I'm developing a program using SDL2 (and all the extension libraries). One of those libraries is, of course, SDL_Mixer v2.0.2.
With SDL_Mixer, all of the examples and tutorials use the Mix_Init
function (along with a subsequent Mix_Quit
at the end of the program). From my understanding, this loads the dynamic libraries such as ogg, mpg123, etc. However, I have statically linked all the libraries into the executable (both SDL_Mixer and all the audio libraries).
Does this mean I do not need to call Mix_Init
? I ask this because the function always returns the incorrect flags (which means it failed to load). Even if it fails, or I don't even call it to begin with, I'm still able to play .mp3
, .flac
, and all the other audio formats.
Since it appears to work fine without it, I want to go without calling the function at all. At the same time though, I want to be sure what I'm doing is how its supposed to be handled and there's not some actual unhanded error that is resulting in memory leaks or whatever.