whileNotFinishedAsync

suspend fun whileNotFinishedAsync(func: suspend () -> Unit)

Executes a suspend function while any audio track in the pool is still playing.

Parameters

func

The suspend function to execute.


suspend fun whileNotFinishedAsync(id: String, func: suspend () -> Unit)

Executes a suspend function while the audio track with the specified ID is still playing.

Parameters

id

The ID of the audio track to monitor.

func

The suspend function to execute.