Function init

Wraps Mix_Init which initializes selected SDL2_mixer audio format subsystems

void init (
  bool flac = false,
  bool mod = false,
  bool mp3 = false,
  bool ogg = false,
  bool mid = false,
  bool opus = false,
  bool everything = false
) @trusted;

Parameters

NameDescription
flac selects the MIX_INIT_FLAC subsystem
mod selects the MIX_INIT_MOD subsystem
mp3 selects the MIX_INIT_MP3 subsystem
ogg selects the MIX_INIT_OGG subsystem
mid selects the MIX_INIT_FLUIDSYNTH (for SDL_mixer below 2.0.2) / MIX_INIT_MID subsystem
opus selects the MIX_INIT_OPUS subsystem (from SDL_mixer 2.0.4)
everything selects every available subsystem

Throws

dsdl2.SDLException if any selected subsystem failed to initialize

Example

dsdl2.mixer.init(everything : true);