public uint GetPrev() { if (SongCount == 0) { return(0); } if (_songList.Count == 0) { _listState = 0; } if (_listState != 1) { _listState = -1; uint prev = 0; switch (Settings.settings.RandomizeType) { case RandomizeType.None: prev = RandomizeNone(false); break; case RandomizeType.Shuffle: prev = RandomizeShuffle(); break; case RandomizeType.Random: prev = RandomizeRandom(); break; case RandomizeType.FisherYatesShuffle: prev = RandomizeFisherYatesShuffle(); break; default: break; } _songList.Push(prev); _lastRandomizeType = Settings.settings.RandomizeType; return(prev); } else { _lastRandomizeType = Settings.settings.RandomizeType; return(_songList.Pop()); } }
public uint GetNext() { if (SongCount == 0) { return(0); } if (_songList.Count == 0) { _listState = 0; } if (_listState != -1) { _listState = 1; uint next = 0; switch (Settings.settings.RandomizeType) { case RandomizeType.None: next = RandomizeNone(); break; case RandomizeType.Shuffle: next = RandomizeShuffle(); break; case RandomizeType.Random: next = RandomizeRandom(); break; case RandomizeType.FisherYatesShuffle: next = RandomizeFisherYatesShuffle(); break; default: break; } _songList.Push(next); _lastRandomizeType = Settings.settings.RandomizeType; return(next); } else { _lastRandomizeType = Settings.settings.RandomizeType; return(_songList.Pop()); } }