This page is work-in-progress. You can reach me on twitter or mail to email@example.com
Instance of SoundOnDemand.Sound - representation of a sound being played through a channel.
Sound cannot play itself. It needs to get through a channel.
var sound = channel.play("explosion");
Volume, pan and playback rate (pitch):
Play a loop:
var song = channel.play("mysong").loop();
song.fadeOut(duration); song.fadeIn(duration); song.fadeTo(volume, duration);
Duration is provided in seconds - for example 0.5 is half of a second.
Stop, pause, resume
song.pause(); song.stop(); song.resume();