/// <summary>
/// Gets the size allocated for the audio input buffer.
/// </summary>
- /// <exception cref="ObjectDisposedException">The AudioPlayback has already been disposed of.</exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
public int GetBufferSize()
{
+ ValidateNotDisposed();
+
AudioIOUtil.ThrowIfError(AudioInput.GetBufferSize(_handle, out var size));
return size;
}
/// -or-<br/>
/// The current state is not <see cref="AudioIOState.Idle"/>.
/// </exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
/// <seealso cref="Unprepare"/>
public void Prepare()
{
/// -or-<br/>
/// The current state is <see cref="AudioIOState.Idle"/>.
/// </exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
/// <seealso cref="Prepare"/>
public void Unprepare()
{
/// -or-<br/>
/// The method is called in the <see cref="AsyncAudioCapture.DataAvailable"/> event handler.
/// </exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
/// <seealso cref="Resume"/>
public void Pause()
{
/// -or-<br/>
/// The method is called in the <see cref="AsyncAudioCapture.DataAvailable"/> event handler.
/// </exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
/// <seealso cref="Pause"/>
public void Resume()
{
/// Flushes and discards buffered audio data from the input stream.
/// </summary>
/// <exception cref="InvalidOperationException">The current state is <see cref="AudioIOState.Idle"/>.</exception>
+ /// <exception cref="ObjectDisposedException">The AudioCaptureBase has already been disposed of.</exception>
public void Flush()
{
ValidateState(AudioIOState.Running, AudioIOState.Paused);
/// </summary>
/// <param name="streamPolicy">The <see cref="AudioStreamPolicy"/> to apply for the AudioCapture.</param>
/// <exception cref="ArgumentNullException"><paramref name="streamPolicy"/> is null.</exception>
- /// <exception cref="ObjectDisposedException"><paramref name="streamPolicy"/> has already been disposed of.</exception>
+ /// <exception cref="ObjectDisposedException">
+ /// <paramref name="streamPolicy"/> has already been disposed of.<br/>
+ /// -or-<br/>
+ /// The AudioCaptureBase has already been disposed of.
+ /// </exception>
/// <exception cref="NotSupportedException"><paramref name="streamPolicy"/> is not supported.</exception>
/// <exception cref="ArgumentException">Not able to retrieve information from <paramref name="streamPolicy"/>.</exception>
public void ApplyStreamPolicy(AudioStreamPolicy streamPolicy)
/// -or-<br/>
/// <paramref name="sampleType"/> is invalid.
/// </exception>
- /// <exception cref="InvalidOperationException">The required privilege is not specified.</exception>
+ /// <exception cref="UnauthorizedAccessException">The required privilege is not specified.</exception>
/// <exception cref="NotSupportedException">The system does not support microphone.</exception>
public AudioCapture(int sampleRate, AudioChannel channel, AudioSampleType sampleType)
: base(sampleRate, channel, sampleType)
/// <returns>The buffer of audio data captured.</returns>
/// <exception cref="InvalidOperationException">The current state is not <see cref="AudioIOState.Running"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is equal to or less than zero.</exception>
+ /// <exception cref="ObjectDisposedException">The AudioCapture has already been disposed of.</exception>
public byte[] Read(int count)
{
if (count <= 0)
/// -or-<br/>
/// <paramref name="sampleType"/> is invalid.
/// </exception>
- /// <exception cref="InvalidOperationException">The required privilege is not specified.</exception>
+ /// <exception cref="UnauthorizedAccessException">The required privilege is not specified.</exception>
/// <exception cref="NotSupportedException">The system does not support microphone.</exception>
public AsyncAudioCapture(int sampleRate, AudioChannel channel, AudioSampleType sampleType)
: base(sampleRate, channel, sampleType)
public event EventHandler<MediaStreamSeekingOccurredEventArgs> SeekingOccurred;
/// <summary>
- /// Gets the max size of the buffer.
+ /// Gets or sets the max size of the buffer.
/// </summary>
/// <value>The max size of the buffer. The default is 200000.</value>
/// <remarks>If the buffer level overflows the max size, <see cref="BufferStatusChanged"/> will be raised with <see cref="MediaStreamBufferStatus.Overflow"/>.</remarks>
}
/// <summary>
- /// Gets the minimum threshold of the buffer, or zero if the <see cref="MediaStreamSource"/> is not assigned to a player.
+ /// Gets or sets the minimum threshold of the buffer.
/// </summary>
/// <value>The minimum threshold of the buffer in percentage. The default is zero.</value>
/// <remarks>If the buffer level drops below the threshold value, <see cref="BufferStatusChanged"/> will be raised with <see cref="MediaStreamBufferStatus.Underrun"/>.</remarks>
using System.IO;
using System.Threading;
using static Interop;
+using System.ComponentModel;
namespace Tizen.Multimedia
{
/// <exception cref="ObjectDisposedException">The player has already been disposed of.</exception>
/// <exception cref="ArgumentException"><paramref name="path"/> is an empty string.</exception>
/// <exception cref="FileNotFoundException">The specified path does not exist.</exception>
- /// <exception cref="ArgumentNullException">The path is null.</exception>
+ /// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
public void SetSubtitle(string path)
{
ValidateNotDisposed();
/// <summary>
/// This method supports the product infrastructure and is not intended to be used directly from application code.
/// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected static Exception GetException(int errorCode, string message) =>
((PlayerErrorCode)errorCode).GetException(message);
}
*/
using System;
+using System.ComponentModel;
using System.Diagnostics;
using Native = Interop.Display;
/// <summary>
/// This constructor supports the product infrastructure and is not intended to be used directly from application code.
/// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected PlayerDisplaySettings(Player player)
{
if (player == null)
/// Gets or sets the rotation of the display.
/// </summary>
/// <value><see cref="Rotation.Rotate0"/>, <see cref="Rotation.Rotate90"/>, <see cref="Rotation.Rotate180"/>,
- /// <see cref="Rotation.Rotate270"/></value>
+ /// <see cref="Rotation.Rotate270"/>.</value>
/// <exception cref="InvalidOperationException">
/// Operation failed; internal error.
/// </exception>