public final class

AudioSink.AudioTrackConfig

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.audio.AudioSink.AudioTrackConfig

Overview

Configuration parameters used for an AudioTrack.

Summary

Fields
public final intbufferSize

The buffer size of the track in bytes.

public final intchannelConfig

The channel configuration of the track.

public final intencoding

public final booleanoffload

Whether offload is enabled for this track.

public final intsampleRate

The sample rate of the audio data.

public final booleantunneling

Whether tunneling is enabled for this track.

Constructors
publicAudioTrackConfig(int encoding, int sampleRate, int channelConfig, boolean tunneling, boolean offload, int bufferSize)

Creates the audio track configuration parameters.

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

Fields

public final int encoding

public final int sampleRate

The sample rate of the audio data.

public final int channelConfig

The channel configuration of the track. See AudioTrack.CHANNEL_OUT_XXX constants.

public final boolean tunneling

Whether tunneling is enabled for this track.

public final boolean offload

Whether offload is enabled for this track.

public final int bufferSize

The buffer size of the track in bytes.

Constructors

public AudioTrackConfig(int encoding, int sampleRate, int channelConfig, boolean tunneling, boolean offload, int bufferSize)

Creates the audio track configuration parameters.

Parameters:

encoding: The of the audio data
sampleRate: The sample rate of the audio data.
channelConfig: The channel configuration of the track. See AudioTrack.CHANNEL_OUT_XXX constants.
tunneling: Whether tunneling is enabled for this track.
offload: Whether offload is enabled for this track.
bufferSize: The buffer size of the track in bytes.