A pool of sound objects to allow playing multiples of the same sound.
const dings = new SoundPool('assets/sounds/ding.ogg') // When the sound should play (and may already be playing). dings.play()
Initialize SoundPool object.
Source for the sound.
Number of sound instances in the pool.
Initial options for the sound.
Play the next sound in the pool.
Stop all sounds in the pool.
A pool of sound objects to allow playing multiples of the same sound.
Example
const dings = new SoundPool('assets/sounds/ding.ogg') // When the sound should play (and may already be playing). dings.play()