public final class AudioAttributes extends Object
AudioTrack.
To set the audio attributes, create an instance using the AudioAttributes.Builder and either pass it
to the player or send a message of type Renderer#MSG_SET_AUDIO_ATTRIBUTES to the audio
renderers.
This class is based on AudioAttributes, but can be used on all supported
API versions.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AudioAttributes.Builder |
Builder for
AudioAttributes. |
| Modifier and Type | Field | Description |
|---|---|---|
int |
allowedCapturePolicy |
|
int |
contentType |
|
static AudioAttributes |
DEFAULT |
|
int |
flags |
|
int |
usage |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
AudioAttributes |
getAudioAttributesV21() |
Returns a
AudioAttributes from this instance. |
int |
hashCode() |
public static final AudioAttributes DEFAULT
@AudioContentType public final int contentType
@AudioFlags public final int flags
@AudioUsage public final int usage
@AudioAllowedCapturePolicy public final int allowedCapturePolicy
public AudioAttributes getAudioAttributesV21()
AudioAttributes from this instance.
Field allowedCapturePolicy is ignored for API levels prior to 29.