AudioSink.AudioSinkConfig


public final class AudioSink.AudioSinkConfig


Configuration parameters for configuring the audio sink.

Summary

Nested types

Builder for AudioSinkConfig.

Public fields

final Format

The format of audio data provided in the input buffers.

final @Nullable MediaSource.MediaPeriodId

The MediaPeriodId of the playback this audio sink is configured for, or null if undefined.

final @Nullable ImmutableIntArray

A mapping from input to output channels that is applied to this sink's input as a preprocessing step, if handling PCM input.

final int

This field is deprecated.

Use similar config values on lower-level components like preferredBufferSize instead.

final Timeline

The Timeline of the playback this audio sink is configured for, or EMPTY if undefined.

Public methods

AudioSink.AudioSinkConfig.Builder

Creates a Builder from the current values.

boolean
int

Public fields

format

public final Format format

The format of audio data provided in the input buffers.

mediaPeriodId

public final @Nullable MediaSource.MediaPeriodId mediaPeriodId

The MediaPeriodId of the playback this audio sink is configured for, or null if undefined.

Can be used together with the Timeline to identify the concrete item in the playlist.

outputChannelMapping

public final @Nullable ImmutableIntArray outputChannelMapping

A mapping from input to output channels that is applied to this sink's input as a preprocessing step, if handling PCM input. null leaves the input unchanged. Otherwise, the element at index i specifies index of the input channel to map to output channel i when preprocessing input buffers. After the map is applied the audio data will have outputChannels.length channels.

preferredBufferSizeOverride

public final int preferredBufferSizeOverride

A specific size for the playback buffer in bytes, or 0 to infer a suitable buffer size automatically.

timeline

public final Timeline timeline

The Timeline of the playback this audio sink is configured for, or EMPTY if undefined.

Can be used together with the MediaPeriodId to identify the concrete item in the playlist.

Public methods

buildUpon

public AudioSink.AudioSinkConfig.Builder buildUpon()

Creates a Builder from the current values.

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()