Exemplo n.º 1
0
        /// <summary>
        /// Pauses feeding of the audio data to the device.
        /// </summary>
        /// <remarks>It has no effect if the current state is <see cref="AudioIOState.Paused"/>.</remarks>
        /// <exception cref="InvalidOperationException">
        ///     The current state is <see cref="AudioIOState.Idle"/>.<br/>
        ///     -or-<br/>
        ///     The method is called in the <see cref="BufferAvailable"/> event handler.
        /// </exception>
        /// <exception cref="ObjectDisposedException">The AudioPlayback has already been disposed of.</exception>
        /// <seealso cref="Resume"/>
        /// <since_tizen> 3 </since_tizen>
        public void Pause()
        {
            if (_state == AudioIOState.Paused)
            {
                return;
            }
            ValidateState(AudioIOState.Running);

            AudioIOUtil.ThrowIfError(AudioOutput.Pause(_handle));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Pauses feeding of the audio data to the device.
        /// </summary>
        /// <remarks>It has no effect if the current state is <see cref="AudioIOState.Paused"/>.</remarks>
        /// <exception cref="InvalidOperationException">
        ///     The current state is <see cref="AudioIOState.Idle"/>.<br/>
        ///     -or-<br/>
        ///     The method is called in the <see cref="BufferAvailable"/> event handler.
        /// </exception>
        /// <exception cref="ObjectDisposedException">The AudioPlayback has already been disposed of.</exception>
        /// <seealso cref="Resume"/>
        /// <since_tizen> 3 </since_tizen>
        public void Pause()
        {
            if (_state == AudioIOState.Paused)
            {
                return;
            }
            ValidateState(AudioIOState.Running);

            AudioOutput.Pause(_handle).ThrowIfFailed("Failed to pause.");
        }