diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/adlmidi.h | 46 | 
1 files changed, 19 insertions, 27 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h index 145b5dd..1279e9f 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -40,33 +40,7 @@ enum ADLMIDI_VolumeModels  struct ADL_MIDIPlayer  { -    unsigned int AdlBank; -    unsigned int NumFourOps; -    unsigned int NumCards; -    unsigned int HighTremoloMode; -    unsigned int HighVibratoMode; -    unsigned int AdlPercussionMode; -    unsigned int LogarithmicVolumes; -    int VolumeModel; -    unsigned int SkipForward; -    unsigned int loopingIsEnabled; -    unsigned int ScaleModulators; -    double delay; -    double carry; - -    /* The lag between visual content and audio content equals */ -    /* the sum of these two buffers. */ -    double mindelay; -    double maxdelay; - -    /* For internal usage */ -    ssize_t stored_samples; /* num of collected samples */ -    short   backup_samples[1024]; /* Backup sample storage. */ -    ssize_t backup_samples_size; /* Backup sample storage. */ -    /* For internal usage */ -      void *adl_midiPlayer; -    unsigned long PCM_RATE;  };  /* Sets number of emulated sound cards (from 1 to 100). Emulation of multiple sound cards exchanges polyphony limits*/ @@ -127,14 +101,32 @@ extern int adl_openData(struct ADL_MIDIPlayer *device, void *mem, long size);  /*Resets MIDI player*/  extern void adl_reset(struct ADL_MIDIPlayer *device); +/*Get total time length of current song*/ +extern double adl_totalTimeLength(struct ADL_MIDIPlayer *device); + +/*Get loop start time if presented. -1 means MIDI file has no loop points */ +extern double adl_loopStartTime(struct ADL_MIDIPlayer *device); + +/*Get loop end time if presented. -1 means MIDI file has no loop points */ +extern double adl_loopEndTime(struct ADL_MIDIPlayer *device); + +/*Get current time position in seconds*/ +extern double adl_positionTell(struct ADL_MIDIPlayer *device); + +/*Jump to absolute time position in seconds*/ +extern void adl_positionSeek(struct ADL_MIDIPlayer *device, double seconds); +  /*Reset MIDI track position to begin */  extern void adl_positionRewind(struct ADL_MIDIPlayer *device); +/*Set tempo multiplier: 1.0 - original tempo, >1 - play faster, <1 - play slower */ +extern void adl_setTempo(struct ADL_MIDIPlayer *device, double tempo); +  /*Close and delete ADLMIDI device*/  extern void adl_close(struct ADL_MIDIPlayer *device);  /*Take a sample buffer*/ -extern int  adl_play(struct ADL_MIDIPlayer *device, int sampleCount, short out[]); +extern int adl_play(struct ADL_MIDIPlayer *device, int sampleCount, short out[]);  #ifdef __cplusplus  }  |