From 50a8396eb61c665b07426c70a11c0b73ed950434 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 25 Oct 2021 05:38:25 +0300 Subject: Added an ability to set number of loops --- include/adlmidi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 2b68509..53f57f8 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -563,6 +563,16 @@ extern ADLMIDI_DECLSPEC void adl_setAutoArpeggio(struct ADL_MIDIPlayer *device, */ extern ADLMIDI_DECLSPEC void adl_setLoopEnabled(struct ADL_MIDIPlayer *device, int loopEn); +/** + * @brief Set how many times loop will be played + * + * Note: The song will be played once if loop has been disabled with no matter which value of loop count was set + * + * @param device Instance of the library + * @param loopCount Number of loops or -1 to loop infinitely + */ +extern ADLMIDI_DECLSPEC void adl_setLoopCount(struct ADL_MIDIPlayer *device, int loopCount); + /** * @brief Enable or disable soft panning with chip emulators * @param device Instance of the library -- cgit v1.2.3