private void OnCurrentPlayTimeChanged(int time) { if (current_lyrics == null) { return; } time += Setting.GobalTimeOffset; var sentence_query = current_lyrics.GetCurrentSentence(time); var sentence = sentence_query.Item1; if (prev_index != sentence_query.Item2) { Utils.Debug($"[cur:{time} now:{sentence_query.Item1.StartTime}]{sentence_query.Item1.Content}"); prev_index = sentence_query.Item2; } else { if (Setting.ForceKeepTime != 0 && time - sentence.StartTime > Setting.ForceKeepTime) { sentence = Sentence.Empty; } } OutputLyricSentence(sentence); }
public Sentence GetLyricsSentence(int time) { return(current_lyrics?.GetCurrentSentence(time).Item1 ?? Sentence.Empty); }