Sound Library not funtioning in Android mode

Since doing the recent SDK update in Processing for Android:

google usb_driver 11.0.0
Android SDK Build-Tools 26.0.2
Google APIs Intel x86 Atom System Image 14
Android SDK Platform 26 2
Android SDK Build-Tools 26.0.3
Android SDK Tools 26.1.1
Android SDK Platform-Tools 29.0.0

The Sound Library is no longer functioning. I get this error:

java.lang.UnsupportedOperationException: Cannot create AudioRecord
at processing.sound.JSynAndroidAudioDeviceManager$AndroidAudioInputStream.start(Unknown Source:66)
at com.jsyn.engine.SynthesisEngine$ Source:29)
I installed Processing 3 on a new PC and received the same error.
Anyone have any ideas

@markcosmic === are permissions ok (runtime) ???

Please provide a code snippet or any links that you are following. I am interested to know if you are referring to the Sound Library offered in Java or are you using any other resource.


I have set the audio record permissions, but my app doesn’t record. It only plays a couple of .wav files. The app was working. The audio play back was working for the several months I’d been coding and testing it. Since the update I mentioned, using processing.sound.*, does not seem to be functioning in Android mode. I tried it on 2 different windows 10 PCs

Ok, please provide snippet including the recording part and I could try to repro as I have a Win 10 machine as well.


As a test I tried the “SimplePlayback” Processing 3 Sound example.
It worked in JAVA mode; giving this INFO:
Jun 11, 2019 12:32:42 PM com.jsyn.devices.javasound.JavaSoundAudioDevice
INFO: JSyn: default output latency set to 80 msec for Windows 10

But in Android mode gave the error I mentioned at the beginning of this topic.

Here is the sketch, slightly modified:
import processing.sound.*;
SoundFile soundfile;
void setup() {
size(640, 360);
soundfile = new SoundFile(this, “vibraphon.aiff”);
println(“SFSampleRate= " + soundfile.sampleRate() + " Hz”);
println(“SFSamples= " + soundfile.frames() + " samples”);
println(“SFDuration= " + soundfile.duration() + " seconds”);
void draw() {
float playbackSpeed = map(mouseY, 0, width, 0.25, 4.0);
float panning = map(mouseX, 0, width, -1.0, 1.0);
void mouseDragged(){
float amplitude = map(mouseY, 0, height, 0.2, 1.0);
I should mention that other than no sound, in Android mode, the apps work fine

I for got to add, that I get no sound from the emulator or the 2 devices I tried it on

My app does not record audio. Only playback sounds. Not coded to record.
It’s quite odd the error refers to audio recording

Hello, I discovered the library Cassette which works very well to play sound file. It can be downloaded in the processing editor.