public static void Update() { if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1) { float timeToPlay; if (_CurrentPlaylistElement.Finish == 0f) //No End-Tag defined { timeToPlay = CSound.GetLength(_CurrentMusicStream) - CSound.GetPosition(_CurrentMusicStream); } else //End-Tag found { timeToPlay = _CurrentPlaylistElement.Finish - CSound.GetPosition(_CurrentMusicStream); } bool finished = CSound.IsFinished(_CurrentMusicStream); if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished)) { if (_RepeatSong) { CSound.SetPosition(_CurrentMusicStream, 0); if (_VideoEnabled && _Video != -1) { CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap); } } else { Next(); } } } }
public static void Update() { if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1) { float timeToPlay = CSound.GetLength(_CurrentMusicStream) - CSound.GetPosition(_CurrentMusicStream); bool finished = CSound.IsFinished(_CurrentMusicStream); if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished)) { Next(); } } }
public bool IsFinished(int soundStream) { return(CSound.IsFinished(soundStream)); }