I'm writing something like a web-audio-editor, and I think I'm close to finishing the basics. I can play and stop an audiofile, but when I try to call the play method again it just won't work, even though the parameters havn't changed.
I'd be glad to see someone look into my problem as I cannot see why it doesn't work when similar code in other projects does. Unfortunately I cannot create a jsfiddle, because I would need to load an external mp3-file and it seems I'm not allowed to do that. But I have pasted the javascript here and the corresponding html file here.
All you need is a server you can upload the files to and a mp3 on it. Alternately you could use this link, but I will delete the files eventually.
You can't call start()
on an AudioBufferSourceNode
more than once. They're one-time-use only.
Really the only way to do this is to create a new AudioBufferSourceNode
from the underlying AudioBuffer
every time you need to start playback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With