コード例 #1
0
 public void Stop()
 {
     mSong              = null;
     mIsPlaying         = false;
     mSongQueuePosition = -1;
     mBroadcastNeeded   = true;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal void Destroy()
 {
     if (mLoadedDisks != null)
     {
         mLoadedDisks.Clear();
     }
     if (mPlaylist != null)
     {
         mPlaylist.Clear();
     }
     mPlaylist       = null;
     mLoadedDisks    = null;
     mSong           = null;
     mRoomOutputItem = null;
 }
コード例 #4
0
        public void PlaySong()
        {
            if (mSongQueuePosition >= mPlaylist.Count)
            {
                mSongQueuePosition = 0;
            }

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

            mSong = mPlaylist[mSongQueuePosition];
            mStartedPlayingTimestamp = FirewindEnvironment.GetUnixTimestamp();
            mBroadcastNeeded         = true;
        }
コード例 #5
0
 internal void Destroy()
 {
     if (mLoadedDisks != null)
         mLoadedDisks.Clear();
     if (mPlaylist != null)
         mPlaylist.Clear();
     mPlaylist = null;
     mLoadedDisks = null;
     mSong = null;
     mRoomOutputItem = null;
 }
コード例 #6
0
 public void Stop()
 {
     mSong = null;
     mIsPlaying = false;
     mSongQueuePosition = -1;
     mBroadcastNeeded = true;
 }
コード例 #7
0
        public void PlaySong()
        {
            if (mSongQueuePosition >= mPlaylist.Count)
            {
                mSongQueuePosition = 0;
            }

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

            mSong = mPlaylist[mSongQueuePosition];
            mStartedPlayingTimestamp = FirewindEnvironment.GetUnixTimestamp();
            mBroadcastNeeded = true;
        }