AudioPlaybackSession

Represents an active playback session.

Inheritors

Types

Link copied to clipboard
sealed class State

Represents the state of a playback session.

Properties

Link copied to clipboard
abstract val audioFlow: StateFlow<AudioFlow?>

A flow that emits the current loaded audio data.

Link copied to clipboard
abstract val state: StateFlow<AudioPlaybackSession.State>

A flow that emits the current state of the playback.

Functions

Link copied to clipboard
abstract suspend fun load(audioFlow: AudioFlow)

Loads the given audio data.

Link copied to clipboard
abstract fun pause()

Pauses the playback.

Link copied to clipboard
abstract suspend fun play()

Starts playback of the given audio data.

Link copied to clipboard
abstract fun resume()

Resumes paused playback.

Link copied to clipboard
abstract fun stop()

Stops the playback entirely.