This sketch demonstrates how to use the play method of a Playable class.
The class used here is AudioPlayer, but you can also play an AudioSnippet.
Playing a Playable causes it to begin playing from the current position. When it reaches
the end of the recording it will emit silence, it will not stop! In other words, if you play something and
it gets to the end of the file, it will not stop and rewind, it will continue to try to read the file, but get
nothing and send silence to the audio system. If you call isPlaying() at that point, it will return true,
because the player is still trying to read the file, think of a record player that gets to the end of a record.
It just goes around on the same groove. It's not making any sound (well, crackles maybe) but it is still playing.
Press 'p' to play the file.
Built with Processing