# AudioSink.AudioSinkConfig

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/audio/AudioSink.java+class:androidx.media3.exoplayer.audio.AudioSink.AudioSinkConfig)

*** ** * ** ***

<br />

```
public final class AudioSink.AudioSinkConfig
```

<br />

*** ** * ** ***

Configuration parameters for `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink#configure(androidx.media3.exoplayer.audio.AudioSink.AudioSinkConfig)` the audio sink.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig.Builder` Builder for `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig`. |

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#format()` The format of audio data provided in the input buffers. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#mediaPeriodId()` The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` of the playback this audio sink is configured for, or `null` if undefined. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://guava.dev/releases/snapshot-android/api/docs/com/google/common/primitives/ImmutableIntArray.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#outputChannelMapping()` 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` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#preferredBufferSizeOverride()` **This field is deprecated.** Use similar config values on lower-level components like `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#preferredBufferSize()` instead. <br /> |
| `final https://developer.android.com/reference/androidx/media3/common/Timeline` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#timeline()` The `https://developer.android.com/reference/androidx/media3/common/Timeline` of the playback this audio sink is configured for, or `https://developer.android.com/reference/androidx/media3/common/Timeline#EMPTY()` if undefined. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig.Builder` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#buildUpon()()` Creates a `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig.Builder` from the current values. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig#hashCode()()` |

## 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 `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` of the playback this audio sink is configured for, or `null` if undefined.

Can be used together with the `https://developer.android.com/reference/androidx/media3/common/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
```

> [!CAUTION]
> **This field is deprecated.**   
>
> Use similar config values on lower-level components like `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#preferredBufferSize()` instead.

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

### timeline

```
public final Timeline timeline
```

The `https://developer.android.com/reference/androidx/media3/common/Timeline` of the playback this audio sink is configured for, or `https://developer.android.com/reference/androidx/media3/common/Timeline#EMPTY()` if undefined.

Can be used together with the `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` to identify the concrete item in the playlist.

## Public methods

### buildUpon

```
public AudioSink.AudioSinkConfig.Builder buildUpon()
```

Creates a `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioSinkConfig.Builder` from the current values.

### equals

```
public boolean equals(@Nullable Object o)
```

### hashCode

```
public int hashCode()
```