W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: Preparing the vote on the data race issue

From: Jer Noble <jer.noble@apple.com>
Date: Tue, 30 Jul 2013 16:24:18 -0700
Cc: Ehsan Akhgari <ehsan.akhgari@gmail.com>, Olivier Thereaux <Olivier.Thereaux@bbc.co.uk>, Joseph Berkovitz <joe@noteflight.com>, WG <public-audio@w3.org>
Message-id: <E148F7AC-3409-4D44-A6C4-8BCB984DE4F1@apple.com>
To: Robert O'Callahan <robert@ocallahan.org>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC