AudioSink.AudioTrackConfig


public final class AudioSink.AudioTrackConfig


Configuration parameters used for an AudioTrack.

Summary

Public fields

final int

The buffer size of the track in bytes.

final int

The channel configuration of the track.

final int
final boolean

Whether offload is enabled for this track.

final int

The sample rate of the audio data.

final boolean

Whether tunneling is enabled for this track.

Public constructors

AudioTrackConfig(
    @C.Encoding int encoding,
    int sampleRate,
    int channelConfig,
    boolean tunneling,
    boolean offload,
    int bufferSize
)

Creates the audio track configuration parameters.

Public fields

bufferSize

public final int bufferSize

The buffer size of the track in bytes.

channelConfig

public final int channelConfig

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

encoding

@C.Encoding
public final int encoding

offload

public final boolean offload

Whether offload is enabled for this track.

sampleRate

public final int sampleRate

The sample rate of the audio data.

tunneling

public final boolean tunneling

Whether tunneling is enabled for this track.

Public constructors

AudioTrackConfig

public AudioTrackConfig(
    @C.Encoding int encoding,
    int sampleRate,
    int channelConfig,
    boolean tunneling,
    boolean offload,
    int bufferSize
)

Creates the audio track configuration parameters.

Parameters
@C.Encoding int encoding

The C.Encoding of the audio data

int sampleRate

The sample rate of the audio data.

int channelConfig

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

boolean tunneling

Whether tunneling is enabled for this track.

boolean offload

Whether offload is enabled for this track.

int bufferSize

The buffer size of the track in bytes.