I'm not sure how to make this work :s
I am using minim, so will that make what I want to achieve impossible or am I just going about it the wrong way?
my full code is:
Minim minim;
AudioPlayer player;
AudioInput input;
AudioPlayer skunk;
AudioInput badger;
AudioPlayer re;
AudioInput mix;
void setup()
{
size(720, 480);
minim = new Minim(this);
player = minim.loadFile("heys.mp3");
input = minim.getLineIn();
minim = new Minim(this);
skunk = minim.loadFile("heartbreak.mp3");
badger = minim.getLineIn();
minim = new Minim(this);
re = minim.loadFile("breakbot.mp3");
mix = minim.getLineIn();
}
void mousePressed()
{
if (mouseX > 0 && mouseX < 120 &&
mouseY > 0 && mouseY < 120) {
fill(c1,0,c2);
rect(0,0,width/12,height/4);
fill(c2,0,c1);
rect(60,0,width/12,height/4);
if (player.isPlaying()) {
player.pause();
}
else{ player.play();}
if (skunk.isPlaying()) {
skunk.pause();}
}
if (mouseX > 120 && mouseX < 240 &&
mouseY > 0 && mouseY < 120) {
fill(c3,0,c4);
rect(120,0,width/12,height/4);
fill(c4,0,c3);
rect(180,0,width/12,height/4);
if (skunk.isPlaying()) {
skunk.pause();}
else {skunk.play();}
if (player.isPlaying()) {
player.pause();}
}
}
void mouseMoved()
{
if (mouseX > 0 && mouseX < 120 &&
mouseY > 0 && mouseY < 120) {
if (!isPlayerPlaying) {
noFill();
rect(0,0,width/12,height/4);
fill(0);
rect(60,0,width/12,height/4);}
}
}