Class AudioDevice
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
- API Level:
- 3
Provides the ability to query the information of sound devices.
C#Copypublic class AudioDevice
- Inheritance
-
System.ObjectAudioDevice
Properties
Declaration
C#Copypublic int Id { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The id of the device. |
API Level: 3
Declaration
C#Copypublic AudioDeviceIoDirection IoDirection { get; }
Property Value
Type | Description |
---|---|
AudioDeviceIoDirection | The IO direction of the device. |
API Level: 3
Declaration
C#Copypublic bool IsRunning { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the audio stream of device is running actually; otherwise, false. |
API Level: 5
Declaration
C#Copypublic string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the device. |
API Level: 3
Declaration
C#Copypublic AudioDeviceType Type { get; }
Property Value
Type | Description |
---|---|
AudioDeviceType | The AudioDeviceType of the device. |
API Level: 3
Methods
Declaration
C#Copypublic override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | A System.Object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the two devices are equal; otherwise, false. |
Overrides
API Level: 4
Declaration
C#Copypublic bool GetAvoidResampling()
Returns
Type | Description |
---|---|
System.Boolean | The 'avoid resampling' property of the device. |
Remarks
This device should be UsbAudio type and Output direction. This property is not enabled as default. With this enabled, this device will use the first stream's original sample format and rate without resampling if supported.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this instance of AudioDevice. |
Overrides
API Level: 4
Declaration
C#Copypublic bool GetMediaStreamOnly()
Returns
Type | Description |
---|---|
System.Boolean | The 'media stream only' property of the device. |
Remarks
This device should be UsbAudio type and Output direction. This property is not enabled as default. With this enabled, no other stream types except Media are not allowed to this device.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic AudioSampleFormat GetSampleFormat()
Returns
Type | Description |
---|---|
AudioSampleFormat | The AudioSampleFormat of the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic uint GetSampleRate()
Returns
Type | Description |
---|---|
System.UInt32 | The sample rate of the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic IEnumerable<AudioSampleFormat> GetSupportedSampleFormats()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AudioSampleFormat> | An IEnumerable<AudioSampleFormat> that contains supported sample formats. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic IEnumerable<uint> GetSupportedSampleRates()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.UInt32> | An IEnumerable<uint> that contains supported sample rates. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic void SetAvoidResampling(bool enable)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enable | The 'avoid resampling' value to set to the device. |
Remarks
This device should be UsbAudio type and Output direction. This property is not enabled as default. With this enabled, this device will use the first stream's original sample format and rate without resampling if supported.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic void SetMediaStreamOnly(bool enable)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enable | The 'media stream only' value to set to the device. |
Remarks
This device should be UsbAudio type and Output direction. This property is not enabled as default. With this enabled, no other stream types except Media are not allowed to this device.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic void SetSampleFormat(AudioSampleFormat format)
Parameters
Type | Name | Description |
---|---|---|
AudioSampleFormat | format | The AudioSampleFormat to set to the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic void SetSampleRate(uint rate)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | rate | The sample rate to set to the device. |
Remarks
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This device is not valid or is disconnected. |
API Level: 5
Declaration
C#Copypublic override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |