# AudioOutput.Listener

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

*** ** * ** ***


```
public interface AudioOutput.Listener
```

<br />

*** ** * ** ***

Listener for `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput` events.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput.Listener#onOffloadDataRequest()()` Called when `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput#isOffloadedPlayback()` is true and new data is requested. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput.Listener#onOffloadPresentationEnded()()` Called when `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput#isOffloadedPlayback()` is true and all previously written data has been decoded and written to the output device. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput.Listener#onPositionAdvancing(long)(long playoutStartSystemTimeMs)` Called when the audio position is advancing. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput.Listener#onReleased()()` Called when the audio output has been fully released. |
| `abstract void` | `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput.Listener#onUnderrun()()` Called when the audio output had an underrun. |

## Public methods

### onOffloadDataRequest

```
abstract void onOffloadDataRequest()
```

Called when `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput#isOffloadedPlayback()` is true and new data is requested.

### onOffloadPresentationEnded

```
abstract void onOffloadPresentationEnded()
```

Called when `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioOutput#isOffloadedPlayback()` is true and all previously written data has been decoded and written to the output device.

### onPositionAdvancing

```
abstract void onPositionAdvancing(long playoutStartSystemTimeMs)
```

Called when the audio position is advancing.

| Parameters |
|---|---|
| `long playoutStartSystemTimeMs` | The `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` when the playout started. |

### onReleased

```
abstract void onReleased()
```

Called when the audio output has been fully released.

### onUnderrun

```
abstract void onUnderrun()
```

Called when the audio output had an underrun.