Class AudioCaptureBase

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 directly manage the system audio input devices.

C#
Copy
public abstract class AudioCaptureBase : IDisposable
Inheritance
AudioCaptureBase
Derived

Fields

View Source

MaxSampleRate

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

Declaration
C#
Copy
public static readonly int MaxSampleRate
Field Value
Type Description
Int32
See Also
API Level: 3
View Source

MinSampleRate

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

Declaration
C#
Copy
public static readonly int MinSampleRate
Field Value
Type Description
Int32
See Also
API Level: 3

Properties

View Source

Channel

Gets the channel type of the audio input data stream.

Declaration
C#
Copy
public AudioChannel Channel { get; }
Property Value
Type Description
AudioChannel
API Level: 3
View Source

SampleRate

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

Declaration
C#
Copy
public int SampleRate { get; }
Property Value
Type Description
Int32
API Level: 3
View Source

SampleType

Gets the sample type of the audio input data stream.

Declaration
C#
Copy
public AudioSampleType SampleType { get; }
Property Value
Type Description
AudioSampleType
API Level: 3
View Source

Volume

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

Declaration
C#
Copy
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.

API Level: 8

Methods

View Source

ApplyStreamPolicy(AudioStreamPolicy)

Sets the sound stream information to the audio input.

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

The AudioStreamPolicy to apply for the AudioCapture.

API Level: 3
View Source

Dispose()

Releases all resources used by the AudioCaptureBase object.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the resources used by the AudioCaptureBase object.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

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

API Level: 3
View Source

Finalize()

Finalizes an instance of the AudioCaptureBase class.

Declaration
C#
Copy
protected void Finalize()
View Source

Flush()

Flushes and discards buffered audio data from the input stream.

Declaration
C#
Copy
public void Flush()
API Level: 3
View Source

GetBufferSize()

Gets the size allocated for the audio input buffer.

Declaration
C#
Copy
public int GetBufferSize()
Returns
Type Description
Int32

The buffer size of audio data captured.

API Level: 3
View Source

Pause()

Pauses buffering of audio data from the device.

Declaration
C#
Copy
public void Pause()
See Also
API Level: 3
View Source

Prepare()

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

Declaration
C#
Copy
public void Prepare()
See Also
API Level: 3
View Source

Resume()

Resumes buffering audio data from the device.

Declaration
C#
Copy
public void Resume()
See Also
API Level: 3
View Source

Unprepare()

Unprepares the AudioCapture.

Declaration
C#
Copy
public void Unprepare()
See Also
API Level: 3

Events

View Source

StateChanged

Occurs when the state of the AudioCapture is changed.

Declaration
C#
Copy
public event EventHandler<AudioIOStateChangedEventArgs> StateChanged
Event Type
Type Description
EventHandler<AudioIOStateChangedEventArgs>
API Level: 3

Extension Methods