Scroll to navigation

Mix_GetSoundFonts(3) SDL_mixer3 FUNCTIONS Mix_GetSoundFonts(3)

NAME

Mix_GetSoundFonts - Get SoundFonts paths to use by supported MIDI backends.

SYNOPSIS

#include "SDL3_mixer/SDL_mixer.h"
const char* Mix_GetSoundFonts(void);

DESCRIPTION

There are several factors that determine what will be reported by this function:

• If the boolean _SDL hint_ SDL_FORCE_SOUNDFONTS is set, AND the SDL_SOUNDFONTS _environment variable_ is also set, this function will
return that environment variable regardless of whether

Mix_SetSoundFounts () was ever called.

• Otherwise, if Mix_SetSoundFonts () was successfully
called with a non-NULL path, this function will return the string passed
to that function.

• Otherwise, if the SDL_SOUNDFONTS variable is set, this function will
return that environment variable.

• Otherwise, this function will search some common locations on the
filesystem, and if it finds a SoundFont there, it will return that.

• Failing everything else, this function returns NULL.

This returns a pointer to internal (possibly read-only) memory, and it should not be modified or free'd by the caller.

RETURN VALUE

Returns semicolon-separated list of sound font paths.

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SDL_mixer 3.0.0 SDL_mixer