Example #1
0
        /// <summary>
        /// Unprepares the player.
        /// Invokes "VoicePlayerStopped" to other application's modules.
        /// </summary>
        /// <param name="sender">Instance of the object which invokes event.</param>
        /// <param name="eventArgs">Contains event data.</param>
        private void OnPlaybackCompleted(object sender, EventArgs eventArgs)
        {
            try
            {
                _player.Stop();
            }
            catch (Exception exception)
            {
                ErrorHandler(exception.Message);
                return;
            }

            VoicePlayerStopped?.Invoke(this, new EventArgs());
        }
 /// <summary>
 /// Handles "VoicePlayerStopped" of the IVoicePlayerService object.
 /// Invokes "VoicePlayerStopped" to other application's modules.
 /// </summary>
 /// <param name="sender">Instance of the VoicePlayerService class.</param>
 /// <param name="e">Contains event data.</param>
 private void VoicePlayerStoppedEventHandler(object sender, EventArgs e)
 {
     VoicePlayerStopped?.Invoke(this, new EventArgs());
 }
Example #3
0
 /// <summary>
 /// Unprepares the player.
 /// Invokes "VoicePlayerStopped" to other application's modules.
 /// </summary>
 public void UnprepareVoicePlaying()
 {
     _player.Unprepare();
     VoicePlayerStopped?.Invoke(this, new EventArgs());
 }