wpf_player.AudioPlayerModel.pause C# (CSharp) Method

pause() private method

This method handle the pause operation. If the player is currently playing the methods calls NAudio player Pause method, if the player is paused then the play method will called, if the player is in the buffering phase at the start of the streaming session the method try to close the buffer phase and start the playing phase.
private pause ( object args = null ) : void
args object Unused params
return void
        private void pause(object args = null)
        {
            if (player.PlaybackState == PlaybackState.Playing)
            {
                player.Pause();
            }
            else if (player.PlaybackState == PlaybackState.Paused)
            {
                /*player.Init(wc);
                player.Play();*/
                this.play();
            }
            else if (startPhaseBuffering)
            {
                startPhaseBuffering = false;
                this.play();
            }
            NotifyPropertyChanged("PlayingState");
        }