private void HandlePlayRequest(TracklistEntry entry, float timeSkip) { float fadeTime = entry.GetEntranceFadeTime(); ITrack nextTrack = entry.GetTrack(); currentOutput.FadeOut(fadeTime); // This even fires as the track is fading out, not strictly as it ends. Good enough for our purposes. // if (TrackEndsEvent != null) { // TrackEndsEvent (currentOutput.GetTrack ()); // } currentOutput = GetOutputForNewEntry(entry); currentOutput.SetTrack(nextTrack); // safety LoadTrackIfNeeded(nextTrack); currentOutput.FadeIn(fadeTime); if (NewTrackBeginsEvent != null) { NewTrackBeginsEvent(nextTrack); } if (timeSkip != 0) { Diglbug.Log("TracklistPlayer Skipping to catch up with signal delay: " + timeSkip, PrintStream.AUDIO_PLAYBACK); currentOutput.SetTrackTime(timeSkip); } else { Diglbug.Log("TracklistPlayer timeSkip neglibile", PrintStream.AUDIO_PLAYBACK); } }