import ddf.minim.;
import ddf.minim.ugens.;
Minim minim;
AudioInput in;
AudioRecorder recorder;
AudioOutput out;
FilePlayer player;
int name = 1;
int r = 200;
int r2 = 80;
boolean recording;
void setup()
{
textSize(20);
size(800, 1000);
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO, 2048);
recorder = minim.createRecorder(in, str(name) + “.mp3”);
out = minim.getLineOut( Minim.STEREO );
}
void draw() {
background(0);
stroke(255);
if ( recorder.isRecording() )
{
text(“Recording…”, 5, 15);
}
fill(255);
ellipse(width / 2, height / 2, r * 2, r * 2);
if (out.isMuted()) {
fill(255, 20, 0);
}else fill(255);
ellipse(width / 2 + 200, height / 2 + 300, r2 * 2, r2 * 2);
}
void mousePressed() {
if (dist(width / 2, height / 2, mouseX, mouseY) < r) {
r = 180;
if (!recording) {
recorder.beginRecord();
recording = true;
} else if (recording) {
recorder.endRecord();
recording = false;
if ( player != null) {
player.unpatch( out );
player.close();
}
player = new FilePlayer( recorder.save() );
player.patch( out );
player.play();
name++;
recorder = minim.createRecorder(in, str(name) + ".wav");
}
}
if (dist(width / 2 + 200, height / 2 + 300, mouseX, mouseY) < r2) {
if (out.isMuted()) {
out.unmute();
} else out.mute();
}
}
void mouseReleased() {
r = 200;
}
-a- pls format your code
++ delete above posted code as it not works / and use
</> code tag
-b- can you run that code in processing 3.5.3 IDE JAVA MODE
( i needed to change mp3 to wav )
prior to run it in ANDROID MODE
-c- show the exact error msg ( or a snapshot of it )
-d- just to test your complete environment i ask you to
NOT try first you own coding,
begin with a provided EXAMPLE
( do you know if that library is supposed to run under ANDROID? )