# ForwardingAudioOutputProvider

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

*** ** * ** ***


```
class ForwardingAudioOutputProvider : AudioOutputProvider
```

<br />

*** ** * ** ***

A forwarding base class that delegates all calls to the provided `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#ForwardingAudioOutputProvider(androidx.media3.exoplayer.audio.AudioOutputProvider)(audioOutputProvider: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider!)` Creates the forwarding `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#addListener(androidx.media3.exoplayer.audio.AudioOutputProvider.Listener)(listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener!)` Adds a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutput!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#getAudioOutput(androidx.media3.exoplayer.audio.AudioOutputProvider.OutputConfig)(config: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig!)` Returns an `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutput` for the given config. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#getFormatSupport(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)(formatConfig: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig!)` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport` that this provider has for a given `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#getOutputConfig(androidx.media3.exoplayer.audio.AudioOutputProvider.FormatConfig)(formatConfig: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig!)` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig` for the given format. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#hasPendingReleases()()` Returns whether there are any pending asynchronous releases of audio outputs. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#release()()` Releases resources held by the provider. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#removeListener(androidx.media3.exoplayer.audio.AudioOutputProvider.Listener)(listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener!)` Removes a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/ForwardingAudioOutputProvider#setClock(androidx.media3.common.util.Clock)(clock: https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock` to use in the provider. |

### Inherited Constants

From [androidx.media3.exoplayer.audio.AudioOutputProvider](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider#FORMAT_SUPPORTED_DIRECTLY() = 2`

The provider supports the format directly, without the need for internal transcoding.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider#FORMAT_SUPPORTED_WITH_TRANSCODING() = 1`

The provider supports the format, but needs to transcode it internally to do so.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider#FORMAT_UNSUPPORTED() = 0`

The provider does not support the format.

## Public constructors

### ForwardingAudioOutputProvider

```
ForwardingAudioOutputProvider(audioOutputProvider: AudioOutputProvider!)
```

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

| Parameters |
|---|---|
| `audioOutputProvider: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider!` | The wrapped `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider`. |

## Public functions

### addListener

```
fun addListener(listener: AudioOutputProvider.Listener!): Unit
```

Adds a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener`.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener!` | The listener to add. |

### getAudioOutput

```
fun getAudioOutput(config: AudioOutputProvider.OutputConfig!): AudioOutput!
```

Returns an `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutput` for the given config.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutput!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutput`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.InitializationException` |   |

### getFormatSupport

```
fun getFormatSupport(formatConfig: AudioOutputProvider.FormatConfig!): AudioOutputProvider.FormatSupport!
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport` that this provider has for a given `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig`.

| Parameters |
|---|---|
| `formatConfig: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatSupport` for this config. |

### getOutputConfig

```
fun getOutputConfig(formatConfig: AudioOutputProvider.FormatConfig!): AudioOutputProvider.OutputConfig!
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig` for the given format.

| Parameters |
|---|---|
| `formatConfig: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.FormatConfig`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.OutputConfig` for this format. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.ConfigurationException` |   |

### hasPendingReleases

```
@UnstableApi
fun hasPendingReleases(): Boolean
```

Returns whether there are any pending asynchronous releases of audio outputs.

Implementations that release resources synchronously should return false.

### release

```
fun release(): Unit
```

Releases resources held by the provider.

### removeListener

```
fun removeListener(listener: AudioOutputProvider.Listener!): Unit
```

Removes a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener`.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/audio/AudioOutputProvider.Listener!` | The listener to remove. |

### setClock

```
@UnstableApi
fun setClock(clock: Clock!): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock` to use in the provider.