Exemplo n.º 1
0
 public void Next()
 {
     actionQueue.Enqueue(() =>
     {
         Paused = false;
         SongCancelSource.Cancel();
     });
 }
Exemplo n.º 2
0
 public void Next()
 {
     lock (playlistLock) {
         if (!SongCancelSource.IsCancellationRequested)
         {
             Paused = false;
             SongCancelSource.Cancel();
         }
     }
 }
Exemplo n.º 3
0
 public void Stop()
 {
     lock (playlistLock) {
         playlist.Clear();
         CurrentSong = null;
         if (!SongCancelSource.IsCancellationRequested)
         {
             SongCancelSource.Cancel();
         }
     }
 }
Exemplo n.º 4
0
 public void Stop()
 {
     actionQueue.Enqueue(() =>
     {
         RepeatPlaylist = false;
         RepeatSong = false;
         Autoplay = false;
         _playlist.Clear();
         if (!SongCancelSource.IsCancellationRequested)
             SongCancelSource.Cancel();
     });
 }
Exemplo n.º 5
0
 public void Destroy()
 {
     lock (playlistLock) {
         playlist.Clear();
         Destroyed   = true;
         CurrentSong = null;
         if (!SongCancelSource.IsCancellationRequested)
         {
             SongCancelSource.Cancel();
         }
         audioClient.Disconnect();
     }
 }
Exemplo n.º 6
0
        public void Destroy()
        {
            actionQueue.Enqueue(async () =>
            {
                RepeatPlaylist = false;
                RepeatSong = false;
                Autoplay = false;
                destroyed = true;
                _playlist.Clear();

                try { await audioClient.DisconnectAsync(); } catch { }
                if (!SongCancelSource.IsCancellationRequested)
                    SongCancelSource.Cancel();
            });
        }
Exemplo n.º 7
0
 public void Destroy()
 {
     actionQueue.Enqueue(() =>
     {
         RepeatPlaylist = false;
         RepeatSong     = false;
         Destroyed      = true;
         playlist.Clear();
         if (!SongCancelSource.IsCancellationRequested)
         {
             SongCancelSource.Cancel();
         }
         audioClient.Disconnect();
     });
 }
Exemplo n.º 8
0
 public void Stop()
 {
     lock (playlistLock) {
         _playlist.Clear();
         try {
             if (!SongCancelSource.IsCancellationRequested)
             {
                 SongCancelSource.Cancel();
             }
         }
         catch {
             Console.WriteLine("STOP");
         }
     }
 }