Hello, so I made a game but the background music isn’t working.( I’ve only copied the sound problem tho) I’ve used another sound before and it works perfectly fine but the background music won’t work. If I play my programm I get this error:
JavaSound Minim Error
javax.sound.sampled.UnsupportedAudioFileException: not a MPEG stream: javax.sound.sampled.UnsupportedAudioFileException: Unable to read mp3 header
Minim Error
Couldn’t load the file hintergrundMusik.mp3
NullPointerException
Could not run the sketch (Target VM failed to initialize).
Can someone help me please? + I kinda want the music to be a loop since it’s in the background and therefor infinite.
import processing.sound.;
SoundFile click;
import ddf.minim.;
Minim minim;
AudioPlayer music;
void setup() {
size(800, 600);
click= new SoundFile(this, “clickSound.mp3”);
minim = new Minim(this);
music = minim.loadFile(“hintergrundMusik.mp3”);
music.play();
void draw() {
background(255);
}
void mousePressed() { //Kreise klicken
click.play();
}