# AudioOffloadSupport.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/AudioOffloadSupport.java+class:androidx.media3.exoplayer.audio.AudioOffloadSupport.Builder)

*** ** * ** ***


```
public final class AudioOffloadSupport.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#build()()` Builds the `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#setIsFormatSupported(boolean)(boolean isFormatSupported)` Sets if media format is supported in offload playback. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#setIsGaplessSupported(boolean)(boolean isGaplessSupported)` Sets whether playback of the format is supported with gapless transitions. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#setIsSpeedChangeSupported(boolean)(boolean isSpeedChangeSupported)` Sets whether playback of the format is supported with speed changes. |

## Public constructors

### Builder

```
public Builder()
```

### Builder

```
public Builder(AudioOffloadSupport audioOffloadSupport)
```

## Public methods

### build

```
public AudioOffloadSupport build()
```

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

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If either `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#isGaplessSupported()` or `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#isSpeedChangeSupported()` are true when `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport.Builder#isFormatSupported()` is false. |

### setIsFormatSupported

```
@CanIgnoreReturnValue
public AudioOffloadSupport.Builder setIsFormatSupported(boolean isFormatSupported)
```

Sets if media format is supported in offload playback.

Default is `false`.

### setIsGaplessSupported

```
@CanIgnoreReturnValue
public AudioOffloadSupport.Builder setIsGaplessSupported(boolean isGaplessSupported)
```

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

Default is `false`.

### setIsSpeedChangeSupported

```
@CanIgnoreReturnValue
public AudioOffloadSupport.Builder setIsSpeedChangeSupported(boolean isSpeedChangeSupported)
```

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

Default is `false`.