Unable to get audio to play using APDE Android app and Ess library

G_GG_G
edited August 2014 in Android Mode

Hello. I tried the following code in the APDE app, and it built the apk, but after I run it I get the message "Unfortunately testsound has stopped" and no sound is played. I've added the sound file required to the sketch data folder in APDE and also imported the Ess library. Can anyone tell me what I'm doing wrong please? Thanks.


import krister.Ess.*;

AudioChannel tune;
int lp;

void setup() {

size(displayWidth,displayHeight);

lp=0;

Ess.start(this);

tune=new AudioChannel("SUGARSPRINT.wav");

}

void draw() {

  if(lp==0) {

tune.play(1);
lp=1;
}

}

public void stop() {
  Ess.stop();
  super.stop();
  }
}
Tagged:

Answers

  • edited August 2014 Answer ✓

    I am the developer of APDE.

    Ess, which is built on JavaSound, will not work properly in Android mode, which APDE is based on. You will have to use a different sound library.

    I don't have time to look into which sound libraries will work right now, although I have hope for the new Processing Sound library in 3.0.

  • Thanks for letting me know, Calsign. I'll do some more investigating.

    Great work on the app. I'm making a lot of use of it.

    Gary

Sign In or Register to comment.