Exemple #1
0
 public void Stop()
 {
     mSong              = null;
     mIsPlaying         = false;
     mSongQueuePosition = -1;
     mBroadcastNeeded   = true;
 }
Exemple #2
0
        public void Destroy()
        {
            if (mLoadedDisks != null)
            {
                mLoadedDisks.Clear();
            }

            if (mPlaylist != null)
            {
                mPlaylist.Clear();
            }

            mPlaylist       = null;
            mLoadedDisks    = null;
            mSong           = null;
            mRoomOutputItem = null;
        }
Exemple #3
0
        private void PlaySong()
        {
            if (mSongQueuePosition >= mPlaylist.Count)
            {
                mSongQueuePosition = 0;
            }

            if (mPlaylist.Count == 0)
            {
                Stop();
                return;
            }

            mSong = mPlaylist[mSongQueuePosition];
            mStartedPlayingTimestamp = RavenEnvironment.GetUnixTimestamp();
            mBroadcastNeeded         = true;
        }
Exemple #4
0
        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);
        }