Hi again, I seem to be having a problem with the minim library in Processing 3.0b5. I’ve properly loaded in my audio files, but when I start the game, it gives me this error in the syntax each time:
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
=== Minim Error ===
=== Couldn't load the file beginning.mp3
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
=== Minim Error ===
=== Couldn't load the file floor1.mp3
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
=== Minim Error ===
=== Couldn't load the file text.wav
Now, don’t say it’s the wrong directory yet! I have all of the files in the “data” folder inside the sketch, and yesterday it was working and loading the files properly (although I didn’t change anything overnight). The game i’m making is large, but i’ll share specifically what I did to load the minim/audio files.
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
Minim beginningm, f1m, textm;
AudioPlayer beginningp, f1p, textp;
void setup() {
beginningm = new Minim(this);
beginningp = beginningm.loadFile("beginning.mp3");
f1m = new Minim(this);
f1p = f1m.loadFile("floor1.mp3");
textm = new Minim(this);
textp = textm.loadFile("text.wav");
beginningp.loop();
}
There are obviously more instances of the audio files that I didn’t mention that come after this (mainly just pausing/playing different audio), but it gives me the error at the line that says
beginningp.loop();
with a “NullPointerException” in the red bar. Any suggestions on what’s going wrong? (I did double check that I had the minim library in the “libraries” folder, and all of the audio files are named properly in the “data” folder inside the sketch folder.)