Hi everyone,
I am working in a little simulation to guide users to record sound. I am testing p5.sound here (the code is this).
The sketch works records and triggered a local download correctly on Firefox, Brave, Opera and Safari (desktop) and Safari (iOS). In Firefox I can’t get amplitude level (audioIn.getLevel() doesn’t work).
But I can’t make the sketch work in any Android browser. I grant the permission, connect to stream media, but buffer is always null…
Any ideas?
Now the sketch is recording properly on Brave and Opera in Android. I don’t know why. Perhaps there was some other application connected to the audio input. If I close others browsers and tabs works… But I am not sure.
The objects related to the AudioContext are initialize after user interaction of course:
function setup() {
getAudioContext().suspend();
createCanvas(windowWidth, windowHeight);
}
function mouseClicked() {
if (as === -1) {
userStartAudio();
ac = new audiocontrol(0.5);
as = 0;
}
}