I'm trying to make a simple sketch that pauses and then restarts an audio file at the same place. I can do it with Minim but its very slow. I'm trying to use setOffset() but it doesn't seem to do anything. Suggestions?
import toxi.audio.*;
import toxi.geom.*;
JOALUtil audio;
AudioSource erhu;
int eff = 0;
void setup() {
size(1000, 400);
// JOALUtil is implemented as singleton, so get an instance like this & initialize it
audio = JOALUtil.getInstance();
audio.init();
// load a sample and initialize an audio source using it
// NOTE: path to file needs to be absolute, hence we use the dataPath() wrapper