mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
oslibs: updated libxmp and libmikmod builds.
This commit is contained in:
parent
75e9bc385f
commit
b60dae8acd
10 changed files with 120 additions and 96 deletions
|
@ -26,11 +26,17 @@ extern "C" {
|
|||
#elif defined(__SUNPRO_C) && defined(XMP_LDSCOPE_GLOBAL)
|
||||
# define LIBXMP_EXPORT __global
|
||||
#elif defined(EMSCRIPTEN)
|
||||
# include <emscripten.h>
|
||||
# define LIBXMP_EXPORT EMSCRIPTEN_KEEPALIVE
|
||||
# define LIBXMP_EXPORT_VAR
|
||||
#else
|
||||
# define LIBXMP_EXPORT
|
||||
#endif
|
||||
|
||||
#if !defined (LIBXMP_EXPORT_VAR)
|
||||
# define LIBXMP_EXPORT_VAR LIBXMP_EXPORT
|
||||
#endif
|
||||
|
||||
#define XMP_NAME_SIZE 64 /* Size of module name and type */
|
||||
|
||||
#define XMP_KEY_OFF 0x81 /* Note number for key off event */
|
||||
|
@ -171,20 +177,6 @@ struct xmp_envelope {
|
|||
short data[XMP_MAX_ENV_POINTS * 2];
|
||||
};
|
||||
|
||||
struct xmp_instrument {
|
||||
char name[32]; /* Instrument name */
|
||||
int vol; /* Instrument volume */
|
||||
int nsm; /* Number of samples */
|
||||
int rls; /* Release (fadeout) */
|
||||
struct xmp_envelope aei; /* Amplitude envelope info */
|
||||
struct xmp_envelope pei; /* Pan envelope info */
|
||||
struct xmp_envelope fei; /* Frequency envelope info */
|
||||
|
||||
struct {
|
||||
unsigned char ins; /* Instrument number for each key */
|
||||
signed char xpo; /* Instrument transpose for each key */
|
||||
} map[XMP_MAX_KEYS];
|
||||
|
||||
struct xmp_subinstrument {
|
||||
int vol; /* Default volume */
|
||||
int gvl; /* Global volume */
|
||||
|
@ -213,7 +205,23 @@ struct xmp_instrument {
|
|||
int dca; /* Duplicate check action */
|
||||
int ifc; /* Initial filter cutoff */
|
||||
int ifr; /* Initial filter resonance */
|
||||
} *sub;
|
||||
};
|
||||
|
||||
struct xmp_instrument {
|
||||
char name[32]; /* Instrument name */
|
||||
int vol; /* Instrument volume */
|
||||
int nsm; /* Number of samples */
|
||||
int rls; /* Release (fadeout) */
|
||||
struct xmp_envelope aei; /* Amplitude envelope info */
|
||||
struct xmp_envelope pei; /* Pan envelope info */
|
||||
struct xmp_envelope fei; /* Frequency envelope info */
|
||||
|
||||
struct {
|
||||
unsigned char ins; /* Instrument number for each key */
|
||||
signed char xpo; /* Instrument transpose for each key */
|
||||
} map[XMP_MAX_KEYS];
|
||||
|
||||
struct xmp_subinstrument *sub;
|
||||
|
||||
void *extra; /* Extra fields */
|
||||
};
|
||||
|
@ -276,6 +284,19 @@ struct xmp_module_info {
|
|||
struct xmp_sequence *seq_data; /* Pointer to sequence data */
|
||||
};
|
||||
|
||||
struct xmp_channel_info {
|
||||
unsigned int period; /* Sample period (* 4096) */
|
||||
unsigned int position; /* Sample position */
|
||||
short pitchbend; /* Linear bend from base note*/
|
||||
unsigned char note; /* Current base note number */
|
||||
unsigned char instrument; /* Current instrument number */
|
||||
unsigned char sample; /* Current sample number */
|
||||
unsigned char volume; /* Current volume */
|
||||
unsigned char pan; /* Current stereo pan */
|
||||
unsigned char reserved; /* Reserved */
|
||||
struct xmp_event event; /* Current track event */
|
||||
};
|
||||
|
||||
struct xmp_frame_info { /* Current frame information */
|
||||
int pos; /* Current position */
|
||||
int pattern; /* Current pattern */
|
||||
|
@ -296,30 +317,19 @@ struct xmp_frame_info { /* Current frame information */
|
|||
int virt_used; /* Used virtual channels */
|
||||
int sequence; /* Current sequence */
|
||||
|
||||
struct xmp_channel_info { /* Current channel information */
|
||||
unsigned int period; /* Sample period (* 4096) */
|
||||
unsigned int position; /* Sample position */
|
||||
short pitchbend; /* Linear bend from base note*/
|
||||
unsigned char note; /* Current base note number */
|
||||
unsigned char instrument; /* Current instrument number */
|
||||
unsigned char sample; /* Current sample number */
|
||||
unsigned char volume; /* Current volume */
|
||||
unsigned char pan; /* Current stereo pan */
|
||||
unsigned char reserved; /* Reserved */
|
||||
struct xmp_event event; /* Current track event */
|
||||
} channel_info[XMP_MAX_CHANNELS];
|
||||
struct xmp_channel_info channel_info[XMP_MAX_CHANNELS]; /* Current channel information */
|
||||
};
|
||||
|
||||
|
||||
typedef char *xmp_context;
|
||||
|
||||
LIBXMP_EXPORT extern const char *xmp_version;
|
||||
LIBXMP_EXPORT extern const unsigned int xmp_vercode;
|
||||
LIBXMP_EXPORT_VAR extern const char *xmp_version;
|
||||
LIBXMP_EXPORT_VAR extern const unsigned int xmp_vercode;
|
||||
|
||||
LIBXMP_EXPORT xmp_context xmp_create_context (void);
|
||||
LIBXMP_EXPORT void xmp_free_context (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_test_module (char *, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_load_module (xmp_context, char *);
|
||||
LIBXMP_EXPORT int xmp_test_module (const char *, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_load_module (xmp_context, const char *);
|
||||
LIBXMP_EXPORT void xmp_scan_module (xmp_context);
|
||||
LIBXMP_EXPORT void xmp_release_module (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_start_player (xmp_context, int, int);
|
||||
|
@ -329,7 +339,7 @@ LIBXMP_EXPORT void xmp_get_frame_info (xmp_context, struct xmp_frame_inf
|
|||
LIBXMP_EXPORT void xmp_end_player (xmp_context);
|
||||
LIBXMP_EXPORT void xmp_inject_event (xmp_context, int, struct xmp_event *);
|
||||
LIBXMP_EXPORT void xmp_get_module_info (xmp_context, struct xmp_module_info *);
|
||||
LIBXMP_EXPORT char **xmp_get_format_list (void);
|
||||
LIBXMP_EXPORT const char *const *xmp_get_format_list (void);
|
||||
LIBXMP_EXPORT int xmp_next_position (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_prev_position (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_set_position (xmp_context, int);
|
||||
|
@ -342,9 +352,11 @@ LIBXMP_EXPORT int xmp_channel_mute (xmp_context, int, int);
|
|||
LIBXMP_EXPORT int xmp_channel_vol (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_set_player (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_get_player (xmp_context, int);
|
||||
LIBXMP_EXPORT int xmp_set_instrument_path (xmp_context, char *);
|
||||
LIBXMP_EXPORT int xmp_set_instrument_path (xmp_context, const char *);
|
||||
LIBXMP_EXPORT int xmp_load_module_from_memory (xmp_context, void *, long);
|
||||
LIBXMP_EXPORT int xmp_load_module_from_file (xmp_context, void *, long);
|
||||
LIBXMP_EXPORT int xmp_test_module_from_memory (void *, long, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_test_module_from_file (void *, struct xmp_test_info *);
|
||||
|
||||
/* External sample mixer API */
|
||||
LIBXMP_EXPORT int xmp_start_smix (xmp_context, int, int);
|
||||
|
@ -352,7 +364,7 @@ LIBXMP_EXPORT void xmp_end_smix (xmp_context);
|
|||
LIBXMP_EXPORT int xmp_smix_play_instrument(xmp_context, int, int, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_play_sample (xmp_context, int, int, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_channel_pan (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_load_sample (xmp_context, int, char *);
|
||||
LIBXMP_EXPORT int xmp_smix_load_sample (xmp_context, int, const char *);
|
||||
LIBXMP_EXPORT int xmp_smix_release_sample (xmp_context, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -26,11 +26,17 @@ extern "C" {
|
|||
#elif defined(__SUNPRO_C) && defined(XMP_LDSCOPE_GLOBAL)
|
||||
# define LIBXMP_EXPORT __global
|
||||
#elif defined(EMSCRIPTEN)
|
||||
# include <emscripten.h>
|
||||
# define LIBXMP_EXPORT EMSCRIPTEN_KEEPALIVE
|
||||
# define LIBXMP_EXPORT_VAR
|
||||
#else
|
||||
# define LIBXMP_EXPORT
|
||||
#endif
|
||||
|
||||
#if !defined (LIBXMP_EXPORT_VAR)
|
||||
# define LIBXMP_EXPORT_VAR LIBXMP_EXPORT
|
||||
#endif
|
||||
|
||||
#define XMP_NAME_SIZE 64 /* Size of module name and type */
|
||||
|
||||
#define XMP_KEY_OFF 0x81 /* Note number for key off event */
|
||||
|
@ -171,20 +177,6 @@ struct xmp_envelope {
|
|||
short data[XMP_MAX_ENV_POINTS * 2];
|
||||
};
|
||||
|
||||
struct xmp_instrument {
|
||||
char name[32]; /* Instrument name */
|
||||
int vol; /* Instrument volume */
|
||||
int nsm; /* Number of samples */
|
||||
int rls; /* Release (fadeout) */
|
||||
struct xmp_envelope aei; /* Amplitude envelope info */
|
||||
struct xmp_envelope pei; /* Pan envelope info */
|
||||
struct xmp_envelope fei; /* Frequency envelope info */
|
||||
|
||||
struct {
|
||||
unsigned char ins; /* Instrument number for each key */
|
||||
signed char xpo; /* Instrument transpose for each key */
|
||||
} map[XMP_MAX_KEYS];
|
||||
|
||||
struct xmp_subinstrument {
|
||||
int vol; /* Default volume */
|
||||
int gvl; /* Global volume */
|
||||
|
@ -213,7 +205,23 @@ struct xmp_instrument {
|
|||
int dca; /* Duplicate check action */
|
||||
int ifc; /* Initial filter cutoff */
|
||||
int ifr; /* Initial filter resonance */
|
||||
} *sub;
|
||||
};
|
||||
|
||||
struct xmp_instrument {
|
||||
char name[32]; /* Instrument name */
|
||||
int vol; /* Instrument volume */
|
||||
int nsm; /* Number of samples */
|
||||
int rls; /* Release (fadeout) */
|
||||
struct xmp_envelope aei; /* Amplitude envelope info */
|
||||
struct xmp_envelope pei; /* Pan envelope info */
|
||||
struct xmp_envelope fei; /* Frequency envelope info */
|
||||
|
||||
struct {
|
||||
unsigned char ins; /* Instrument number for each key */
|
||||
signed char xpo; /* Instrument transpose for each key */
|
||||
} map[XMP_MAX_KEYS];
|
||||
|
||||
struct xmp_subinstrument *sub;
|
||||
|
||||
void *extra; /* Extra fields */
|
||||
};
|
||||
|
@ -276,6 +284,19 @@ struct xmp_module_info {
|
|||
struct xmp_sequence *seq_data; /* Pointer to sequence data */
|
||||
};
|
||||
|
||||
struct xmp_channel_info {
|
||||
unsigned int period; /* Sample period (* 4096) */
|
||||
unsigned int position; /* Sample position */
|
||||
short pitchbend; /* Linear bend from base note*/
|
||||
unsigned char note; /* Current base note number */
|
||||
unsigned char instrument; /* Current instrument number */
|
||||
unsigned char sample; /* Current sample number */
|
||||
unsigned char volume; /* Current volume */
|
||||
unsigned char pan; /* Current stereo pan */
|
||||
unsigned char reserved; /* Reserved */
|
||||
struct xmp_event event; /* Current track event */
|
||||
};
|
||||
|
||||
struct xmp_frame_info { /* Current frame information */
|
||||
int pos; /* Current position */
|
||||
int pattern; /* Current pattern */
|
||||
|
@ -296,30 +317,19 @@ struct xmp_frame_info { /* Current frame information */
|
|||
int virt_used; /* Used virtual channels */
|
||||
int sequence; /* Current sequence */
|
||||
|
||||
struct xmp_channel_info { /* Current channel information */
|
||||
unsigned int period; /* Sample period (* 4096) */
|
||||
unsigned int position; /* Sample position */
|
||||
short pitchbend; /* Linear bend from base note*/
|
||||
unsigned char note; /* Current base note number */
|
||||
unsigned char instrument; /* Current instrument number */
|
||||
unsigned char sample; /* Current sample number */
|
||||
unsigned char volume; /* Current volume */
|
||||
unsigned char pan; /* Current stereo pan */
|
||||
unsigned char reserved; /* Reserved */
|
||||
struct xmp_event event; /* Current track event */
|
||||
} channel_info[XMP_MAX_CHANNELS];
|
||||
struct xmp_channel_info channel_info[XMP_MAX_CHANNELS]; /* Current channel information */
|
||||
};
|
||||
|
||||
|
||||
typedef char *xmp_context;
|
||||
|
||||
LIBXMP_EXPORT extern const char *xmp_version;
|
||||
LIBXMP_EXPORT extern const unsigned int xmp_vercode;
|
||||
LIBXMP_EXPORT_VAR extern const char *xmp_version;
|
||||
LIBXMP_EXPORT_VAR extern const unsigned int xmp_vercode;
|
||||
|
||||
LIBXMP_EXPORT xmp_context xmp_create_context (void);
|
||||
LIBXMP_EXPORT void xmp_free_context (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_test_module (char *, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_load_module (xmp_context, char *);
|
||||
LIBXMP_EXPORT int xmp_test_module (const char *, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_load_module (xmp_context, const char *);
|
||||
LIBXMP_EXPORT void xmp_scan_module (xmp_context);
|
||||
LIBXMP_EXPORT void xmp_release_module (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_start_player (xmp_context, int, int);
|
||||
|
@ -329,7 +339,7 @@ LIBXMP_EXPORT void xmp_get_frame_info (xmp_context, struct xmp_frame_inf
|
|||
LIBXMP_EXPORT void xmp_end_player (xmp_context);
|
||||
LIBXMP_EXPORT void xmp_inject_event (xmp_context, int, struct xmp_event *);
|
||||
LIBXMP_EXPORT void xmp_get_module_info (xmp_context, struct xmp_module_info *);
|
||||
LIBXMP_EXPORT char **xmp_get_format_list (void);
|
||||
LIBXMP_EXPORT const char *const *xmp_get_format_list (void);
|
||||
LIBXMP_EXPORT int xmp_next_position (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_prev_position (xmp_context);
|
||||
LIBXMP_EXPORT int xmp_set_position (xmp_context, int);
|
||||
|
@ -342,9 +352,11 @@ LIBXMP_EXPORT int xmp_channel_mute (xmp_context, int, int);
|
|||
LIBXMP_EXPORT int xmp_channel_vol (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_set_player (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_get_player (xmp_context, int);
|
||||
LIBXMP_EXPORT int xmp_set_instrument_path (xmp_context, char *);
|
||||
LIBXMP_EXPORT int xmp_set_instrument_path (xmp_context, const char *);
|
||||
LIBXMP_EXPORT int xmp_load_module_from_memory (xmp_context, void *, long);
|
||||
LIBXMP_EXPORT int xmp_load_module_from_file (xmp_context, void *, long);
|
||||
LIBXMP_EXPORT int xmp_test_module_from_memory (void *, long, struct xmp_test_info *);
|
||||
LIBXMP_EXPORT int xmp_test_module_from_file (void *, struct xmp_test_info *);
|
||||
|
||||
/* External sample mixer API */
|
||||
LIBXMP_EXPORT int xmp_start_smix (xmp_context, int, int);
|
||||
|
@ -352,7 +364,7 @@ LIBXMP_EXPORT void xmp_end_smix (xmp_context);
|
|||
LIBXMP_EXPORT int xmp_smix_play_instrument(xmp_context, int, int, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_play_sample (xmp_context, int, int, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_channel_pan (xmp_context, int, int);
|
||||
LIBXMP_EXPORT int xmp_smix_load_sample (xmp_context, int, char *);
|
||||
LIBXMP_EXPORT int xmp_smix_load_sample (xmp_context, int, const char *);
|
||||
LIBXMP_EXPORT int xmp_smix_release_sample (xmp_context, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue