projectm_load_preset_file

Function projectm_load_preset_file 

Source
pub unsafe extern "C" fn projectm_load_preset_file(
    instance: projectm_handle,
    filename: *const c_char,
    smooth_transition: bool,
)
Expand description

@brief Loads a preset from the given filename/URL.

Ideally, the filename should be given as a standard local path. projectM also supports loading “file://” URLs. Additionally, the special filename “idle://” can be used to load the default idle preset, displaying the “M” logo.

Other URL schemas aren’t supported and will cause a loading error.

If the preset can’t be loaded, no switch takes place and the current preset will continue to be displayed. Note that if there’s a transition in progress when calling this function, the transition will be finished immediately, even if the new preset can’t be loaded.

@param instance The projectM instance handle. @param filename The preset filename or URL to load. @param smooth_transition If true, the new preset is smoothly blended over.