This sketch demonstrates how to use setLoopPoints
using an AudioSnippet. Left-click with the mouse
to set the start point of the loop and right-click to set the
end point of the loop. setLoopPoints can also be
called on an AudioPlayer, but you will likely find
there to be a break during loops while the code seeks from the
beginning of the file to the start of the loop. This seek time
can become quite noticable if you are using an mp3 file
because it will need to decode as it seeks.
Source code: setLoopPoints
Built with Processing