The number of iterations before AudioPool.cleanCache is automatically called.
List of media sources used by this Pool.
Fires when the Pool stops and is not looping.
Fires for each drop in the Pool. Callback is passed the drop index.
The number of times the present run will drop.
The distribution weighting for drops in the Pool * (1 = neutral, lower = later, higher = earlier). Uses weightedRandom under the hood.
NB: This will be changed to use a distribution function in future versions.
Total duration of the current iteration of the pool (ms).
Whether the Pool should restart when it ends.
Determines whether the Assets will be played in order or at random. (To weight the randomness, add duplicate Assets.)
Fires when the Pool is paused.
Fires when a sound begins to play. Use this instead of Pool.drop$ to gain access to the sound's HowlReference.
Fires when the Pool is resumed.
Fires at the start of a Pool cycle.
Fires at the end of a Pool cycle.
Cache of Howls across all instances of AudioPool. Optionally cleaned by setting cleanEvery the constructor (recommended) or manually calling AudioPool.cleanCache().
List of sources that are enqueued for all extant AudioPools. Used to help cache maintenance.
Pauses the Pool.
Preloads all Assets in the list. Returned observable fires when each
sound's Howl fires its load event.
Resumes the Pool.
Starts the pool.
Cleans the entire AudioPool.HOWL_CACHE by unloading Howls which
aren't playing, aren't queued, and aren't loading. Automatically
called if cleanEvery is set in AudioPool.constructor.
Gets or makes a Howl for a src sound as needed. Use this to interface with the cache or to make new Howls.
If a Howl doesn't exist for a source, getHowl makes one, adds it to the cache, and returns it.
If a Howl does already exist, getHowl simply returns it.
Generated using TypeDoc
AudioPool
A MediaPool designed to handle playback of audio files. Uses Howler.js under the hood.