SoundPool

new SoundPool()

SoundPool manages pooled sound effects for efficient playback. Creates multiple instances of the same sound for overlapping play.

Classes

SoundPool

Methods

play(volumeMultiplier)

Play the sound effect.

Parameters:
NameTypeDefaultDescription
volumeMultipliernumber1

Volume multiplier (0 to 1).

setVolume(vol)

Set base volume for all sounds in pool.

Parameters:
NameTypeDescription
volnumber

stopAll()

Stop all instances.