Pause() public method

Pauses the sound.
public Pause ( ) : void
return void
Beispiel #1
0
 private void PlayPauseButton_Click(object sender, RoutedEventArgs e)
 {
     lock (lockAudio)
     {
         if (audioPlayer != null)
         {
             if (audioPlayer.State == AudioPlayerState.Playing)
             {
                 audioPlayer.Pause();
             }
             else
             {
                 audioPlayer.Play();
             }
         }
     }
 }