I tried to use the processing 3 sound library and have had the same problem. in some versions of windows 10 it won’t work at all. it won’t work in android mode. I suggest to avoid using it. Find other sound libraries to use like Minim in Java mode or Android media player in Android mode. Maybe someday the processing 3 sound library will be fixed, but for now it should be avoided and mark as deprecated. good luck
I don’t know if there are Android/Windows-specific issues. But I would not have the playback control code in draw(). Playing back a soundfile usually involves starting a separate playback thread.
From the Keyboard example in the Processing 3 sound library, draw() doesn’t contain any soundfile playback code. All the file playback code is in keyPressed(); you can also put file.play() in mouseClicked(), for mouse control.
That said, I’m on Mac Catalina, and if I click the mouse as fast as I can, I do get a little distortion/noise on playback. This might be from threading issues, or I might be adding together so many waveforms that I’m clipping. If your file is very long, and you keep trying to start new playback threads very fast, you will get clipping just from having to add too many copies of the waveform.
Yes, probably this is the solution.
Thanks for the answer) but while I was looking for it, something was broken and now no library is working))))))))))))
If you know / have a desire to try to help, please find another topic that I recently created
The forum can really save me) it is very important to me.