web-audio-stream icon indicating copy to clipboard operation
web-audio-stream copied to clipboard

Web-worker integration

Open dy opened this issue 8 years ago • 2 comments

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.

dy avatar Jan 10 '17 11:01 dy

@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 avatar Feb 07 '17 00:02 jamen

@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.

dy avatar Feb 07 '17 08:02 dy