public final class AudioDeviceInfo extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_AUX_LINE
A device type describing the auxiliary line-level connectors.
|
static int |
TYPE_BLUETOOTH_A2DP
A device type describing a Bluetooth device supporting the A2DP profile.
|
static int |
TYPE_BLUETOOTH_SCO
A device type describing a Bluetooth device typically used for telephony.
|
static int |
TYPE_BUILTIN_EARPIECE
A device type describing the attached earphone speaker.
|
static int |
TYPE_BUILTIN_MIC
A device type describing the microphone(s) built in a device.
|
static int |
TYPE_BUILTIN_SPEAKER
A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built
in a device.
|
static int |
TYPE_BUS
A type-agnostic device used for communication with external audio systems
|
static int |
TYPE_DOCK
A device type describing the audio device associated with a dock.
|
static int |
TYPE_FM
A device type associated with the transmission of audio signals over FM.
|
static int |
TYPE_FM_TUNER
A device type for accessing the audio content transmitted over FM.
|
static int |
TYPE_HDMI
A device type describing an HDMI connection .
|
static int |
TYPE_HDMI_ARC
A device type describing the Audio Return Channel of an HDMI connection.
|
static int |
TYPE_IP
A device type connected over IP.
|
static int |
TYPE_LINE_ANALOG
A device type describing an analog line-level connection.
|
static int |
TYPE_LINE_DIGITAL
A device type describing a digital line connection (e.g.
|
static int |
TYPE_TELEPHONY
A device type describing the transmission of audio signals over the telephony network.
|
static int |
TYPE_TV_TUNER
A device type for accessing the audio content transmitted over the TV tuner system.
|
static int |
TYPE_UNKNOWN
A device type associated with an unknown or uninitialized device.
|
static int |
TYPE_USB_ACCESSORY
A device type describing a USB audio device in accessory mode.
|
static int |
TYPE_USB_DEVICE
A device type describing a USB audio device.
|
static int |
TYPE_WIRED_HEADPHONES
A device type describing a pair of wired headphones.
|
static int |
TYPE_WIRED_HEADSET
A device type describing a headset, which is the combination of a headphones and microphone.
|
Modifier and Type | Method and Description |
---|---|
static int |
convertDeviceTypeToInternalDevice(int deviceType) |
static int |
convertInternalDeviceToDeviceType(int intDevice) |
String |
getAddress() |
int[] |
getChannelCounts() |
int[] |
getChannelIndexMasks() |
int[] |
getChannelMasks() |
int[] |
getEncodings() |
int |
getId() |
CharSequence |
getProductName() |
int[] |
getSampleRates() |
int |
getType() |
boolean |
isSink() |
boolean |
isSource() |
public static final int TYPE_UNKNOWN
public static final int TYPE_BUILTIN_EARPIECE
public static final int TYPE_BUILTIN_SPEAKER
public static final int TYPE_WIRED_HEADSET
public static final int TYPE_WIRED_HEADPHONES
public static final int TYPE_LINE_ANALOG
public static final int TYPE_LINE_DIGITAL
public static final int TYPE_BLUETOOTH_SCO
public static final int TYPE_BLUETOOTH_A2DP
public static final int TYPE_HDMI
public static final int TYPE_HDMI_ARC
public static final int TYPE_USB_DEVICE
public static final int TYPE_USB_ACCESSORY
public static final int TYPE_DOCK
public static final int TYPE_FM
public static final int TYPE_BUILTIN_MIC
public static final int TYPE_FM_TUNER
public static final int TYPE_TV_TUNER
public static final int TYPE_TELEPHONY
public static final int TYPE_AUX_LINE
public static final int TYPE_IP
public static final int TYPE_BUS
public int getId()
public CharSequence getProductName()
public String getAddress()
public boolean isSource()
public boolean isSink()
public int[] getSampleRates()
public int[] getChannelMasks()
AudioFormat.CHANNEL_IN_STEREO
,
AudioFormat.CHANNEL_OUT_7POINT1
) for which this audio device can be configured.Note: an empty array indicates that the device supports arbitrary channel masks.
public int[] getChannelIndexMasks()
Note: an empty array indicates that the device supports arbitrary channel index masks.
public int[] getChannelCounts()
public int[] getEncodings()
AudioFormat.ENCODING_PCM_16BIT
,
AudioFormat.ENCODING_PCM_FLOAT
) supported by the audio device.
ENCODING_PCM_FLOAT
indicates the device supports more
than 16 bits of integer precision. As there is no AudioFormat constant
specifically defined for 24-bit PCM, the value ENCODING_PCM_FLOAT
indicates that AudioTrack
or AudioRecord
can preserve at least 24 bits of
integer precision to that device.Note: an empty array indicates that the device supports arbitrary encodings.
public int getType()
public static int convertDeviceTypeToInternalDevice(int deviceType)
public static int convertInternalDeviceToDeviceType(int intDevice)