Skip to content

Commit

Permalink
feat: update API
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed May 28, 2024
1 parent ee82a3e commit 96d9f8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class PlasmoAudioPlayerManager(
}

val sender = source.createAudioSender(frameProvider, distance)
val job = sender.start()
.also { it.start() }
val job = sender.job ?: throw IllegalStateException("AudioSender job is not started")
sender.onStop {
player.destroy()
source.remove()
Expand Down

0 comments on commit 96d9f8a

Please sign in to comment.