public final class AudioCapabilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static AudioCapabilities |
DEFAULT_AUDIO_CAPABILITIES
The minimum audio capabilities supported by all devices.
|
| Constructor and Description |
|---|
AudioCapabilities(int[] supportedEncodings,
int maxChannelCount)
Constructs new audio capabilities based on a set of supported encodings and a maximum channel
count.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
static AudioCapabilities |
getCapabilities(android.content.Context context)
Returns the current audio capabilities for the device.
|
int |
getMaxChannelCount()
Returns the maximum number of channels the device can play at the same time.
|
int |
hashCode() |
boolean |
supportsEncoding(int encoding)
Returns whether this device supports playback of the specified audio
encoding. |
java.lang.String |
toString() |
public static final AudioCapabilities DEFAULT_AUDIO_CAPABILITIES
public AudioCapabilities(@Nullable
int[] supportedEncodings,
int maxChannelCount)
Applications should generally call getCapabilities(Context) to obtain an instance
based on the capabilities advertised by the platform, rather than calling this constructor.
supportedEncodings - Supported audio encodings from AudioFormat's
ENCODING_* constants. Passing null indicates that no encodings are
supported.maxChannelCount - The maximum number of audio channels that can be played simultaneously.public static AudioCapabilities getCapabilities(android.content.Context context)
context - A context for obtaining the current audio capabilities.public boolean supportsEncoding(int encoding)
encoding.encoding - One of AudioFormat's ENCODING_* constants.encoding.public int getMaxChannelCount()
public boolean equals(@Nullable
java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object