Class AudioAttributes

  • All Implemented Interfaces:

    public final class AudioAttributes
    extends Object
    implements Bundleable
    Deprecated. is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Attributes for audio playback, which configure the underlying platform 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.