diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-07-09 20:20:55 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-07-09 20:58:43 +0200 |
commit | 9fdaf5361c57438bf7f5bafaf6bb9a79b6bb7493 (patch) | |
tree | 5226a20603b6b60ee05dc2d74e7474d62012948b /include | |
parent | 2a33defa5770a585f26c35ea731904859afd4ea6 (diff) | |
download | libADLMIDI-9fdaf5361c57438bf7f5bafaf6bb9a79b6bb7493.tar.gz libADLMIDI-9fdaf5361c57438bf7f5bafaf6bb9a79b6bb7493.tar.bz2 libADLMIDI-9fdaf5361c57438bf7f5bafaf6bb9a79b6bb7493.zip |
xmi: handle AIL callback trigger
Diffstat (limited to 'include')
-rw-r--r-- | include/adlmidi.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h index f19bca0..77fbe74 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -664,6 +664,24 @@ enum ADLMIDI_TrackOptions */ extern int adl_setTrackOptions(struct ADL_MIDIPlayer *device, size_t trackNumber, unsigned trackOptions); +/** + * @brief Handler of callback trigger events + * @param userData Pointer to user data (usually, context of something) + * @param trigger Value of the event which triggered this callback. + * @param track Identifier of the track which triggered this callback. + */ +typedef void (*ADL_TriggerHandler)(void *userData, unsigned trigger, size_t track); + +/** + * @brief Defines a handler for callback trigger events + * @param device Instance of the library + * @param handler Handler to invoke from the sequencer when triggered, or NULL. + * @param userData Instance of the library + * @return 0 on success, <0 when any error has occurred + */ +extern int adl_setTriggerHandler(struct ADL_MIDIPlayer *device, ADL_TriggerHandler handler, void *userData); + + /* ======== Meta-Tags ======== */ |