i’m working on a game and i want to add sound effects so i installed the sound library but every time i try to load a sound it returns “ArrayIndexOutOfBoundsExeption: -1” and i don’t understand why. the sound file is in the right place and the library is installed correctly (because if that wasn’t true i’m sure i would’ve gotten a different error) i’m just really confused.
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, "sound.wav");
file.play();
}
void draw() {
}
This issue has now been fixed and the new 2.0.1 update of the Sound library should become available from the Content Manager at some point during the day. @ducco it would be very helpful if you could let me know if the update fixes your problem!