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