Hello, i copied a very simple code from the website,https://processing.org/reference/libraries/sound/SoundFile.html but turns out the problem:IndexOutOfBoundsException
.I’ve checked that the file is in the data folder. I really do not know why, can somebody help? Thx
import processing.sound.*;
SoundFile file;
void setup() {
size(640, 360);
background(255);
// Load a soundfile from the /data folder of the sketch and play it back
file = new SoundFile(this, "sample.mp3");
file.play();
}
void draw() {
}