Exemplo n.º 1
0
 /// <summary>Stops the currently played song.</summary>
 /// <param name="restart">When set to true, the AudioBob won't be notified aubout the stop.
 /// Use this parameter to prevent fast off-on switching.</param>
 private void Stop(bool restart)
 {
     Log.Write(Log.Level.Debug, "AF stop old (restart:{0})", restart);
     if (CurrentPlayData != null)
     {
         CurrentPlayData = null;
         if (!restart)
         {
             playerConnection.AudioStop();
         }
         OnResourceStopped?.Invoke(this, restart);
     }
 }
Exemplo n.º 2
0
 private void OnResourceEnd(bool val) => OnResourceStopped?.Invoke(this, new SongEndEventArgs(val));