Batching WA changes? (Was Re: Audio Workers - please review)

Starting a new thread because this isn't about audio workers

On Thu, Sep 11, 2014 at 7:51 AM, Chris Wilson <cwilso@google.com> wrote:

> I don't know how it is possible to do this, unless all WA changes are
> batched up into a single postMessage.
>

I don't understand how this would work. How do you know when to batch up
all WA changes?
How would this work when you're dynamically creating source nodes and
connections?

And it seems to me that if you wnat node1.start(now) and node2.start(now)
to actually start at the same time, don't do expensive things between the
two calls to start.  And given the fact that GC can happen at any time,
something that wouldn't take a long time may suddenly take a long time.

Aren't these things that developers must be aware of in the normal course
of operation?

>
> On Thu, Sep 11, 2014 at 4:41 PM, Norbert Schnell <Norbert.Schnell@ircam.fr
> > wrote:
>
>> On 11 sept. 2014, at 15:41, Chris Wilson <cwilso@google.com> wrote:
>> > I think this is actually indefinite in the spec today - and needs to
>> be.  "start(0)" (in fact, any "start(n)" where n is <
>> audiocontext.currentTime) is catch as catch can; thread context switch may
>> happen, and that needs to be okay.  Do we guarantee that:
>> >
>> > node1.start(0);
>> > ...some really time-expensive processing steps...
>> > node2.start(0);
>> > will have synchronized start times?
>>
>> IMHO, it would be rather important that these two really go off at the
>> same time :
>>
>> var now = audioContext.currentTime;
>> node1.start(now);
>> ...some really time-expensive
>> node2.start(now);
>>
>> ... unless we can well define what "really time-expensive" means and the
>> ability to avoid it.
>> Is that actually case? I was never sure about this...
>>
>> Evidently it could be sympathetic if everything <
>> audioContext.currentTime could just be clipped and behave accordingly. That
>> would make things pretty clear and 0 synonymous to "now", which feels right.
>>
>
What does "clipped" here mean? Clipped in what way?

>
>> Norbert
>
>
>

Received on Thursday, 11 September 2014 21:44:55 UTC