public final class

AudioAttributes.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.AudioAttributes.Builder

Overview

Builder for AudioAttributes.

Summary

Constructors
publicBuilder()

Creates a new builder for AudioAttributes.

Methods
public AudioAttributesbuild()

Creates an AudioAttributes instance from this builder.

public AudioAttributes.BuildersetAllowedCapturePolicy(int allowedCapturePolicy)

See .

public AudioAttributes.BuildersetContentType(int contentType)

See

public AudioAttributes.BuildersetFlags(int flags)

See

public AudioAttributes.BuildersetSpatializationBehavior(int spatializationBehavior)

See .

public AudioAttributes.BuildersetUsage(int usage)

See

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a new builder for AudioAttributes.

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

Methods

public AudioAttributes.Builder setContentType(int contentType)

See

public AudioAttributes.Builder setFlags(int flags)

See

public AudioAttributes.Builder setUsage(int usage)

See

public AudioAttributes.Builder setAllowedCapturePolicy(int allowedCapturePolicy)

See .

public AudioAttributes.Builder setSpatializationBehavior(int spatializationBehavior)

See .

public AudioAttributes build()

Creates an AudioAttributes instance from this builder.