From d9a000cc0a6a8aae37f34c4cc6e23797a1ceb8c9 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Thu, 26 Oct 2017 03:17:15 +0300 Subject: Continue works on loop points and some clean-up - Added more detailed error information while parsing MIDI file - Added abiltiy to retrieve loop points time positions - Added ability to change playing tempo by giving multiplier - Removed old commented code TODO: - implement meta-information store and a way to retreive it - implement hook-ability for every MIDI event - implement ability to mute/solo every channel --- include/adlmidi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/adlmidi.h b/include/adlmidi.h index 817fe59..1279e9f 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -104,6 +104,12 @@ 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); @@ -113,6 +119,9 @@ 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); -- cgit v1.2.3