setCurrent method
Implementation
void setCurrent(int index, TrackEntry? current, bool interrupt) {
final TrackEntry? from = expandToIndex(index);
tracks[index] = current;
if (from != null) {
if (interrupt) queue.interrupt(from);
current
?..mixingFrom = from
..mixTime = 0.0;
// Store the interrupted mix percentage.
if (from.mixingFrom != null && from.mixDuration > 0) {
current!.interruptAlpha = current.interruptAlpha *
math.min(1, from.mixTime / from.mixDuration);
}
// Reset rotation for mixing out, in case entry was mixed in.
from.timelinesRotation.length = 0;
}
queue.start(current);
}