aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_midiplay.hpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2022-10-17 18:39:08 +0300
committerWohlstand <admin@wohlnet.ru>2022-10-17 18:39:08 +0300
commit9fbaa58e87a63749ff1694bdb9f4d1241db98689 (patch)
treee876a7ea5bed72a36836137f8915eed1fe84edd2 /src/adlmidi_midiplay.hpp
parente27764edeb24936ce50da6229a781006e7ebdc75 (diff)
downloadlibADLMIDI-9fbaa58e87a63749ff1694bdb9f4d1241db98689.tar.gz
libADLMIDI-9fbaa58e87a63749ff1694bdb9f4d1241db98689.tar.bz2
libADLMIDI-9fbaa58e87a63749ff1694bdb9f4d1241db98689.zip
Improved the multi-song XMI support
- Allow selecting every individual song of the XMI file - Allow dynamic song switch without re-opening of a file - Fixed XMI2MID converter with adding an ability to export every individual song - Added hooks for loop start and end events - Added an option to immediately stop the song processing on loop end reaching (needed to perform dynamic song switch at the loop end point)
Diffstat (limited to 'src/adlmidi_midiplay.hpp')
-rw-r--r--src/adlmidi_midiplay.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/adlmidi_midiplay.hpp b/src/adlmidi_midiplay.hpp
index 181350a..5208f7b 100644
--- a/src/adlmidi_midiplay.hpp
+++ b/src/adlmidi_midiplay.hpp
@@ -37,6 +37,10 @@ struct MIDIEventHooks
MIDIEventHooks() :
onNote(NULL),
onNote_userData(NULL),
+ onLoopStart(NULL),
+ onLoopStart_userData(NULL),
+ onLoopEnd(NULL),
+ onLoopEnd_userData(NULL),
onDebugMessage(NULL),
onDebugMessage_userData(NULL)
{}
@@ -46,6 +50,13 @@ struct MIDIEventHooks
NoteHook onNote;
void *onNote_userData;
+ // Loop start/end hooks
+ ASL_LoopPointHook onLoopStart;
+ void *onLoopStart_userData;
+ ASL_LoopPointHook onLoopEnd;
+ void *onLoopEnd_userData;
+
+
//! Library internal debug messages
typedef void (*DebugMessageHook)(void *userdata, const char *fmt, ...);
DebugMessageHook onDebugMessage;