use

inline fun <T> Player.use(block: (Player) -> T): T

Extension for using Player with Kotlin's use pattern. Ensures proper cleanup even if an exception occurs.


inline fun <T> Recorder.use(block: (Recorder) -> T): T

Extension for using Recorder with Kotlin's use pattern. Ensures proper cleanup even if an exception occurs.