示例#1
0
        /// <summary>
        /// Pauses the stream.
        /// Invokes "VoicePlayerPaused" to other application's modules.
        /// </summary>
        public void PauseVoicePlaying()
        {
            try
            {
                _player.Pause();
            }
            catch (Exception exception)
            {
                ErrorHandler(exception.Message);
                return;
            }

            VoicePlayerPaused?.Invoke(this, new EventArgs());
        }
 /// <summary>
 /// Handles "VoicePlayerPaused" of the IVoicePlayerService object.
 /// Invokes "VoicePlayerPaused" to other application's modules.
 /// </summary>
 /// <param name="sender">Instance of the VoicePlayerService class.</param>
 /// <param name="e">Contains event data.</param>
 private void VoicePlayerPausedEventHandler(object sender, EventArgs e)
 {
     VoicePlayerPaused?.Invoke(this, new EventArgs());
 }