# AudioOutputProvider.FormatSupport.Builder

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.FormatSupport.Builder)

*** ** * ** ***


```
class AudioOutputProvider.FormatSupport.Builder
```

<br />

*** ** * ** ***

A builder to create `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#setFormatSupportLevel(int)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.SupportLevel supportLevel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.SupportLevel` for this support. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#setIsFormatSupportedForOffload(boolean)(isFormatSupportedForOffload: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets if media format is supported in offload playback. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#setIsGaplessSupportedForOffload(boolean)(isGaplessSupportedForOffload: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether playback of the format is supported with gapless transitions for offload. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#setIsSpeedChangeSupportedForOffload(boolean)( isSpeedChangeSupportedForOffload: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Sets whether playback of the format is supported with speed changes for offload. |

## Public constructors

### Builder

```
Builder()
```

## Public functions

### build

```
fun build(): AudioOutputProvider.FormatSupport!
```

Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#isGaplessSupportedForOffload()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#isSpeedChangeSupportedForOffload()` are true when `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport.Builder#isFormatSupportedForOffload()` is false. |

### setFormatSupportLevel

```
@CanIgnoreReturnValue
fun setFormatSupportLevel(
    @AudioOutputProvider.SupportLevel supportLevel: Int
): AudioOutputProvider.FormatSupport.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.SupportLevel` for this support.

### setIsFormatSupportedForOffload

```
@CanIgnoreReturnValue
fun setIsFormatSupportedForOffload(isFormatSupportedForOffload: Boolean): AudioOutputProvider.FormatSupport.Builder!
```

Sets if media format is supported in offload playback.

Default is `false`.

### setIsGaplessSupportedForOffload

```
@CanIgnoreReturnValue
fun setIsGaplessSupportedForOffload(isGaplessSupportedForOffload: Boolean): AudioOutputProvider.FormatSupport.Builder!
```

Sets whether playback of the format is supported with gapless transitions for offload.

Default is `false`.

### setIsSpeedChangeSupportedForOffload

```
@CanIgnoreReturnValue
fun setIsSpeedChangeSupportedForOffload(
    isSpeedChangeSupportedForOffload: Boolean
): AudioOutputProvider.FormatSupport.Builder!
```

Sets whether playback of the format is supported with speed changes for offload.

Default is `false`.