I ended up adding a function to handle this in my local AnimationState.c, it is modeled after other similar functions. I have created a configurable state machine ActorComponent in C++ on top of the Spine-C API (using the UE4 runtime as reference). This new function is useful for allowing the next track to be determined, but then re-determined before the current track finishes - depending on the results of external criteria (setup as gates).
It seems to work fine, but do you think there will be a problem with this?
void spAnimationState_clearNextTrack(spAnimationState* self, int trackIndex) {
spTrackEntry* current;
spTrackEntry* entry;
spTrackEntry* from;
_spAnimationState* internal = SUB_CAST(_spAnimationState, self);
if (trackIndex >= self->tracksCount) return;
current = self->tracks[trackIndex];
if (!current) return;
_spAnimationState_disposeNext(self, current);
entry = current;
while (1) {
from = entry->mixingFrom;
if (!from) break;
_spEventQueue_end(internal->queue, from);
entry->mixingFrom = 0;
entry = from;
}
}