p5.js-sound
p5.js-sound copied to clipboard
loadSound() should log a helpful message when file is not found
When using loadImage(), if the file is not found, you get a helpful console message telling you what happened. Unfortunately the same is not true for loadSound().
Normally this isn't a problem, however, in some coding environments you don't have access to the chrome console (for example, some schools disable developer tools). Web-based consoles, such as https://editor.p5js.org/, are not capable of catching network errors such as 404, so there's no way to tell that an error occurred.
Ideally loadSound() should have the similar behavior as loadImage(), and log a message in the console.
@bendavis78 console messages are disabled in the minified file. Try using p5.sound.js instead of p5.sound.min.js. Or you can provide your own callback function for success as well as error. See this @therewasaguy I would like to work on adding an FES message for this error. Do I need to create another issue for the FES message in the p5.js repository?