class Audio
package iron.system
Audio playback. This class wraps around kha.audio1.Audio.
Static methods
staticplay(sound:Sound, loop:Bool = false, stream:Bool = false):Null<AudioChannel>
Plays the given sound.
If stream is true and the sound has compressed data, it is streamed
from disk instead of being fully loaded into memory. This is useful for
longer sounds such as background music.
This function returns null if:
- there is no unoccupied audio channel available for playback.
- the sound has compressed data only but
streamisfalse. In this case, callkha.Sound.uncompress()first.