My code:
import processing.sound.*; //Import sound librarie
// Create a SoundFile
SoundFile sound;
sound = new SoundFile(this, "est.wav");
// Play and show a rect at the same time. PROBLEM
for (int i = 0; i < 10; i++) {
delay(200);
sound.play();
fill(120);
rect(random(100), random(100), width/2, height/2);
}
Thx!!