


playOnChannel ( 'woof', 'animals' ) Ī SoundChannel enables all sounds on it to be controlled as a group, providing an api to control mute, volume, pause, resume and stop, as well as a forEach method to access and perform any function on all sound instances currently on the channel.Ī SoundChannel has a singleFile property which, if set to true, will limit the channel to only playing a single sound at any one time. Sounds are registered with a SoundOptions object, containing the base data from which all instances of a sound will be created. It currently uses Howler.js for the audio backend, however this dependency is isolated into just two classes, a SoundFactory and a SoundInstance implementation that provide the bridge between SoundBoy and Howler - all SoundBoy logic and features are implemented independently of the underlying audio library. A SoundInstance is played on a SoundChannel, which provides the ability to control all sounds on that channel at once (e.g. A SoundInstance is a piece of audio that can be controlled independently, looped, execute a callback on complete and dispatch signals at various points of it's lifecycle. SoundBoy will play SoundInstances on a SoundChannel. sfx, vo, music), with a flexible approach to callbacks and sound playback/control. SoundBoy provides a simple interface through which to play sounds on different channels (e.g.
