web-audio-stream
web-audio-stream copied to clipboard
Web-worker integration
Here is an example of putting audio processing code into web-worker. Because processing audio in the main thread may be blocked by UI, webgl etc, which is critical. That possibly can be addressed in audio, or solved in other way. But at least it is worth testing that case. Also that is proven reliable solution for js audio processing, unlike main-thread feeding.
@dfcreative Does this tie into audio-speaker
as well? Because while working audio-speaker/browser
I've noticed it is somewhat choppy and I have been thinking this might be solution for a bit now, but have been unsure.
@jamen yes, web-audio-stream provides connection of streams with web-audio in browsers. I am not sure how to deal with choppiness, I had it too but did not manage to figure out what's the reason, neither in script processor mode nor buffer source with setInterval
/setTimeout
.
We could profile/benchmark web-audio-stream to figure out whether it is slower than direct feeding and/or possibly add some limitations, like fixed frame size. Last time I tried to do that I had no success on removing the clicking.