public void Next() { actionQueue.Enqueue(() => { Paused = false; SongCancelSource.Cancel(); }); }
public void Next() { lock (playlistLock) { if (!SongCancelSource.IsCancellationRequested) { Paused = false; SongCancelSource.Cancel(); } } }
public void Stop() { lock (playlistLock) { playlist.Clear(); CurrentSong = null; if (!SongCancelSource.IsCancellationRequested) { SongCancelSource.Cancel(); } } }
public void Stop() { actionQueue.Enqueue(() => { RepeatPlaylist = false; RepeatSong = false; Autoplay = false; _playlist.Clear(); if (!SongCancelSource.IsCancellationRequested) SongCancelSource.Cancel(); }); }
public void Destroy() { lock (playlistLock) { playlist.Clear(); Destroyed = true; CurrentSong = null; if (!SongCancelSource.IsCancellationRequested) { SongCancelSource.Cancel(); } audioClient.Disconnect(); } }
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(); }); }
public void Destroy() { actionQueue.Enqueue(() => { RepeatPlaylist = false; RepeatSong = false; Destroyed = true; playlist.Clear(); if (!SongCancelSource.IsCancellationRequested) { SongCancelSource.Cancel(); } audioClient.Disconnect(); }); }
public void Stop() { lock (playlistLock) { _playlist.Clear(); try { if (!SongCancelSource.IsCancellationRequested) { SongCancelSource.Cancel(); } } catch { Console.WriteLine("STOP"); } } }