libopenmpt 0.7.11+release
cross-platform C++ and C library to decode tracked music files
libopenmpt_ext C

Classes

struct  openmpt_module_ext_interface_pattern_vis
 
struct  openmpt_module_ext_interface_interactive
 
struct  openmpt_module_ext_interface_interactive2
 
struct  openmpt_module_ext_interface_interactive3
 

Macros

#define LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS   "pattern_vis"
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_UNKNOWN   0
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GENERAL   1
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GLOBAL   2
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_VOLUME   3
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PANNING   4
 
#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PITCH   5
 
#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE   "interactive"
 
#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE2   "interactive2"
 
#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE3   "interactive3"
 

Typedefs

typedef struct openmpt_module_ext openmpt_module_ext
 Opaque type representing a libopenmpt extension module. More...
 
typedef struct openmpt_module_ext_interface_pattern_vis openmpt_module_ext_interface_pattern_vis
 
typedef struct openmpt_module_ext_interface_interactive openmpt_module_ext_interface_interactive
 
typedef struct openmpt_module_ext_interface_interactive2 openmpt_module_ext_interface_interactive2
 
typedef struct openmpt_module_ext_interface_interactive3 openmpt_module_ext_interface_interactive3
 

Functions

openmpt_module_extopenmpt_module_ext_create (openmpt_stream_callbacks stream_callbacks, void *stream, openmpt_log_func logfunc, void *loguser, openmpt_error_func errfunc, void *erruser, int *error, const char **error_message, const openmpt_module_initial_ctl *ctls)
 Construct an openmpt_module_ext. More...
 
openmpt_module_extopenmpt_module_ext_create_from_memory (const void *filedata, size_t filesize, openmpt_log_func logfunc, void *loguser, openmpt_error_func errfunc, void *erruser, int *error, const char **error_message, const openmpt_module_initial_ctl *ctls)
 Construct an openmpt_module_ext. More...
 
void openmpt_module_ext_destroy (openmpt_module_ext *mod_ext)
 Unload a previously created openmpt_module_ext from memory. More...
 
openmpt_moduleopenmpt_module_ext_get_module (openmpt_module_ext *mod_ext)
 Retrieve the openmpt_module handle from an openmpt_module_ext handle. More...
 
int openmpt_module_ext_get_interface (openmpt_module_ext *mod_ext, const char *interface_id, void *interface, size_t interface_size)
 

Detailed Description

Macro Definition Documentation

◆ LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE

#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE   "interactive"

◆ LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE2

#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE2   "interactive2"

◆ LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE3

#define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE3   "interactive3"

◆ LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS

#define LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS   "pattern_vis"

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GENERAL

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GENERAL   1

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GLOBAL

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_GLOBAL   2

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PANNING

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PANNING   4

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PITCH

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_PITCH   5

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_UNKNOWN

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_UNKNOWN   0

Pattern command type

◆ OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_VOLUME

#define OPENMPT_MODULE_EXT_INTERFACE_PATTERN_VIS_EFFECT_TYPE_VOLUME   3

Typedef Documentation

◆ openmpt_module_ext

Opaque type representing a libopenmpt extension module.

◆ openmpt_module_ext_interface_interactive

◆ openmpt_module_ext_interface_interactive2

◆ openmpt_module_ext_interface_interactive3

◆ openmpt_module_ext_interface_pattern_vis

Function Documentation

◆ openmpt_module_ext_create()

openmpt_module_ext * openmpt_module_ext_create ( openmpt_stream_callbacks  stream_callbacks,
void *  stream,
openmpt_log_func  logfunc,
void *  loguser,
openmpt_error_func  errfunc,
void *  erruser,
int *  error,
const char **  error_message,
const openmpt_module_initial_ctl ctls 
)

Construct an openmpt_module_ext.

Parameters
stream_callbacksInput stream callback operations.
streamInput stream to load the module from.
logfuncLogging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module_ext. May be NULL.
loguserUser-defined data associated with this module. This value will be passed to the logging callback function (logfunc)
errfuncError function to define error behaviour. May be NULL.
erruserError function user context. Used to pass any user-defined data associated with this module to the logging function.
errorPointer to an integer where an error may get stored. May be NULL.
error_messagePointer to a string pointer where an error message may get stored. May be NULL.
ctlsA map of initial ctl values, see openmpt_module_get_ctls.
Returns
A pointer to the constructed openmpt_module_ext, or NULL on failure.
Remarks
The input data can be discarded after an openmpt_module_ext has been constructed successfully.
See also
openmpt_stream_callbacks
File I/O
Since
0.3.0

◆ openmpt_module_ext_create_from_memory()

openmpt_module_ext * openmpt_module_ext_create_from_memory ( const void *  filedata,
size_t  filesize,
openmpt_log_func  logfunc,
void *  loguser,
openmpt_error_func  errfunc,
void *  erruser,
int *  error,
const char **  error_message,
const openmpt_module_initial_ctl ctls 
)

Construct an openmpt_module_ext.

Parameters
filedataData to load the module from.
filesizeAmount of data available.
logfuncLogging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module_ext.
loguserUser-defined data associated with this module. This value will be passed to the logging callback function (logfunc)
errfuncError function to define error behaviour. May be NULL.
erruserError function user context. Used to pass any user-defined data associated with this module to the logging function.
errorPointer to an integer where an error may get stored. May be NULL.
error_messagePointer to a string pointer where an error message may get stored. May be NULL.
ctlsA map of initial ctl values, see openmpt_module_get_ctls.
Returns
A pointer to the constructed openmpt_module_ext, or NULL on failure.
Remarks
The input data can be discarded after an openmpt_module_ext has been constructed successfully.
See also
File I/O
Since
0.3.0

◆ openmpt_module_ext_destroy()

void openmpt_module_ext_destroy ( openmpt_module_ext mod_ext)

Unload a previously created openmpt_module_ext from memory.

Parameters
mod_extThe module to unload.

◆ openmpt_module_ext_get_interface()

int openmpt_module_ext_get_interface ( openmpt_module_ext mod_ext,
const char *  interface_id,
void *  interface,
size_t  interface_size 
)

Retrieve a libopenmpt extension.

Parameters
mod_extThe module handle to work on.
interface_idThe name of the extension interface to retrieve (e.g. LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS).
interfaceAppropriate structure of interface function pointers which is to be filled by this function (e.g. a pointer to a openmpt_module_ext_interface_pattern_vis structure).
interface_sizeSize of the interface's structure of function pointers (e.g. sizeof(openmpt_module_ext_interface_pattern_vis)).
Returns
1 on success, 0 if the interface was not found.
Since
0.3.0

◆ openmpt_module_ext_get_module()

openmpt_module * openmpt_module_ext_get_module ( openmpt_module_ext mod_ext)

Retrieve the openmpt_module handle from an openmpt_module_ext handle.

Parameters
mod_extThe extension module handle to convert
Returns
An equivalent openmpt_module handle to pass to standard libopenmpt functions
Since
0.3.0