p5.SoundFile has two play modes: restart and sustain. Play Mode determines what happens to a p5.SoundFile if it is triggered while in the middle of playback. In sustain mode, playback will continue simultaneous to the new playback. In restart mode, play() will stop playback and start over. With untilDone, a sound will play only if it's not already playing. Sustain is the default mode.
Examples
Syntax
playMode(str)
Parameters
str
String:
'restart' or 'sustain' or 'untilDone'
This page is generated from the comments in lib/addons/p5.sound.js . Please feel free to edit it and submit a pull request!