AudioAttributes.Builder


public final class AudioAttributes.Builder


Builder for AudioAttributes.

Summary

Public constructors

Creates a new builder for AudioAttributes.

Public constructors

Builder

public Builder()

Creates a new builder for AudioAttributes.

By default the content type is AUDIO_CONTENT_TYPE_UNKNOWN, usage is USAGE_MEDIA, capture policy is ALLOW_CAPTURE_BY_ALL and no flags are set.

Public methods

build

public AudioAttributes build()

Creates an AudioAttributes instance from this builder.

setAllowedCapturePolicy

@CanIgnoreReturnValue
public AudioAttributes.Builder setAllowedCapturePolicy(
    @C.AudioAllowedCapturePolicy int allowedCapturePolicy
)

See setAllowedCapturePolicy.

setSpatializationBehavior

@CanIgnoreReturnValue
public AudioAttributes.Builder setSpatializationBehavior(
    @C.SpatializationBehavior int spatializationBehavior
)

See setSpatializationBehavior.