Class AudioDevice
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
Provides the ability to query the information of sound devices.
public class AudioDevice
- Inheritance
-
objectAudio
Device
Properties
View SourceId
Gets the ID of the device.
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
int | The id of the device. |
IoDirection
Gets the IO direction of the device.
Declaration
public AudioDeviceIoDirection IoDirection { get; }
Property Value
Type | Description |
---|---|
Audio |
The IO direction of the device. |
IsRunning
Gets the running state of the device.
Declaration
public bool IsRunning { get; }
Property Value
Type | Description |
---|---|
bool | true if the audio stream of device is running actually; otherwise, false. |
Name
Gets the name of the device.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string | The name of the device. |
State
Gets the state of the device.
Declaration
[Obsolete("Deprecated since API level 5. Please use the IsRunning property instead.")]
public AudioDeviceState State { get; }
Property Value
Type | Description |
---|---|
Audio |
The Audio |
Type
Gets the type of the device.
Declaration
public AudioDeviceType Type { get; }
Property Value
Type | Description |
---|---|
Audio |
The Audio |
Methods
View SourceEquals(object)
Compares an object to an instance of Audio
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | A object to compare. |
Returns
Type | Description |
---|---|
bool | true if the two devices are equal; otherwise, false. |
Overrides
GetAvoidResampling()
Gets the device's 'avoid resampling' property.
Declaration
public bool GetAvoidResampling()
Returns
Type | Description |
---|---|
bool | The 'avoid resampling' property of the device. |
Remarks
This device should be Usb
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
GetHashCode()
Gets the hash code for this instance of Audio
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code for this instance of Audio |
Overrides
GetMediaStreamOnly()
Gets the restriction of stream type only for media.
Declaration
public bool GetMediaStreamOnly()
Returns
Type | Description |
---|---|
bool | The 'media stream only' property of the device. |
Remarks
This device should be Usb
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
GetSampleFormat()
Gets the device's sample format.
Declaration
public AudioSampleFormat GetSampleFormat()
Returns
Type | Description |
---|---|
Audio |
The Audio |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
GetSampleRate()
Gets the device's sample rate.
Declaration
public uint GetSampleRate()
Returns
Type | Description |
---|---|
uint | The sample rate of the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
GetSupportedSampleFormats()
Gets the device's supported sample formats.
Declaration
public IEnumerable<AudioSampleFormat> GetSupportedSampleFormats()
Returns
Type | Description |
---|---|
System. |
An IEnumerable<AudioSampleFormat> that contains supported sample formats. |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
GetSupportedSampleRates()
Gets the device's supported sample rates.
Declaration
public IEnumerable<uint> GetSupportedSampleRates()
Returns
Type | Description |
---|---|
System. |
An IEnumerable<uint> that contains supported sample rates. |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
SetAvoidResampling(bool)
Sets the device's 'avoid resampling' property.
Declaration
public void SetAvoidResampling(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | enable | The 'avoid resampling' value to set to the device. |
Remarks
This device should be Usb
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
SetMediaStreamOnly(bool)
Sets the restriction of stream type only for media.
Declaration
public void SetMediaStreamOnly(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | enable | The 'media stream only' value to set to the device. |
Remarks
This device should be Usb
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
SetSampleFormat(AudioSampleFormat)
Sets the device's sample format.
Declaration
public void SetSampleFormat(AudioSampleFormat format)
Parameters
Type | Name | Description |
---|---|---|
Audio |
format | The Audio |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
SetSampleRate(uint)
Sets the device's sample rate.
Declaration
public void SetSampleRate(uint rate)
Parameters
Type | Name | Description |
---|---|---|
uint | rate | The sample rate to set to the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System. |
This device is not valid or is disconnected. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |