-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException: 3 when trying to load (mp3) sound file #14
Comments
Same issue noticed, windows 10, Processing 3.4 and latest Sound lib. Raise: |
I'm having the same issue |
Same--on both Windows and Macs (ArrayIndexOutOfBoundsException). file = new SoundFile(this, "Kalimba.mp3"); |
Having the same issue on my 2018 macbook pro with Processing 3.4 and Sound 2.02. |
Hi! I fixed this through the conversion of my files(.mp3 and .wav) into an .aiff format. |
Fixed I had the same issue and tried everything I could find in these forums. Newest update did nothing. Once I changed the files to .wav format the file worked. I still see red warnings but the game doesn't give the arrayIndexOutOfBounds error anymore. Red warning code that appears still is this (with or without .mp3 files) Dec 20, 2018 3:37:34 PM com.jsyn.devices.javasound.JavaSoundAudioDevice <init>
INFO: JSyn: default output latency set to 80 msec for Windows 10
Dec 20, 2018 3:37:34 PM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.8.0 (build 463, 2017-10-16) But I no longer get this after it. Error: ArrayIndexOutOfBoundsExeption : 16
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
|
I had the same problem. I started with original .wav files from my music creation software and converted them into .mp3 files using an online converter. (to try and save on file size) The converted .mp3 files would not load into by program. I tried my first .wav files and they worked. So I am guessing that some converters will generate .mp3 files that the sound library cannot handle. |
I also got the exception on some mp3 files: A VBR file fails to load: (info according to winamp) The exception happens when trying to determine the frequency. The SAMPLING_FREQUENCY array contains 3 elements: The frequency is read from two bits: 0 0 = 44khz, 0 1 = 48 khz, 1 0 = 32 khz, 1 1 = ? I am currently trying to reproduce the problem directly in JavaMP3. |
The problem seems to be in the processing.sound.SoundFile class.
https://github.com/processing/processing-sound/blob/master/src/processing/sound/SoundFile.java#L59 Maybe the InputStream should be created freshly, before trying to parse as mp3. try {
// load WAV or AIF using JSyn
this.sample = SampleLoader.loadFloatSample(fin); // <-- 'fin' will be modified after this call (4 bytes are read)
} catch (IOException e) {
// try parsing as mp3
try {
// re-create the input stream before creating the mp3
fin = parent.createInput(path);
Sound mp3 = new Sound(fin); Mp3 file to reproduce the problem: https://github.com/cluder/processing-examples/blob/master/resources/beep1.mp3 |
I had the same problem when trying to load mono mp3s. Changed them to stereo and they worked. |
Hello, after recent updates (maybe Processing, Java or the library itself), my students and I cannot load a certain sound file which we were able to load for 2 years. Can you please take a look at the issue?
The sound file is attached
Both versions of Processing and Sound library are latest. (v3.4, v2.0.2)
I also found some relevant thread here.
Error Message below:
ArrayIndexOutOfBoundsException: 3
Oct 24, 2018 4:33:03 AM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.8.0 (build 463, 2017-10-16)
sound.wav.zip
The text was updated successfully, but these errors were encountered: