RetroArch
ibxm.h
Go to the documentation of this file.
1 
2 /* ibxm/ac mod/xm/s3m replay (c)mumart@gmail.com */
3 
4 #ifndef __IBXM_H__
5 #define __IBXM_H__
6 
7 extern const char *IBXM_VERSION;
8 
9 struct data {
10  char *buffer;
11  int length;
12 };
13 
14 struct sample {
15  char name[ 32 ];
18 };
19 
20 struct envelope {
23  short points_tick[ 16 ], points_ampl[ 16 ];
24 };
25 
26 struct instrument {
28  char name[ 32 ], key_to_sample[ 97 ];
30  struct envelope vol_env, pan_env;
31  struct sample *samples;
32 };
33 
34 struct pattern {
36  char *data;
37 };
38 
39 struct module {
40  char name[ 32 ];
45  unsigned char *default_panning, *sequence;
46  struct pattern *patterns;
48 };
49 
50 /* Allocate and initialize a module from the specified data, returns NULL on error.
51  Message should point to a 64-character buffer to receive error messages. */
52 struct module* module_load( struct data *data, char *message );
53 /* Deallocate the specified module. */
54 void dispose_module( struct module *module );
55 /* Allocate and initialize a replay with the specified module and sampling rate. */
56 struct replay* new_replay( struct module *module, int sample_rate, int interpolation );
57 /* Deallocate the specified replay. */
58 void dispose_replay( struct replay *replay );
59 /* Returns the song duration in samples at the current sampling rate. */
61 /* Seek to approximately the specified sample position.
62  The actual sample position reached is returned. */
63 int replay_seek( struct replay *replay, int sample_pos );
64 /* Set the pattern in the sequence to play. The tempo is reset to the default. */
65 void replay_set_sequence_pos( struct replay *replay, int pos );
66 /* Generates audio and returns the number of stereo samples written into mix_buf. */
67 int replay_get_audio( struct replay *replay, int *mix_buf );
68 /* Returns the length of the output buffer required by replay_get_audio(). */
70 
71 #endif
int default_gvol
Definition: ibxm.h:43
int replay_get_audio(struct replay *replay, int *mix_buf)
Definition: ibxm.c:1905
int num_instruments
Definition: ibxm.h:41
GLuint const GLchar * name
Definition: glext.h:6671
char vib_type
Definition: ibxm.h:29
short * data
Definition: ibxm.h:17
short loop_start_tick
Definition: ibxm.h:22
short loop_end_tick
Definition: ibxm.h:22
int fast_vol_slides
Definition: ibxm.h:44
char num_points
Definition: ibxm.h:21
short fine_tune
Definition: ibxm.h:17
struct envelope vol_env pan_env
Definition: ibxm.h:30
int num_rows
Definition: ibxm.h:35
short points_tick[16]
Definition: ibxm.h:23
int calculate_mix_buf_len(int sample_rate)
Definition: ibxm.c:1851
struct pattern * patterns
Definition: ibxm.h:46
int num_samples
Definition: ibxm.h:27
int default_speed
Definition: ibxm.h:43
struct module * module_load(struct data *data, char *message)
Definition: ibxm.c:855
int loop_start
Definition: ibxm.h:16
short volume
Definition: ibxm.h:17
Definition: ibxm.h:9
void dispose_replay(struct replay *replay)
Definition: ibxm.c:1817
char enabled
Definition: ibxm.h:21
short rel_note
Definition: ibxm.h:17
int gain
Definition: ibxm.h:43
Definition: ibxm.h:39
int num_patterns
Definition: ibxm.h:42
int length
Definition: ibxm.h:11
char key_to_sample[97]
Definition: ibxm.h:28
int restart_pos
Definition: ibxm.h:42
char * data
Definition: ibxm.h:36
int default_tempo
Definition: ibxm.h:43
int loop_length
Definition: ibxm.h:16
struct instrument * instruments
Definition: ibxm.h:47
int linear_periods
Definition: ibxm.h:44
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:6233
int sequence_len
Definition: ibxm.h:42
int num_channels
Definition: ibxm.h:41
short sustain_tick
Definition: ibxm.h:22
int num_channels
Definition: ibxm.h:35
Definition: ibxm.h:20
unsigned sample_rate
Definition: ffmpeg_core.c:181
int interpolation
Definition: ibxm.c:60
Definition: ibxm.c:59
char looped
Definition: ibxm.h:21
struct sample * samples
Definition: ibxm.h:31
short panning
Definition: ibxm.h:17
char sustain
Definition: ibxm.h:21
unsigned char * sequence
Definition: ibxm.h:45
int c2_rate
Definition: ibxm.h:43
Definition: ibxm.h:34
short points_ampl[16]
Definition: ibxm.h:23
Definition: ibxm.h:14
int replay_calculate_duration(struct replay *replay)
Definition: ibxm.c:1856
char * buffer
Definition: ibxm.h:10
const char * IBXM_VERSION
Definition: ibxm.c:7
char vib_sweep
Definition: ibxm.h:29
int vol_fadeout
Definition: ibxm.h:27
unsigned char * default_panning
Definition: ibxm.h:45
void replay_set_sequence_pos(struct replay *replay, int pos)
Definition: ibxm.c:1787
char vib_rate
Definition: ibxm.h:29
struct replay * new_replay(struct module *module, int sample_rate, int interpolation)
Definition: ibxm.c:1828
Definition: ibxm.h:26
char vib_depth
Definition: ibxm.h:29
void dispose_module(struct module *module)
Definition: ibxm.c:232
int replay_seek(struct replay *replay, int sample_pos)
Definition: ibxm.c:1869