Hi all, I get “ArrayIndexOutOfBoundsException: -1” error when I run the following example code:
import processing.sound.*;
SawOsc saw;
void setup() {
size(640, 360);
background(255);
// Create square wave oscillator.
saw = new SawOsc(this);
saw.play();
}
void draw() {
}
- Exception is thrown by the “saw = new SawOsc(this);”
- I installed the official sound library (2.0.0) using the “import library” inside the program
- I’m using Processing 3.4
It also reads:
Eyl 05, 2018 5:04:14 PM com.jsyn.devices.javasound.JavaSoundAudioDevice
INFO: JSyn: default output latency set to 80 msec for Windows 7
on the console.
Here’s the error:
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:422)
at java.util.ArrayList.get(ArrayList.java:435)
at com.jsyn.devices.javasound.JavaSoundAudioDevice.getMaxInputChannels(Unknown Source)
at processing.sound.Engine.startSynth(Unknown Source)
at processing.sound.Engine.<init>(Unknown Source)
at processing.sound.Engine.getEngine(Unknown Source)
at processing.sound.SoundObject.<init>(Unknown Source)
at processing.sound.Oscillator.<init>(Unknown Source)
at processing.sound.SawOsc.<init>(Unknown Source)
at sketch_180905a.setup(sketch_180905a.java:27)
at processing.core.PApplet.handleDraw(PApplet.java:2404)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1557)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)
Thanks in advance!