mixSetTimidityCfg function

bool mixSetTimidityCfg(
  1. String? path
)

Set full path of the Timidity config file.

For example, "/etc/timidity.cfg"

This is obviously only useful if SDL_mixer is using Timidity internally to play MIDI files.

\param path path to a Timidity config file. \returns true on success or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL_mixer 3.0.0.

extern SDL_DECLSPEC bool SDLCALL Mix_SetTimidityCfg(const char *path)

Implementation

bool mixSetTimidityCfg(String? path) {
  final mixSetTimidityCfgLookupFunction = libSdl3Mixer.lookupFunction<
      Uint8 Function(Pointer<Utf8> path),
      int Function(Pointer<Utf8> path)>('Mix_SetTimidityCfg');
  final pathPointer = path != null ? path.toNativeUtf8() : nullptr;
  final result = mixSetTimidityCfgLookupFunction(pathPointer) == 1;
  calloc.free(pathPointer);
  return result;
}