What is the best way to convert sound.id property from nullable to nonnulable and pass it as param of play method?
class Sound() {
var id: Int? = null
}
val sound = Sound()
...
//smarcat imposible becouse 'sound.id' is mutable property that
//could have changed by this time
if(sound.id != null)
soundPool.play(sound.id, 1F, 1F, 1, 0, 1F)
//smarcat imposible becouse 'sound.id' is mutable property that
//could have changed by this time
sound.id?.let {
soundPool.play(sound.id, 1F, 1F, 1, 0, 1F)
}