# AudioOutputProvider.FormatConfig

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/AudioOutputProvider.java+class:androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)

*** ** * ** ***


```
public final class AudioOutputProvider.FormatConfig
```

<br />

*** ** * ** ***

Configuration for an audio format and its output preferences.

## Summary

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

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/androidx/media3/common/AudioAttributes` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#audioAttributes()` The `https://developer.android.com/reference/androidx/media3/common/AudioAttributes` to use for playback. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#audioSessionId()` The audio session ID, or `https://developer.android.com/reference/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if not set. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#enableHighResolutionPcmOutput()` Sets whether to enable high resolution PCM output with more than 16 bits. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#enableOffload()` Whether the audio output should enable offload. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#enablePlaybackParameters()` Whether to control the playback speed using the audio output. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#enableTunneling()` Whether tunneling is enabled. |
| `final https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#format()` The `https://developer.android.com/reference/androidx/media3/common/Format` of the audio. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#preferredBufferSize()` The preferred buffer size in bytes, or `https://developer.android.com/reference/androidx/media3/common/C#LENGTH_UNSET()` if no preference is specified. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/AudioDeviceInfo.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#preferredDevice()` The preferred `https://developer.android.com/reference/android/media/AudioDeviceInfo.html` for audio output, or null for no preference. |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#virtualDeviceId()` The virtual device ID, or `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()` if not specified. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig.Builder` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig#buildUpon()()` Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig.Builder` initialized with the values of this instance. |

## Public fields

### audioAttributes

```
public final AudioAttributes audioAttributes
```

The `https://developer.android.com/reference/androidx/media3/common/AudioAttributes` to use for playback.

### audioSessionId

```
public final int audioSessionId
```

The audio session ID, or `https://developer.android.com/reference/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if not set.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

### enableHighResolutionPcmOutput

```
public final boolean enableHighResolutionPcmOutput
```

Sets whether to enable high resolution PCM output with more than 16 bits.

### enableOffload

```
public final boolean enableOffload
```

Whether the audio output should enable offload.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

### enablePlaybackParameters

```
public final boolean enablePlaybackParameters
```

Whether to control the playback speed using the audio output.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

### enableTunneling

```
public final boolean enableTunneling
```

Whether tunneling is enabled.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

### format

```
public final Format format
```

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

### preferredBufferSize

```
public final int preferredBufferSize
```

The preferred buffer size in bytes, or `https://developer.android.com/reference/androidx/media3/common/C#LENGTH_UNSET()` if no preference is specified.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

### preferredDevice

```
public final @Nullable AudioDeviceInfo preferredDevice
```

The preferred `https://developer.android.com/reference/android/media/AudioDeviceInfo.html` for audio output, or null for no preference.

### virtualDeviceId

```
public final int virtualDeviceId
```

The virtual device ID, or `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()` if not specified.

This parameter should not generally affect the outcome of `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)`.

## Public methods

### buildUpon

```
public AudioOutputProvider.FormatConfig.Builder buildUpon()
```

Returns a `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig.Builder` initialized with the values of this instance.