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 --- src/midi_sequencer.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/midi_sequencer.hpp') diff --git a/src/midi_sequencer.hpp b/src/midi_sequencer.hpp index 2cba080..5e7ecc7 100644 --- a/src/midi_sequencer.hpp +++ b/src/midi_sequencer.hpp @@ -618,10 +618,16 @@ public: void setSoloTrack(size_t track); /** - * @brief Set the track number of a multi-track file (such as XMI) - * @param trackNumber Identifier of the track to load (or -1 to mix all tracks as one song) + * @brief Set the song number of a multi-song file (such as XMI) + * @param trackNumber Identifier of the song to load (or -1 to mix all songs as one song) */ - void setLoadTrack(int track); + void setSongNum(int track); + + /** + * @brief Retrive the number of songs in a currently opened file + * @return Number of songs in the file. If 1 or less, means, the file has only one song inside. + */ + int getSongsCount(); /** * @brief Defines a handler for callback trigger events -- cgit v1.2.3