We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi - I'm a fairly new programmer - never got involved on the forum/GitHub/issue reporting side of things - so I wasn't sure where to report a potential error. If there's a better option I apologize, please let me know where I should send this. I had a sketch working great but it just recently broke without changing anything so I think it may be something in the browser and/or WebAudio API has changed and made the p5.sound library throw an error.
Out of nowhere I started getting this error - Uncaught InvalidAccessError: Failed to execute 'disconnect' on 'AudioNode': the given destination is not connected - related to loading the p5.sound library.
When I went to the first line mentioned in the error, in the p5.sound file - and commented it out (it had to do with setting up an initial hard limiter on the output pretty early in the file) - everything was groovy again. I'm using Chrome, not sure if this something specifically with Chrome, or perhaps I just did something stupid, certainly a possibility - but just wanted to report it in case.
Answers
I only had luck w/ Firefox and derivatives when using p5.Sound! :(
Oh - webkit browsers work fine for me most of the time with p5 sound - it was just this one line in the library started throwing an error out of nowhere, and now that's it commented out it works great. Decided to check if it was just a webkit thing though and actually discovered it doesn't work at all in FF or FF Dev Edition - with or without the line commented out - totally different error!
My file was a 24 bit WAV, converted to Ogg and works fine in FF now with or without the library line commented out - so it appears only Chrome has an issue with that line in the p5 sound library.
Since it involves modifying source code, you should forward that as an open issue below:
https://github.com/processing/p5.js/issues
Don't forget to mention the link of this thread there so folks can follow up from both sides! ;-)
Ah, got it - will do, thanks!
Just to follow up on this for any future reference - this issue has been resolved in the latest version of the library.
But why did this happen, nothing has been changed.
There are apparently a couple changes in the new-newest version of the library that's not quite up for wide distribution yet - check this out --> https://github.com/processing/p5.js-sound/issues/41#issuecomment-101414766 -- specific to this issue I believe the fix is
is changed to