# 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)

*** ** * ** ***


```
public final class AudioOutputProvider.FormatSupport.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

```
public Builder()
```

## Public methods

### build

```
public AudioOutputProvider.FormatSupport build()
```

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

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

### setFormatSupportLevel

```
@CanIgnoreReturnValue
public AudioOutputProvider.FormatSupport.Builder setFormatSupportLevel(
    @AudioOutputProvider.SupportLevel int supportLevel
)
```

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

### setIsFormatSupportedForOffload

```
@CanIgnoreReturnValue
public AudioOutputProvider.FormatSupport.Builder setIsFormatSupportedForOffload(boolean isFormatSupportedForOffload)
```

Sets if media format is supported in offload playback.

Default is `false`.

### setIsGaplessSupportedForOffload

```
@CanIgnoreReturnValue
public AudioOutputProvider.FormatSupport.Builder setIsGaplessSupportedForOffload(boolean isGaplessSupportedForOffload)
```

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

Default is `false`.

### setIsSpeedChangeSupportedForOffload

```
@CanIgnoreReturnValue
public AudioOutputProvider.FormatSupport.Builder setIsSpeedChangeSupportedForOffload(
    boolean isSpeedChangeSupportedForOffload
)
```

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

Default is `false`.