Show / Hide Table of Contents

    Class AudioCapture

    Definition

    Namespace:
    Tizen.Multimedia
    Assembly:
    Tizen.Multimedia.AudioIO.dll
    API Level:
    3
    Privilege Level:
    public
    Privilege:
    http://tizen.org/privilege/recorder
    Feature:
    http://tizen.org/feature/microphone

    Provides the ability to record audio from system audio input devices in a synchronous way.

    public class AudioCapture : AudioCaptureBase, IDisposable
    Inheritance
    Object
    AudioCaptureBase
    AudioCapture
    Implements
    IDisposable

    Constructors

    View Source

    AudioCapture(Int32, AudioChannel, AudioSampleType)

    Initializes a new instance of the AudioCapture class with the specified sample rate, channel, and sampleType.

    Declaration
    public AudioCapture(int sampleRate, AudioChannel channel, AudioSampleType sampleType)
    Parameters
    Type Name Description
    Int32 sampleRate

    The audio sample rate (8000 ~ 192000Hz).

    AudioChannel channel

    The audio channel type.

    AudioSampleType sampleType

    The audio sample type.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    sampleRate is less than MinSampleRate.
    -or-
    sampleRate is greater than MaxSampleRate.

    ArgumentException

    channel is invalid.
    -or-
    sampleType is invalid.

    UnauthorizedAccessException

    The required privilege is not specified.

    NotSupportedException

    The system does not support microphone.

    API Level: 3

    Methods

    View Source

    Read(Int32)

    Reads audio data from the audio input buffer.

    Declaration
    public byte[] Read(int count)
    Parameters
    Type Name Description
    Int32 count

    The number of bytes to be read.

    Returns
    Type Description
    Byte[]

    The buffer of audio data captured.

    Exceptions
    Type Condition
    InvalidOperationException

    The current state is not Running.

    ArgumentOutOfRangeException

    count is equal to or less than zero.

    ObjectDisposedException

    The AudioCapture has already been disposed of.

    API Level: 3

    Implements

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