ClientAudioSource

Represents a client-side audio source used for playing audio.

Properties

Link copied to clipboard
abstract var closeTimeoutMs: Long

Gets or sets the timeout duration in milliseconds for closing this audio source. If the source remains inactive for this duration, it will be automatically closed.

Link copied to clipboard
abstract val source: AlSource

Gets or sets the source group to which this audio source belongs.

Link copied to clipboard
abstract val sourceInfo: S

Functions

Link copied to clipboard
abstract fun canHear(): Boolean

Checks if the audio source can be heard, meaning it is within reach and activated.

Link copied to clipboard
abstract suspend fun close()

Closes the audio source.

Link copied to clipboard

Closes the audio source asynchronously.

Link copied to clipboard
abstract fun isActivated(): Boolean

Checks if the audio source is currently playing audio.

Link copied to clipboard
abstract fun isClosed(): Boolean

Checks if the audio source is closed.

Link copied to clipboard
abstract fun process(packet: SourceAudioEndPacket)

Processes an audio end packet indicating the end of audio playback.

abstract fun process(packet: SourceAudioPacket)

Processes an incoming audio packet and plays the audio.

Link copied to clipboard
abstract fun update(sourceInfo: S)

Updates the audio source with new source information.

Link copied to clipboard
open fun updateUnchecked(sourceInfo: SourceInfo)

Updates the audio source with new source information, performing unchecked type casting.