# DefaultAudioOffloadSupportProvider

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

*** ** * ** ***


```
@UnstableApi
public final class DefaultAudioOffloadSupportProvider implements DefaultAudioSink.AudioOffloadSupportProvider
```

<br />

*** ** * ** ***

Provides the `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` capabilities for a `https://developer.android.com/reference/androidx/media3/common/Format` and `https://developer.android.com/reference/androidx/media3/common/AudioAttributes`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/DefaultAudioOffloadSupportProvider#DefaultAudioOffloadSupportProvider()()` Creates an instance. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/DefaultAudioOffloadSupportProvider#DefaultAudioOffloadSupportProvider(android.content.Context)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/Context.html context)` Creates an instance. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/DefaultAudioOffloadSupportProvider#getAudioOffloadSupport(androidx.media3.common.Format,androidx.media3.common.AudioAttributes)(https://developer.android.com/reference/androidx/media3/common/Format format, https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes)` Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` the audio sink can provide for the media based on its `https://developer.android.com/reference/androidx/media3/common/Format` and `https://developer.android.com/reference/androidx/media3/common/AudioAttributes` |

## Public constructors

### DefaultAudioOffloadSupportProvider

```
public DefaultAudioOffloadSupportProvider()
```

Creates an instance.

### DefaultAudioOffloadSupportProvider

```
public DefaultAudioOffloadSupportProvider(@Nullable Context context)
```

Creates an instance.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/Context.html context` | The context used to retrieve the `https://developer.android.com/reference/android/media/AudioManager.html` parameters for checking offload variable rate support. |

## Public methods

### getAudioOffloadSupport

```
public AudioOffloadSupport getAudioOffloadSupport(Format format, AudioAttributes audioAttributes)
```

Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` the audio sink can provide for the media based on its `https://developer.android.com/reference/androidx/media3/common/Format` and `https://developer.android.com/reference/androidx/media3/common/AudioAttributes`

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format format` | The `https://developer.android.com/reference/androidx/media3/common/Format`. |
| `https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes` | The `https://developer.android.com/reference/androidx/media3/common/AudioAttributes`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` | The `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOffloadSupport` the sink can provide for the media based on its `https://developer.android.com/reference/androidx/media3/common/Format` and `https://developer.android.com/reference/androidx/media3/common/AudioAttributes`. |