mixInit function mixer

bool mixInit()

Initialize the SDL_mixer library.

This must be successfully called once before (almost) any other SDL_mixer function can be used.

It is safe to call this multiple times; the library will only initialize once, and won't deinitialize until MIX_Quit() has been called a matching number of times. Extra attempts to init report success.

\returns true on success, false on error; call SDL_GetError() for details.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_mixer 3.0.0.

\sa MIX_Quit

extern SDL_DECLSPEC bool SDLCALL MIX_Init(void)

Implementation

bool mixInit() {
  final mixInitLookupFunction = _libMixer
      .lookupFunction<Uint8 Function(), int Function()>('MIX_Init');
  return mixInitLookupFunction() == 1;
}