From 6783770a8533dd099b39c51a5c3f7f5f4000b4bc Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 24 Oct 2017 23:01:01 +0300 Subject: Added working seekability! Testing and stabilizing is needed --- include/adlmidi.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/adlmidi.h b/include/adlmidi.h index 145b5dd..e2aaf59 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -127,6 +127,15 @@ 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 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); @@ -134,7 +143,7 @@ extern void adl_positionRewind(struct ADL_MIDIPlayer *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 } -- cgit v1.2.3