wpf_player.AudioPlayerModel.stop C# (CSharp) Method

stop() private method

This method handles the stop operation. If the player is not stopped, the NAudio player will be stopped and some structure will be cleaned
private stop ( object args = null ) : void
args object Unused Params
return void
        private void stop(object args=null)
        {
            if (player.PlaybackState != PlaybackState.Stopped)
            {
                player.Stop();
                Position = 0;
                CurrentTime = 0;
                BufferingState = false;
            }
            if (wc!=null)
            {
                //MessageBox.Show(wc.Position.ToString());
                wc.Close();
                wc = null;
            }
            NotifyPropertyChanged("PlayingState");
            peer.StopFlow();
        }