123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- #ifndef LIBOPENMPT_EXT_H
- #define LIBOPENMPT_EXT_H
- #include "libopenmpt_config.h"
- #include "libopenmpt.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct openmpt_module_ext openmpt_module_ext
- LIBOPENMPT_API 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 )
- LIBOPENMPT_API 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 )
- LIBOPENMPT_API void openmpt_module_ext_destroy( openmpt_module_ext * mod_ext )
- LIBOPENMPT_API openmpt_module * openmpt_module_ext_get_module( openmpt_module_ext * mod_ext )
- LIBOPENMPT_API int openmpt_module_ext_get_interface( openmpt_module_ext * mod_ext, const char * interface_id, void * interface, size_t interface_size )
- #ifndef LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS
- #define LIBOPENMPT_EXT_C_INTERFACE_PATTERN_VIS "pattern_vis"
- #endif
- #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
- typedef struct openmpt_module_ext_interface_pattern_vis {
-
- int ( * get_pattern_row_channel_volume_effect_type ) ( openmpt_module_ext * mod_ext, int32_t pattern, int32_t row, int32_t channel )
-
- int ( * get_pattern_row_channel_effect_type ) ( openmpt_module_ext * mod_ext, int32_t pattern, int32_t row, int32_t channel )
- } openmpt_module_ext_interface_pattern_vis
- #ifndef LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE
- #define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE "interactive"
- #endif
- typedef struct openmpt_module_ext_interface_interactive {
-
- int ( * set_current_speed ) ( openmpt_module_ext * mod_ext, int32_t speed )
-
- int ( * set_current_tempo ) ( openmpt_module_ext * mod_ext, int32_t tempo )
-
- int ( * set_tempo_factor ) ( openmpt_module_ext * mod_ext, double factor )
-
- double ( * get_tempo_factor ) ( openmpt_module_ext * mod_ext )
-
- int ( * set_pitch_factor ) ( openmpt_module_ext * mod_ext, double factor )
-
- double ( * get_pitch_factor ) ( openmpt_module_ext * mod_ext )
-
- int ( * set_global_volume ) ( openmpt_module_ext * mod_ext, double volume )
-
- double ( * get_global_volume ) ( openmpt_module_ext * mod_ext )
-
- int ( * set_channel_volume ) ( openmpt_module_ext * mod_ext, int32_t channel, double volume )
-
- double ( * get_channel_volume ) ( openmpt_module_ext * mod_ext, int32_t channel )
-
- int ( * set_channel_mute_status ) ( openmpt_module_ext * mod_ext, int32_t channel, int mute )
-
- int ( * get_channel_mute_status ) ( openmpt_module_ext * mod_ext, int32_t channel )
-
- int ( * set_instrument_mute_status ) ( openmpt_module_ext * mod_ext, int32_t instrument, int mute )
-
- int ( * get_instrument_mute_status ) ( openmpt_module_ext * mod_ext, int32_t instrument )
-
- int32_t ( * play_note ) ( openmpt_module_ext * mod_ext, int32_t instrument, int32_t note, double volume, double panning )
-
- int ( * stop_note ) ( openmpt_module_ext * mod_ext, int32_t channel )
- } openmpt_module_ext_interface_interactive
- #ifndef LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE2
- #define LIBOPENMPT_EXT_C_INTERFACE_INTERACTIVE2 "interactive2"
- #endif
- typedef struct openmpt_module_ext_interface_interactive2 {
-
-
- int ( *note_off ) ( openmpt_module_ext * mod_ext, int32_t channel )
-
-
- int ( *note_fade ) ( openmpt_module_ext * mod_ext, int32_t channel )
-
-
- int ( *set_channel_panning) ( openmpt_module_ext * mod_ext, int32_t channel, double panning )
-
-
- double (*get_channel_panning) ( openmpt_module_ext * mod_ext, int32_t channel )
-
-
-
- int ( *set_note_finetune) ( openmpt_module_ext * mod_ext, int32_t channel, double finetune )
-
-
- double (*get_note_finetune) ( openmpt_module_ext * mod_ext, int32_t channel )
- } openmpt_module_ext_interface_interactive2
- #ifdef __cplusplus
- }
- #endif
- #endif
|