libopenmpt 0.5.0-pre.5+r11801 cross-platform C++ and C library to decode tracked music files

Classes | Macros | Typedefs | Functions
libopenmpt_ext C

## Classes
struct | openmpt_module_ext_interface_pattern_vis
struct | openmpt_module_ext_interface_interactive

## 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"

## 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

## Functions
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. More...
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. More...
void | openmpt_module_ext_destroy (openmpt_module_ext *mod_ext)
| Unload a previously created openmpt_module_ext from memory. More...
openmpt_module * | openmpt_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_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

typedef struct openmpt_module_ext openmpt_module_ext

Opaque type representing a libopenmpt extension module.

## ◆ openmpt_module_ext_interface_interactive

typedef struct openmpt_module_ext_interface_interactive openmpt_module_ext_interface_interactive

## ◆ openmpt_module_ext_interface_pattern_vis

typedef struct openmpt_module_ext_interface_pattern_vis 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_callbacks | Input stream callback operations.
  stream | Input stream to load the module from.
  logfunc | Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module_ext. May be NULL.
  loguser | User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)
  errfunc | Error function to define error behaviour. May be NULL.
  erruser | Error function user context. Used to pass any user-defined data associated with this module to the logging function.
  error | Pointer to an integer where an error may get stored. May be NULL.
  error_message | Pointer to a string pointer where an error message may get stored. May be NULL.
  ctls | A 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

  filedata | Data to load the module from.
  filesize | Amount of data available.
  logfunc | Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module_ext.
  loguser | User-defined data associated with this module. This value will be passed to the logging callback function (logfunc)
  errfunc | Error function to define error behaviour. May be NULL.
  erruser | Error function user context. Used to pass any user-defined data associated with this module to the logging function.
  error | Pointer to an integer where an error may get stored. May be NULL.
  error_message | Pointer to a string pointer where an error message may get stored. May be NULL.
  ctls | A 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_ext | The 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_ext | The module handle to work on.
  interface_id | The name of the extension interface to retrieve (e.g. LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS).
  interface | Appropriate 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_size | Size 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_ext | The extension module handle to convert

Returns
  An equivalent openmpt_module handle to pass to standard libopenmpt functions

Since
  0.3.0