Class AudioAttributes.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.audio.AudioAttributes.Builder
-
- Enclosing class:
- AudioAttributes
public static final class AudioAttributes.Builder extends Object
Builder forAudioAttributes
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new builder forAudioAttributes
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AudioAttributes
build()
Creates anAudioAttributes
instance from this builder.AudioAttributes.Builder
setAllowedCapturePolicy(@com.google.android.exoplayer2.C.AudioAllowedCapturePolicy int allowedCapturePolicy)
AudioAttributes.Builder
setContentType(@com.google.android.exoplayer2.C.AudioContentType int contentType)
AudioAttributes.Builder
setFlags(@com.google.android.exoplayer2.C.AudioFlags int flags)
AudioAttributes.Builder
setSpatializationBehavior(@com.google.android.exoplayer2.C.SpatializationBehavior int spatializationBehavior)
AudioAttributes.Builder
setUsage(@com.google.android.exoplayer2.C.AudioUsage int usage)
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new builder forAudioAttributes
.By default the content type is
C.AUDIO_CONTENT_TYPE_UNKNOWN
, usage isC.USAGE_MEDIA
, capture policy isC.ALLOW_CAPTURE_BY_ALL
and no flags are set.
-
-
Method Detail
-
setContentType
@CanIgnoreReturnValue public AudioAttributes.Builder setContentType(@AudioContentType @com.google.android.exoplayer2.C.AudioContentType int contentType)
-
setFlags
@CanIgnoreReturnValue public AudioAttributes.Builder setFlags(@AudioFlags @com.google.android.exoplayer2.C.AudioFlags int flags)
-
setUsage
@CanIgnoreReturnValue public AudioAttributes.Builder setUsage(@AudioUsage @com.google.android.exoplayer2.C.AudioUsage int usage)
-
setAllowedCapturePolicy
@CanIgnoreReturnValue public AudioAttributes.Builder setAllowedCapturePolicy(@AudioAllowedCapturePolicy @com.google.android.exoplayer2.C.AudioAllowedCapturePolicy int allowedCapturePolicy)
-
setSpatializationBehavior
@CanIgnoreReturnValue public AudioAttributes.Builder setSpatializationBehavior(@com.google.android.exoplayer2.C.SpatializationBehavior int spatializationBehavior)
-
build
public AudioAttributes build()
Creates anAudioAttributes
instance from this builder.
-
-