Class AudioAttributes
- java.lang.Object
-
- com.google.android.exoplayer2.audio.AudioAttributes
-
- All Implemented Interfaces:
Bundleable
@Deprecated public final class AudioAttributes extends Object implements Bundleable
Deprecated.com.google.android.exoplayer2 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 platformAudioTrack.To set the audio attributes, create an instance using the
AudioAttributes.Builderand either pass it to the player or send a message of typeRenderer#MSG_SET_AUDIO_ATTRIBUTESto the audio renderers.This class is based on
AudioAttributes, but can be used on all supported API versions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAudioAttributes.AudioAttributesV21Deprecated.A direct wrapper aroundAudioAttributes.static classAudioAttributes.BuilderDeprecated.Builder forAudioAttributes.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description @com.google.android.exoplayer2.C.AudioAllowedCapturePolicy intallowedCapturePolicyDeprecated.@com.google.android.exoplayer2.C.AudioContentType intcontentTypeDeprecated.TheC.AudioContentType.static Bundleable.Creator<AudioAttributes>CREATORDeprecated.Object that can restoreAudioAttributesfrom aBundle.static AudioAttributesDEFAULTDeprecated.The default audio attributes, where the content type isC.AUDIO_CONTENT_TYPE_UNKNOWN, usage isC.USAGE_MEDIA, capture policy isC.ALLOW_CAPTURE_BY_ALLand no flags are set.@com.google.android.exoplayer2.C.AudioFlags intflagsDeprecated.TheC.AudioFlags.@com.google.android.exoplayer2.C.SpatializationBehavior intspatializationBehaviorDeprecated.@com.google.android.exoplayer2.C.AudioUsage intusageDeprecated.TheC.AudioUsage.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Deprecated.AudioAttributes.AudioAttributesV21getAudioAttributesV21()Deprecated.Returns aAudioAttributes.AudioAttributesV21from this instance.inthashCode()Deprecated.BundletoBundle()Deprecated.Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
DEFAULT
public static final AudioAttributes DEFAULT
Deprecated.The default audio attributes, where the content type isC.AUDIO_CONTENT_TYPE_UNKNOWN, usage isC.USAGE_MEDIA, capture policy isC.ALLOW_CAPTURE_BY_ALLand no flags are set.
-
contentType
@AudioContentType public final @com.google.android.exoplayer2.C.AudioContentType int contentType
Deprecated.TheC.AudioContentType.
-
flags
@AudioFlags public final @com.google.android.exoplayer2.C.AudioFlags int flags
Deprecated.TheC.AudioFlags.
-
usage
@AudioUsage public final @com.google.android.exoplayer2.C.AudioUsage int usage
Deprecated.TheC.AudioUsage.
-
allowedCapturePolicy
@AudioAllowedCapturePolicy public final @com.google.android.exoplayer2.C.AudioAllowedCapturePolicy int allowedCapturePolicy
Deprecated.
-
spatializationBehavior
public final @com.google.android.exoplayer2.C.SpatializationBehavior int spatializationBehavior
Deprecated.
-
CREATOR
public static final Bundleable.Creator<AudioAttributes> CREATOR
Deprecated.Object that can restoreAudioAttributesfrom aBundle.
-
-
Method Detail
-
getAudioAttributesV21
@RequiresApi(21) public AudioAttributes.AudioAttributesV21 getAudioAttributesV21()
Deprecated.Returns aAudioAttributes.AudioAttributesV21from this instance.Some fields are ignored if the corresponding
AudioAttributes.Buildersetter is not available on the current API level.
-
toBundle
public Bundle toBundle()
Deprecated.Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-