Nevermind..I figured it out :)
Wav file works fine with this code:
- import ddf.minim.*;
- Minim minim;
- AudioPlayer player;
- PImage img1,img2;
- void setup() {
- size(640,480);
- img1 = loadImage("splash.jpg");
- minim = new Minim(this);
- player = minim.loadFile("fuel.wav", 2048); //sound file
- player.play();
- }
- void draw() {
- if(millis()<6000)
- {
- image(img1, 0, 0);
- }
- else{
- img2 = loadImage("gamescreen.jpg");
- image(img2,0,0);
- //rest of code
- }
- }
- void stop() {
- player.close();
- minim.stop();
- super.stop();
- }