libopenmpt
0.2.3532
cross-platform C and C++ library to decode tracked music files
|
Classes | |
struct | openmpt_stream_callbacks |
Stream callbacks. More... | |
struct | openmpt_module_initial_ctl |
Macros | |
#define | OPENMPT_STRING_LIBRARY_VERSION "library_version" |
#define | OPENMPT_STRING_LIBRARY_FEATURES "library_features" |
#define | OPENMPT_STRING_CORE_VERSION "core_version" |
#define | OPENMPT_STRING_BUILD "build" |
#define | OPENMPT_STRING_CREDITS "credits" |
#define | OPENMPT_STRING_CONTACT "contact" |
#define | OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL 1 |
#define | OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT 2 |
#define | OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH 3 |
#define | OPENMPT_MODULE_RENDER_VOLUMERAMPING_STRENGTH 4 |
#define | OPENMPT_MODULE_COMMAND_NOTE 0 |
#define | OPENMPT_MODULE_COMMAND_INSTRUMENT 1 |
#define | OPENMPT_MODULE_COMMAND_VOLUMEEFFECT 2 |
#define | OPENMPT_MODULE_COMMAND_EFFECT 3 |
#define | OPENMPT_MODULE_COMMAND_VOLUME 4 |
#define | OPENMPT_MODULE_COMMAND_PARAMETER 5 |
Typedefs | |
typedef size_t(* | openmpt_stream_read_func )(void *stream, void *dst, size_t bytes) |
Read bytes from stream. | |
typedef int(* | openmpt_stream_seek_func )(void *stream, int64_t offset, int whence) |
Seek stream position. | |
typedef int64_t(* | openmpt_stream_tell_func )(void *stream) |
Tell stream position. | |
typedef struct openmpt_stream_callbacks | openmpt_stream_callbacks |
Stream callbacks. | |
typedef void(* | openmpt_log_func )(const char *message, void *user) |
Logging function. | |
typedef struct openmpt_module | openmpt_module |
Opaque type representing a libopenmpt module. | |
typedef struct openmpt_module_initial_ctl | openmpt_module_initial_ctl |
Functions | |
uint32_t | openmpt_get_library_version (void) |
Get the libopenmpt version number. | |
uint32_t | openmpt_get_core_version (void) |
Get the core version number. | |
void | openmpt_free_string (const char *str) |
Free a string returned by libopenmpt. | |
const char * | openmpt_get_string (const char *key) |
Get library related metadata. | |
const char * | openmpt_get_supported_extensions (void) |
Get a list of supported file extensions. | |
int | openmpt_is_extension_supported (const char *extension) |
Query whether a file extension is supported. | |
void | openmpt_log_func_default (const char *message, void *user) |
Default logging function. | |
void | openmpt_log_func_silent (const char *message, void *user) |
Silent logging function. | |
double | openmpt_could_open_propability (openmpt_stream_callbacks stream_callbacks, void *stream, double effort, openmpt_log_func logfunc, void *user) |
Roughly scan the input stream to find out whether libopenmpt might be able to open it. | |
openmpt_module * | openmpt_module_create (openmpt_stream_callbacks stream_callbacks, void *stream, openmpt_log_func logfunc, void *user, const openmpt_module_initial_ctl *ctls) |
openmpt_module * | openmpt_module_create_from_memory (const void *filedata, size_t filesize, openmpt_log_func logfunc, void *user, const openmpt_module_initial_ctl *ctls) |
void | openmpt_module_destroy (openmpt_module *mod) |
int | openmpt_module_select_subsong (openmpt_module *mod, int32_t subsong) |
int | openmpt_module_set_repeat_count (openmpt_module *mod, int32_t repeat_count) |
int32_t | openmpt_module_get_repeat_count (openmpt_module *mod) |
double | openmpt_module_get_duration_seconds (openmpt_module *mod) |
double | openmpt_module_set_position_seconds (openmpt_module *mod, double seconds) |
double | openmpt_module_get_position_seconds (openmpt_module *mod) |
double | openmpt_module_set_position_order_row (openmpt_module *mod, int32_t order, int32_t row) |
int | openmpt_module_get_render_param (openmpt_module *mod, int param, int32_t *value) |
int | openmpt_module_set_render_param (openmpt_module *mod, int param, int32_t value) |
size_t | openmpt_module_read_mono (openmpt_module *mod, int32_t samplerate, size_t count, int16_t *mono) |
size_t | openmpt_module_read_stereo (openmpt_module *mod, int32_t samplerate, size_t count, int16_t *left, int16_t *right) |
size_t | openmpt_module_read_quad (openmpt_module *mod, int32_t samplerate, size_t count, int16_t *left, int16_t *right, int16_t *rear_left, int16_t *rear_right) |
size_t | openmpt_module_read_float_mono (openmpt_module *mod, int32_t samplerate, size_t count, float *mono) |
size_t | openmpt_module_read_float_stereo (openmpt_module *mod, int32_t samplerate, size_t count, float *left, float *right) |
size_t | openmpt_module_read_float_quad (openmpt_module *mod, int32_t samplerate, size_t count, float *left, float *right, float *rear_left, float *rear_right) |
size_t | openmpt_module_read_interleaved_stereo (openmpt_module *mod, int32_t samplerate, size_t count, int16_t *interleaved_stereo) |
size_t | openmpt_module_read_interleaved_quad (openmpt_module *mod, int32_t samplerate, size_t count, int16_t *interleaved_quad) |
size_t | openmpt_module_read_interleaved_float_stereo (openmpt_module *mod, int32_t samplerate, size_t count, float *interleaved_stereo) |
size_t | openmpt_module_read_interleaved_float_quad (openmpt_module *mod, int32_t samplerate, size_t count, float *interleaved_quad) |
const char * | openmpt_module_get_metadata_keys (openmpt_module *mod) |
const char * | openmpt_module_get_metadata (openmpt_module *mod, const char *key) |
int32_t | openmpt_module_get_current_speed (openmpt_module *mod) |
int32_t | openmpt_module_get_current_tempo (openmpt_module *mod) |
int32_t | openmpt_module_get_current_order (openmpt_module *mod) |
int32_t | openmpt_module_get_current_pattern (openmpt_module *mod) |
int32_t | openmpt_module_get_current_row (openmpt_module *mod) |
int32_t | openmpt_module_get_current_playing_channels (openmpt_module *mod) |
float | openmpt_module_get_current_channel_vu_mono (openmpt_module *mod, int32_t channel) |
float | openmpt_module_get_current_channel_vu_left (openmpt_module *mod, int32_t channel) |
float | openmpt_module_get_current_channel_vu_right (openmpt_module *mod, int32_t channel) |
float | openmpt_module_get_current_channel_vu_rear_left (openmpt_module *mod, int32_t channel) |
float | openmpt_module_get_current_channel_vu_rear_right (openmpt_module *mod, int32_t channel) |
int32_t | openmpt_module_get_num_subsongs (openmpt_module *mod) |
int32_t | openmpt_module_get_num_channels (openmpt_module *mod) |
int32_t | openmpt_module_get_num_orders (openmpt_module *mod) |
int32_t | openmpt_module_get_num_patterns (openmpt_module *mod) |
int32_t | openmpt_module_get_num_instruments (openmpt_module *mod) |
int32_t | openmpt_module_get_num_samples (openmpt_module *mod) |
const char * | openmpt_module_get_subsong_name (openmpt_module *mod, int32_t index) |
const char * | openmpt_module_get_channel_name (openmpt_module *mod, int32_t index) |
const char * | openmpt_module_get_order_name (openmpt_module *mod, int32_t index) |
const char * | openmpt_module_get_pattern_name (openmpt_module *mod, int32_t index) |
const char * | openmpt_module_get_instrument_name (openmpt_module *mod, int32_t index) |
const char * | openmpt_module_get_sample_name (openmpt_module *mod, int32_t index) |
int32_t | openmpt_module_get_order_pattern (openmpt_module *mod, int32_t order) |
int32_t | openmpt_module_get_pattern_num_rows (openmpt_module *mod, int32_t pattern) |
uint8_t | openmpt_module_get_pattern_row_channel_command (openmpt_module *mod, int32_t pattern, int32_t row, int32_t channel, int command) |
const char * | openmpt_module_format_pattern_row_channel_command (openmpt_module *mod, int32_t pattern, int32_t row, int32_t channel, int command) |
const char * | openmpt_module_highlight_pattern_row_channel_command (openmpt_module *mod, int32_t pattern, int32_t row, int32_t channel, int command) |
const char * | openmpt_module_format_pattern_row_channel (openmpt_module *mod, int32_t pattern, int32_t row, int32_t channel, size_t width, int pad) |
const char * | openmpt_module_highlight_pattern_row_channel (openmpt_module *mod, int32_t pattern, int32_t row, int32_t channel, size_t width, int pad) |
const char * | openmpt_module_get_ctls (openmpt_module *mod) |
const char * | openmpt_module_ctl_get (openmpt_module *mod, const char *ctl) |
int | openmpt_module_ctl_set (openmpt_module *mod, const char *ctl, const char *value) |
#define OPENMPT_MODULE_COMMAND_EFFECT 3 |
#define OPENMPT_MODULE_COMMAND_INSTRUMENT 1 |
#define OPENMPT_MODULE_COMMAND_NOTE 0 |
#define OPENMPT_MODULE_COMMAND_PARAMETER 5 |
#define OPENMPT_MODULE_COMMAND_VOLUME 4 |
#define OPENMPT_MODULE_COMMAND_VOLUMEEFFECT 2 |
#define OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH 3 |
#define OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL 1 |
#define OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT 2 |
#define OPENMPT_MODULE_RENDER_VOLUMERAMPING_STRENGTH 4 |
#define OPENMPT_STRING_BUILD "build" |
Return information about the current build (e.g. the build date or compiler used) from openmpt_string_get().
#define OPENMPT_STRING_CONTACT "contact" |
Return contact infromation about libopenmpt from openmpt_string_get().
#define OPENMPT_STRING_CORE_VERSION "core_version" |
Return a verbose OpenMPT core version string from openmpt_string_get().
#define OPENMPT_STRING_CREDITS "credits" |
Return all contributors from openmpt_string_get().
#define OPENMPT_STRING_LIBRARY_FEATURES "library_features" |
Return a verbose library features string from openmpt_string_get().
#define OPENMPT_STRING_LIBRARY_VERSION "library_version" |
Return a verbose library version string from openmpt_string_get().
typedef void(* openmpt_log_func)(const char *message, void *user) |
Logging function.
message | UTF-8 encoded log message. |
user | User context that was passed to openmpt_module_create(), openmpt_module_create_from_memory() or openmpt_could_open_propability(). |
typedef struct openmpt_module openmpt_module |
Opaque type representing a libopenmpt module.
typedef struct openmpt_module_initial_ctl openmpt_module_initial_ctl |
typedef struct openmpt_stream_callbacks openmpt_stream_callbacks |
Stream callbacks.
Stream callbacks used by libopenmpt for stream operations.
typedef size_t(* openmpt_stream_read_func)(void *stream, void *dst, size_t bytes) |
Read bytes from stream.
Read byte data from stream to dst.
stream | Stream to read data from |
dst | Target where to copy data. |
bytes | Number of bytes to read. |
0 | End fo stream or error. |
typedef int(* openmpt_stream_seek_func)(void *stream, int64_t offset, int whence) |
Seek stream position.
Seek to stream position offset at whence.
stream | Stream to operate on. |
offset | Offset to seek to. |
whence | SEEK_SET, SEEK_CUR, SEEK_END. See C89 documentation. |
0 | Success. |
-1 | Failure. Position gets not updated. |
typedef int64_t(* openmpt_stream_tell_func)(void *stream) |
Tell stream position.
Tell position of stream.
stream | Stream to operate on. |
-1 | Failure. Position gets not updated. |
double openmpt_could_open_propability | ( | openmpt_stream_callbacks | stream_callbacks, |
void * | stream, | ||
double | effort, | ||
openmpt_log_func | logfunc, | ||
void * | user | ||
) |
Roughly scan the input stream to find out whether libopenmpt might be able to open it.
stream_callbacks | Input stream callback operations. |
stream | Input stream to scan. |
effort | Effort to make when validating stream. Effort 0.0 does not even look at stream at all and effort 1.0 completely loads the file from stream. A lower effort requires less dat to be loaded but only gives a rough estimate answer. |
logfunc | Logging function where warning and errors are written. |
user | Logging function user context. |
void openmpt_free_string | ( | const char * | str | ) |
Free a string returned by libopenmpt.
Frees any string that got returned by libopenmpt.
uint32_t openmpt_get_core_version | ( | void | ) |
Get the core version number.
Return the OpenMPT core version number.
uint32_t openmpt_get_library_version | ( | void | ) |
Get the libopenmpt version number.
Returns the libopenmpt version number.
const char* openmpt_get_string | ( | const char * | key | ) |
Get library related metadata.
key | Key to query. |
const char* openmpt_get_supported_extensions | ( | void | ) |
Get a list of supported file extensions.
int openmpt_is_extension_supported | ( | const char * | extension | ) |
Query whether a file extension is supported.
extension | file extension to query without a leading dot. The case is ignored. |
void openmpt_log_func_default | ( | const char * | message, |
void * | user | ||
) |
Default logging function.
Default logging function that logs anything to stderr.
void openmpt_log_func_silent | ( | const char * | message, |
void * | user | ||
) |
Silent logging function.
Silent logging function that throws any log message away.
openmpt_module* openmpt_module_create | ( | openmpt_stream_callbacks | stream_callbacks, |
void * | stream, | ||
openmpt_log_func | logfunc, | ||
void * | user, | ||
const openmpt_module_initial_ctl * | ctls | ||
) |
openmpt_module* openmpt_module_create_from_memory | ( | const void * | filedata, |
size_t | filesize, | ||
openmpt_log_func | logfunc, | ||
void * | user, | ||
const openmpt_module_initial_ctl * | ctls | ||
) |
const char* openmpt_module_ctl_get | ( | openmpt_module * | mod, |
const char * | ctl | ||
) |
int openmpt_module_ctl_set | ( | openmpt_module * | mod, |
const char * | ctl, | ||
const char * | value | ||
) |
void openmpt_module_destroy | ( | openmpt_module * | mod | ) |
const char* openmpt_module_format_pattern_row_channel | ( | openmpt_module * | mod, |
int32_t | pattern, | ||
int32_t | row, | ||
int32_t | channel, | ||
size_t | width, | ||
int | pad | ||
) |
const char* openmpt_module_format_pattern_row_channel_command | ( | openmpt_module * | mod, |
int32_t | pattern, | ||
int32_t | row, | ||
int32_t | channel, | ||
int | command | ||
) |
const char* openmpt_module_get_channel_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
const char* openmpt_module_get_ctls | ( | openmpt_module * | mod | ) |
float openmpt_module_get_current_channel_vu_left | ( | openmpt_module * | mod, |
int32_t | channel | ||
) |
float openmpt_module_get_current_channel_vu_mono | ( | openmpt_module * | mod, |
int32_t | channel | ||
) |
float openmpt_module_get_current_channel_vu_rear_left | ( | openmpt_module * | mod, |
int32_t | channel | ||
) |
float openmpt_module_get_current_channel_vu_rear_right | ( | openmpt_module * | mod, |
int32_t | channel | ||
) |
float openmpt_module_get_current_channel_vu_right | ( | openmpt_module * | mod, |
int32_t | channel | ||
) |
int32_t openmpt_module_get_current_order | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_current_pattern | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_current_playing_channels | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_current_row | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_current_speed | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_current_tempo | ( | openmpt_module * | mod | ) |
double openmpt_module_get_duration_seconds | ( | openmpt_module * | mod | ) |
const char* openmpt_module_get_instrument_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
const char* openmpt_module_get_metadata | ( | openmpt_module * | mod, |
const char * | key | ||
) |
const char* openmpt_module_get_metadata_keys | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_channels | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_instruments | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_orders | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_patterns | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_samples | ( | openmpt_module * | mod | ) |
int32_t openmpt_module_get_num_subsongs | ( | openmpt_module * | mod | ) |
const char* openmpt_module_get_order_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
int32_t openmpt_module_get_order_pattern | ( | openmpt_module * | mod, |
int32_t | order | ||
) |
const char* openmpt_module_get_pattern_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
int32_t openmpt_module_get_pattern_num_rows | ( | openmpt_module * | mod, |
int32_t | pattern | ||
) |
uint8_t openmpt_module_get_pattern_row_channel_command | ( | openmpt_module * | mod, |
int32_t | pattern, | ||
int32_t | row, | ||
int32_t | channel, | ||
int | command | ||
) |
double openmpt_module_get_position_seconds | ( | openmpt_module * | mod | ) |
int openmpt_module_get_render_param | ( | openmpt_module * | mod, |
int | param, | ||
int32_t * | value | ||
) |
int32_t openmpt_module_get_repeat_count | ( | openmpt_module * | mod | ) |
const char* openmpt_module_get_sample_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
const char* openmpt_module_get_subsong_name | ( | openmpt_module * | mod, |
int32_t | index | ||
) |
const char* openmpt_module_highlight_pattern_row_channel | ( | openmpt_module * | mod, |
int32_t | pattern, | ||
int32_t | row, | ||
int32_t | channel, | ||
size_t | width, | ||
int | pad | ||
) |
const char* openmpt_module_highlight_pattern_row_channel_command | ( | openmpt_module * | mod, |
int32_t | pattern, | ||
int32_t | row, | ||
int32_t | channel, | ||
int | command | ||
) |
size_t openmpt_module_read_float_mono | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
float * | mono | ||
) |
size_t openmpt_module_read_float_quad | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
float * | left, | ||
float * | right, | ||
float * | rear_left, | ||
float * | rear_right | ||
) |
size_t openmpt_module_read_float_stereo | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
float * | left, | ||
float * | right | ||
) |
size_t openmpt_module_read_interleaved_float_quad | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
float * | interleaved_quad | ||
) |
size_t openmpt_module_read_interleaved_float_stereo | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
float * | interleaved_stereo | ||
) |
size_t openmpt_module_read_interleaved_quad | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
int16_t * | interleaved_quad | ||
) |
size_t openmpt_module_read_interleaved_stereo | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
int16_t * | interleaved_stereo | ||
) |
size_t openmpt_module_read_mono | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
int16_t * | mono | ||
) |
size_t openmpt_module_read_quad | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
int16_t * | left, | ||
int16_t * | right, | ||
int16_t * | rear_left, | ||
int16_t * | rear_right | ||
) |
size_t openmpt_module_read_stereo | ( | openmpt_module * | mod, |
int32_t | samplerate, | ||
size_t | count, | ||
int16_t * | left, | ||
int16_t * | right | ||
) |
int openmpt_module_select_subsong | ( | openmpt_module * | mod, |
int32_t | subsong | ||
) |
double openmpt_module_set_position_order_row | ( | openmpt_module * | mod, |
int32_t | order, | ||
int32_t | row | ||
) |
double openmpt_module_set_position_seconds | ( | openmpt_module * | mod, |
double | seconds | ||
) |
int openmpt_module_set_render_param | ( | openmpt_module * | mod, |
int | param, | ||
int32_t | value | ||
) |
int openmpt_module_set_repeat_count | ( | openmpt_module * | mod, |
int32_t | repeat_count | ||
) |