ScriptProcessorNode off the main thread (Was: Questioning the current direction of the Web Audio API)

On 25 Oct 2013, at 08:04, Jussi Kalliokoski <jussi.kalliokoski@gmail.com> wrote:

>> So where can we go from here? I think we pretty clearly need a version of ScriptProcessorNode that does JS audio processing off the main thread. The obvious and expedient approach would be to have it dispatch messages to a Worker just like MSP did. It should work with Float32 typed arrays rather than AudioBuffers and be designed to avoid requiring buffer copies. I think that we can arrange for very-short-running JS audio processing to run synchronously during Web Audio processing (by having that realtime thread wait for the JS processing to complete, with a short timeout in case it's slow). We need to define what happens if the processing is too slow; ideally that should just cause a latency increase, if we're not in a true overload situation.
>>
>> That should help a lot for a lot of use-cases. If it turns out to be an incomplete solution, we'll have a lot more data to inform our next move.
>>
> I highly agree with this. In my opinion, this is the sane approach of solving problems little by little, gathering data of the real pain points as we go, and pivoting as needed.

+1

We've spent a lot of time in the past discussing worker-only versus main-thread-only and not as much trying to figure out how to make it work. We did, however, get to a resolution to enable ScriptProcessorNode with workers:

https://github.com/WebAudio/web-audio-api/issues/113?source=cc#issuecomment-24244840

Anyone has a clear picture of whatever is blocking the inclusion of this resolution into the spec? Or is it just a byproduct of our editorial transition over spring/summer?

I would like to see a group of people to come up with a detailed proposal if there are remaining hurdles stopping us from including this in the spec, and proposing a spec patch complete with interfaces based on MSP.

Also, may I suggest ROC should lead this? What say you, ROC?

Thanks,
--
Olivier





-----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-----------------------------

Received on Friday, 25 October 2013 09:09:58 UTC