Re: Preparing the vote on the data race issue

On Jul 30, 2013, at 4:08 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> More comments about https://gist.github.com/jernoble/6034137:
> 
> What does it mean for the AudioBuffer.channels array to be "read-only"? I don't think that makes sense actually. I'd replace this with getChannel(channelNum) instead.

[1] "Arrays can also be designated as being read only. User code cannot modify the values of read only array elements. If an array is read only, then it is also implicitly fixed length."

This just means web authors can’t do: `audioBuffer1.channels[0] = audioBuffer2.channels[0]`, nor can they do `audioBuffer1.channels.push(audioBuffer2.channels[0])`.

> The AudioBuffer constructor that takes an array (or sequence) of Float32Arrays needs to specify that it copies the contents of those arrays (I believe that's your intent?).

Yes, as Ehsan pointed out, this should be a sequence, which requires that the contents are passed by value[2], not by reference.

> "if the AudioBufferChannel is currently is use by a live AudioNode" is not adequately defined. This needs to be very carefully defined, preferably in terms of observable events on the main thread.

Agreed.

> AudioProcessingEvent needs to specify the initial values for the inputBuffer and outputBuffer attributes.

Sure.

> Are they fresh AudioBuffers every time an event fires, or do values get reused?

Implementation detail.

> And what is the state of the initial outputBuffer object?

What is the state now?

> "Generating audio directly into an AudioBuffer using the new APIs will still result in 0-additional allocations or copies." I don't quite see how, or maybe I just don't know what exactly this means.

I could elaborate on this.

-Jer

[1] http://www.w3.org/TR/WebIDL/#idl-array
[2] http://www.w3.org/TR/WebIDL/#idl-sequence

Received on Tuesday, 30 July 2013 23:25:04 UTC