Scroll to navigation

MIX_Init(3) SDL_mixer3 FUNCTIONS MIX_Init(3)

NAME

MIX_Init - Initialize the SDL_mixer library.

SYNOPSIS

#include <SDL3_mixer/SDL_mixer.h>
bool MIX_Init(void);

DESCRIPTION

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.

RETURN VALUE

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

THREAD SAFETY

This function is not thread safe.

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SEE ALSO

MIX_Quit(3)

SDL_mixer 3.2.0 SDL_mixer