import processing.sound.*;
SoundFile f1;
SoundFile f2;
SoundFile f3;
SoundFile f4;
SoundFile f5;
void setup()
{
loadAudioError();
}
void draw()
{
}
void loadAudioError()
{
f1= new SoundFile(this, "f1.mp3");
f2= new SoundFile(this, "f2.mp3");
f3= new SoundFile(this, "f3.mp3");
f4= new SoundFile(this, "f4.mp3");
f5= new SoundFile(this, "f5.mp3");
}
First file (f1) is loaded correctly but the progam stops at the ssecond line f2= new SoundFile(this, "f2.mp3");
and the following error message is displayed:
ArrayIndexOutOvBoundsException: 3
Unfortunately I don’t use array and the size of each MP3 file is less than 20Kbyte (I have a PC with 12GB RAM)
Did you have any similar problem ?
How do you fix it ?
Thank you very much for your help and cooperation
regards
I can’t be able to replicate the error. Is that your full code? Try to make a copy f1.mp3 and rename it f2.mp3, f3.mp3 etc. Does the error still occur?