Some development difficult with sound examples:
1 - Open a p5js audio example in processing for windows then save it before making any mods. The html file is sometimes modified to add a link to p5.sound.js library, between those “Until I say so” comments.
If there is no link to p5.sound.js in the html file I add that manually while programming after some head scratching but before saving.
2 - Some projects folders get a sketch.properties file added to them automatically. Some dont.
This is inconsistent. It seems to be required. Maybe on save if the link is found it truncates creation of the sketch.properties file.
If there is no sketch.properties file the sketch folder then processing app will crash immediately on attempted later relaunch of the sketch as selected from sketch folder or recent list.
3 - Browsers now require user interaction before audio can be used. eg Autoplay defaults to OFF.
I add this code to examples solve browser autoplay "user interaction needed" issue and the project works fine.
function touchStarted() {
if (getAudioContext().state !== 'running') {
getAudioContext().resume();
}
}
4 - After all that I find that processing forgot my mode installations of p5.js, android and python which i have been using for days. Maybe there was an automatic update? So maybe my sketches were trying to parse as java? After mode installation
I have no more issues with sound.
Project also works in vscode with various browser as long as I enable microphone access in each browser settings.
The modes dropdown will switch mode and open a a specific ide for each even if the modes are not installed. I only got a clue when i added a copy of the sketch.properties to each failing sketch.
====
In any case I insure that my PC has audio and mic enabled for apps. Browser doesnt matter. chrome, duckduckgo and edge whatever is the system default browser gets launched and asks to enable audio as needed.
Using processing 4.3 on win 10 after setting up a few win11 PCs for edu.
Here is the crash banner snip: