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 --- src/adlmidi.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/adlmidi.cpp') diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp index c62c2cb..621c385 100644 --- a/src/adlmidi.cpp +++ b/src/adlmidi.cpp @@ -574,6 +574,21 @@ ADLMIDI_EXPORT void adl_setLoopEnabled(ADL_MIDIPlayer *device, int loopEn) #endif } +ADLMIDI_EXPORT void adl_setLoopCount(ADL_MIDIPlayer *device, int loopCount) +{ +#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER + if(!device) + return; + MidiPlayer *play = GET_MIDI_PLAYER(device); + assert(play); + play->m_sequencer->setLoopsCount(loopCount); +#else + ADL_UNUSED(device); + ADL_UNUSED(loopCount); +#endif +} + + ADLMIDI_EXPORT void adl_setSoftPanEnabled(ADL_MIDIPlayer *device, int softPanEn) { if(!device) -- cgit v1.2.3