-
-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent crashes during completion of callbacks on disposed SoundFiles #320
Conversation
@@ -221,9 +221,11 @@ define(function (require) { | |||
request.onload = function() { | |||
if (request.status === 200) { | |||
// on sucess loading file: | |||
if (!self.panner) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does the trick, but I wonder if there's a better way to check if the soundfile has been disposed. Or, better yet, to cancel any incomplete callbacks when the soundfile is disposed.
* mySound = loadSound('assets/doorbell.mp3'); | ||
* | ||
* } | ||
* function setup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 sorry for the trouble here!
Thanks, @Spongman, for the fix here: processing/p5.js-sound#320
* fix #3200 soundfile dispose error in reference test Thanks, @Spongman, for the fix here: processing/p5.js-sound#320 * patch convolverNode dispose processing/p5.js-sound#321
* 'master' of ssh://github.com/mrjoshida/p5.js-sound: rebuild lib dispose of ConvolverNode before resetting buffer (processing#321) rebuild lib with reference example fix processing#320 move loadSound call to preload prevent crashes during completion of callbacks on disposed SoundFiles 0.3.9 add soundfile.save example add `save()` and `getBlob()` methods to SoundFile. Move .wav conversion to helpers.js (processing#315) Added saveSoundToBlob() to soundRecorder.js Document properties of AudioIn update master limiter - sharp knee monosynth: remove unused _isOn monosynth: remove unused filter, patch velocity Missed this fragment during the renaming corrected formatting by replacing tabs with four spaces fixed issue: processing/p5.js-sound#297
loadSound
call topreload()
in doc sample