playFromFile

fun playFromFile(path: String, volume: Double, loop: Boolean = false): SoundPlaybackResult

Play a sound from a file path. The volume is specified using a normalised value between 0.0 (silence) and 1.0 (no attenuation). If loop is set true the audio will loop indefinitely. Returns a result detailing if the operation was successful.