Exemple #1
0
		public Player() {
			Instance = this;
			Engine = new ISoundEngine(SoundOutputDriver.AutoDetect, SoundEngineOptionFlag.DefaultOptions, Config.GetInstance().DeviceId);
			Playlist = new Playlist();
      
			//Playlist.Tracks.CollectionChanged += OnPlaylistChanged;
			new Thread(() => {
				while (true) { PlayerThread(); Thread.Sleep(250); }
			}).Start();
		}
Exemple #2
0
 public void SetPlaylist(Playlist playlist) {
     foreach (Track t1 in Player.Instance.Playlist.Tracks)
     {
         for (int i = 0; i < playlist.Tracks.Count; i ++)
         {
             Track t2 = playlist.Tracks[i];
             if (t1.Id == t2.Id)
             {
                 playlist.Tracks[i] = t1;
             }
         }
     }
     Player.Instance.Playlist = playlist;
 }