# AudioSink.AudioTrackConfig

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.AudioTrackConfig)

*** ** * ** ***


```
public final class AudioSink.AudioTrackConfig
```

<br />

*** ** * ** ***

Configuration parameters used for an `https://developer.android.com/reference/android/media/AudioTrack.html`.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#bufferSize()` The buffer size of the track in bytes. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#channelConfig()` The channel configuration of the track. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.Encoding https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#encoding()` The `https://developer.android.com/reference/androidx/media3/common/C.Encoding` of the audio data. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#offload()` Whether offload is enabled for this track. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#sampleRate()` The sample rate of the audio data. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#tunneling()` Whether tunneling is enabled for this track. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink.AudioTrackConfig#AudioTrackConfig(int,int,int,boolean,boolean,int)( @https://developer.android.com/reference/androidx/media3/common/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
```

The `https://developer.android.com/reference/androidx/media3/common/C.Encoding` of the audio data.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### 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 |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.Encoding int encoding` | The `https://developer.android.com/reference/androidx/media3/common/C.Encoding` of the audio data Value is one of the following: - `Format.NO_VALUE` <br /> |
| `int sampleRate` | The sample rate of the audio data. |
| `int channelConfig` | The channel configuration of the track. See ` AudioFormat.CHANNEL_OUT_XXX` constants like `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_OUT_5POINT1`. |
| `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. |