From 24855412cd0a5e2dcf4ac8b62888d115cd20b3f0 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 25 Oct 2022 04:57:31 +0300 Subject: XMI2MIDI: Optimised the algorithm for multiple songs --- include/adlmidi.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 0611da6..6afcefc 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -845,6 +845,13 @@ extern ADLMIDI_DECLSPEC int adl_openData(struct ADL_MIDIPlayer *device, const vo */ extern ADLMIDI_DECLSPEC void adl_selectSongNum(struct ADL_MIDIPlayer *device, int songNumber); +/** + * @brief Retrive the number of songs in a currently opened file + * @param device Instance of the library + * @return Number of songs in the file. If 1 or less, means, the file has only one song inside. + */ +extern ADLMIDI_DECLSPEC int adl_getSongsCount(struct ADL_MIDIPlayer *device); + /** * @brief Resets MIDI player (per-channel setup) into initial state * @param device Instance of the library -- cgit v1.2.3