Class AudioCaptureBase

    Definition

    Namespace:
    Tizen.Multimedia
    Assembly:
    Tizen.Multimedia.AudioIO.dll

    Provides the ability to directly manage the system audio input devices.

    public abstract class AudioCaptureBase : IDisposable
    Inheritance
    object
    AudioCaptureBase
    Derived
    AsyncAudioCapture
    AsyncAudioCapture
    AudioCapture
    AudioCapture
    Implements
    System.IDisposable

    Fields

    View Source

    MaxSampleRate

    Specifies the maximum value allowed for the audio capture, in Hertz (Hz).

    Declaration
    public static readonly int MaxSampleRate
    Field Value
    Type Description
    int
    See Also
    SampleRate
    View Source

    MinSampleRate

    Specifies the minimum value allowed for the audio capture, in Hertz (Hz).

    Declaration
    public static readonly int MinSampleRate
    Field Value
    Type Description
    int
    See Also
    SampleRate

    Properties

    View Source

    Channel

    Gets the channel type of the audio input data stream.

    Declaration
    public AudioChannel Channel { get; }
    Property Value
    Type Description
    AudioChannel
    View Source

    SampleRate

    Gets the sample rate of the audio input data stream, in Hertz (Hz).

    Declaration
    public int SampleRate { get; }
    Property Value
    Type Description
    int
    View Source

    SampleType

    Gets the sample type of the audio input data stream.

    Declaration
    public AudioSampleType SampleType { get; }
    Property Value
    Type Description
    AudioSampleType
    View Source

    Volume

    Gets or sets the volume of the audio input data stream.

    Declaration
    public double Volume { get; set; }
    Property Value
    Type Description
    double

    The default value is 1.0.
    The valid range is greater than or equal to 0.0 and less than or equal to 2.0.
    Note that if the value is less than 0.0, it will be set 0.0 and if the value is greater than 2.0, it will be set 2.0.

    Remarks

    If the value is less than 1.0, the loudness of recorded data will be decreased.
    If the value is greater than 1.0, the loudness of recorded data will be increased.
    Note that the volume can be clipped if the value is greater than 1.0 and the loudness of original recorded data is high enough.

    Exceptions
    Type Condition
    System.ObjectDisposedException

    The AudioCapture has already been disposed.

    Methods

    View Source

    ApplyStreamPolicy(AudioStreamPolicy)

    Sets the sound stream information to the audio input.

    Declaration
    public void ApplyStreamPolicy(AudioStreamPolicy streamPolicy)
    Parameters
    Type Name Description
    AudioStreamPolicy streamPolicy

    The AudioStreamPolicy to apply for the AudioCapture.

    Exceptions
    Type Condition
    System.ArgumentNullException

    streamPolicy is null.

    System.ObjectDisposedException

    streamPolicy has already been disposed of.
    -or-
    The AudioCaptureBase has already been disposed of.

    System.NotSupportedException

    streamPolicy is not supported.

    System.ArgumentException

    Not able to retrieve information from streamPolicy.

    View Source

    Dispose()

    Releases all resources used by the AudioCaptureBase object.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Releases the resources used by the AudioCaptureBase object.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    View Source

    ~AudioCaptureBase()

    Finalizes an instance of the AudioCaptureBase class.

    Declaration
    protected ~AudioCaptureBase()
    View Source

    Flush()

    Flushes and discards buffered audio data from the input stream.

    Declaration
    public void Flush()
    Exceptions
    Type Condition
    System.InvalidOperationException

    The current state is Idle.

    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    View Source

    GetBufferSize()

    Gets the size allocated for the audio input buffer.

    Declaration
    public int GetBufferSize()
    Returns
    Type Description
    int

    The buffer size of audio data captured.

    Exceptions
    Type Condition
    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    View Source

    Pause()

    Pauses buffering of audio data from the device.

    Declaration
    public void Pause()
    Exceptions
    Type Condition
    System.InvalidOperationException

    The current state is Idle.
    -or-
    The method is called in the DataAvailable event handler.

    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    See Also
    Resume()
    View Source

    Prepare()

    Prepares the AudioCapture for reading audio data by starting buffering of audio data from the device.

    Declaration
    public void Prepare()
    Exceptions
    Type Condition
    System.InvalidOperationException

    Operation failed due to an internal error.
    -or-
    The current state is not Idle.

    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    See Also
    Unprepare()
    View Source

    Resume()

    Resumes buffering audio data from the device.

    Declaration
    public void Resume()
    Exceptions
    Type Condition
    System.InvalidOperationException

    The current state is Idle.
    -or-
    The method is called in the DataAvailable event handler.

    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    See Also
    Pause()
    View Source

    Unprepare()

    Unprepares the AudioCapture.

    Declaration
    public void Unprepare()
    Exceptions
    Type Condition
    System.InvalidOperationException

    Operation failed due to an internal error.
    -or-
    The current state is Idle.

    System.ObjectDisposedException

    The AudioCaptureBase has already been disposed of.

    See Also
    Prepare()

    Events

    View Source

    StateChanged

    Occurs when the state of the AudioCapture is changed.

    Declaration
    public event EventHandler<AudioIOStateChangedEventArgs> StateChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><AudioIOStateChangedEventArgs>

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX