public void Stop() { mSong = null; mIsPlaying = false; mSongQueuePosition = -1; mBroadcastNeeded = true; }
public void Destroy() { if (mLoadedDisks != null) { mLoadedDisks.Clear(); } if (mPlaylist != null) { mPlaylist.Clear(); } mPlaylist = null; mLoadedDisks = null; mSong = null; mRoomOutputItem = null; }
private void PlaySong() { if (mSongQueuePosition >= mPlaylist.Count) { mSongQueuePosition = 0; } if (mPlaylist.Count == 0) { Stop(); return; } mSong = mPlaylist[mSongQueuePosition]; mStartedPlayingTimestamp = RavenEnvironment.GetUnixTimestamp(); mBroadcastNeeded = true; }
public SongItem RemoveDisk(int PlaylistIndex) { SongInstance Instance = null; if (!mPlaylist.ContainsKey(PlaylistIndex)) { return(null); } Instance = mPlaylist[PlaylistIndex]; mPlaylist.Remove(PlaylistIndex); mLoadedDisks.Remove(Instance.DiskItem.itemID); RepairPlaylist(); if (PlaylistIndex == mSongQueuePosition) { PlaySong(); } return(Instance.DiskItem); }