package link.roadio.riff.player.playback /** Media3 wraps the last occurrence in Repeat All, including a one-item timeline. */ internal class PlaybackFailurePass { private val failed = mutableSetOf() fun canAdvance( current: Int, next: Int, ): Boolean { failed += current return next >= 0 && next !in failed } fun reset() = failed.clear() }