Hi Ian,
I need to chain SYNCPROCs triggered at specific tick positions on a MIDI file playback (on Android).
At the beginning I set the position of the first one and let the playback start using something like:
BASS.BASS_ChannelSetSync(chanId, BASSMIDI.BASS_SYNC_MIDI_TICK | BASS.BASS_SYNC_ONETIME, tick, proc, user)
Then inside the proc I schedule the next one and similarly when seeking I clear the scheduled one and set the next one. Most of the time everything is ok.
The problem is that with debug prints, slow devices and very close tick positions, when I set the new one in the SYNCPROCs in some cases the position is already past and everything stops.
The only solution I could think of is checking the tick position after setting the new SYNCPROC and in this case clear it and retry with the next one. This will not anyway solve seeking, as this happens on another thread and I cannot (easily) be sure that the SYNCPROC has been triggered or not.
I could check for a minimum number of ticks from the current position before setting the SYNCPROC, maybe temporarily pause the playback when seeking, but it would be nice to have instead some flag that aborts the BASS_ChannelSetSync when specifying positions in the past, so that all this handling could be more easy and robust.
Do you think that this could be possible?
Thanks.