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.
public abstract class AudioCaptureBase : IDisposable
- Inheritance
-
AudioCaptureBase
- Derived
- Implements
Fields
View SourceMaxSampleRate
Specifies the maximum value allowed for the audio capture, in Hertz (Hz).
Declaration
public static readonly int MaxSampleRate
Field Value
Type | Description |
---|---|
Int32 |
See Also
API Level: 3
View SourceMinSampleRate
Specifies the minimum value allowed for the audio capture, in Hertz (Hz).
Declaration
public static readonly int MinSampleRate
Field Value
Type | Description |
---|---|
Int32 |
See Also
API Level: 3
Properties
View SourceChannel
Gets the channel type of the audio input data stream.
Declaration
public AudioChannel Channel { get; }
Property Value
Type | Description |
---|---|
AudioChannel |
API Level: 3
View SourceSampleRate
Gets the sample rate of the audio input data stream, in Hertz (Hz).
Declaration
public int SampleRate { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
View SourceSampleType
Gets the sample type of the audio input data stream.
Declaration
public AudioSampleType SampleType { get; }
Property Value
Type | Description |
---|---|
AudioSampleType |
API Level: 3
View SourceVolume
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. |
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 |
---|---|
ObjectDisposedException | The AudioCapture has already been disposed. |
API Level: 8
Methods
View SourceApplyStreamPolicy(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 |
---|---|
ArgumentNullException |
|
ObjectDisposedException |
|
NotSupportedException |
|
ArgumentException | Not able to retrieve information from |
API Level: 3
View SourceDispose()
Releases all resources used by the AudioCaptureBase object.
Declaration
public void Dispose()
API Level: 3
View SourceDispose(Boolean)
Releases the resources used by the AudioCaptureBase object.
Declaration
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 SourceFinalize()
Finalizes an instance of the AudioCaptureBase class.
Declaration
protected void Finalize()
Flush()
Flushes and discards buffered audio data from the input stream.
Declaration
public void Flush()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is Idle. |
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
API Level: 3
View SourceGetBufferSize()
Gets the size allocated for the audio input buffer.
Declaration
public int GetBufferSize()
Returns
Type | Description |
---|---|
Int32 | The buffer size of audio data captured. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
API Level: 3
View SourcePause()
Pauses buffering of audio data from the device.
Declaration
public void Pause()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is Idle. |
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
See Also
API Level: 3
View SourcePrepare()
Prepares the AudioCapture for reading audio data by starting buffering of audio data from the device.
Declaration
public void Prepare()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Operation failed due to an internal error. |
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
See Also
API Level: 3
View SourceResume()
Resumes buffering audio data from the device.
Declaration
public void Resume()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current state is Idle. |
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
See Also
API Level: 3
View SourceUnprepare()
Unprepares the AudioCapture.
Declaration
public void Unprepare()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Operation failed due to an internal error. |
ObjectDisposedException | The AudioCaptureBase has already been disposed of. |
See Also
API Level: 3
Events
View SourceStateChanged
Occurs when the state of the AudioCapture is changed.
Declaration
public event EventHandler<AudioIOStateChangedEventArgs> StateChanged
Event Type
Type | Description |
---|---|
EventHandler<AudioIOStateChangedEventArgs> |