# Minim Library NullPointerException upon loading file

**URL:** <https://discourse.processing.org/t/minim-library-nullpointerexception-upon-loading-file/5051>\
**Category:** Libraries\
**Created:** [October 31, 2018, 2:05pm UTC](https://discourse.processing.org/t/minim-library-nullpointerexception-upon-loading-file/5051 "2018-10-31T14:05:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus152](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/marcus152/32/1798_2.png) [@Marcus152](https://discourse.processing.org/u/Marcus152)\
**Post date:** [October 31, 2018, 2:05pm UTC](https://discourse.processing.org/t/minim-library-nullpointerexception-upon-loading-file/5051/1 "2018-10-31T14:05:05Z")

</div>

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:

```auto
==== 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.

```auto
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

```auto
  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.)
