audioprocessingminim

Minim cannot convert from AudioPlayer to AudioPlayer


I was following closely the example given on "Programming Interactivity" by Joshua Nobel.

Ok. Basically what the example does is that it should play an mp3 file. I have already put "song.mp3" under the "data" folder. But when I tried to play the sketch, I am getting,

"cannot convert from AudioPlayer to AudioPlayer"

I can't seem to be able to see anyone who is having the same problem as me.

The below codes were executed on Processing IDE.

import ddf.minim.*;
AudioPlayer song;
Minim minim;

void setup() {
   size(800, 800);
   minim = new Minim(this);
   song = minim.loadFile("song.mp3");
   song.play();
}

Can someone please tell me why am I having this error?


Solution

  • I did this instead and it works!!!

    import ddf.minim.*;
    ddf.minim.AudioPlayer song;