From 380d08e1a234efb17cf15a6b6c2d00c52e4fc648 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 18 Oct 2017 02:22:01 +0300 Subject: Smooth finalizing, rewinding, and a bit more crash safety * Smooth finalizing of song when loop is disabled (old ugly hack has been removed :wink:) * Added an ability to reset song position to begin (very helpful when song reaches the end) * Avoided possible crashes on attempt to fetch sample data without opening of MIDI file --- src/adlmidi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/adlmidi.h') diff --git a/src/adlmidi.h b/src/adlmidi.h index 752e307..5aa913b 100644 --- a/src/adlmidi.h +++ b/src/adlmidi.h @@ -48,7 +48,6 @@ struct ADL_MIDIPlayer unsigned int AdlPercussionMode; unsigned int LogarithmicVolumes; int VolumeModel; - unsigned int QuitFlag; unsigned int SkipForward; unsigned int QuitWithoutLooping; unsigned int ScaleModulators; @@ -128,6 +127,9 @@ extern int adl_openData(struct ADL_MIDIPlayer *device, void *mem, long size); /*Resets MIDI player*/ extern void adl_reset(struct ADL_MIDIPlayer *device); +/*Reset MIDI track position to begin */ +extern void adl_positionRewind(struct ADL_MIDIPlayer *device); + /*Close and delete ADLMIDI device*/ extern void adl_close(struct ADL_MIDIPlayer *device); -- cgit v1.2.3