openmpt_module_create_from_memory2

Function openmpt_module_create_from_memory2 

Source
pub unsafe extern "C" fn openmpt_module_create_from_memory2(
    filedata: *const c_void,
    filesize: usize,
    logfunc: openmpt_log_func,
    loguser: *mut c_void,
    errfunc: openmpt_error_func,
    erruser: *mut c_void,
    error: *mut c_int,
    error_message: *mut *const c_char,
    ctls: *const openmpt_module_initial_ctl,
) -> *mut openmpt_module
Expand description

\brief Construct an openmpt_module

\param filedata Data to load the module from. \param filesize Amount of data available. \param logfunc Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module. \param loguser User-defined data associated with this module. This value will be passed to the logging callback function (logfunc) \param errfunc Error function to define error behaviour. May be NULL. \param erruser Error function user context. Used to pass any user-defined data associated with this module to the logging function. \param error Pointer to an integer where an error may get stored. May be NULL. \param error_message Pointer to a string pointer where an error message may get stored. May be NULL. \param ctls A map of initial ctl values. See openmpt_module_get_ctls() \return A pointer to the constructed openmpt_module, or NULL on failure. \remarks The input data can be discarded after an openmpt_module has been constructed successfully. \sa \ref libopenmpt_c_fileio \since 0.3.0