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

Re: Data racing proposals

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 1 Aug 2013 14:17:32 +1200
Message-ID: <CAOp6jLZBARjBSuMdig+G2DQmPgV7ZX2JpC22mxmfdkrQ1+AePA@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: "public-audio@w3.org" <public-audio@w3.org>
On Thu, Aug 1, 2013 at 2:04 PM, Chris Wilson <cwilso@google.com> wrote:

> I'm slightly confused, so let me expand a few examples.  I can see (at
> least) three cases:
>
> 1) I've assigned the .buffer [presume we're using your original
> semantics], then I call .getChannelData and postMessage the ArrayBuffer to
> a worker.  In this case, I think the assignment acquired the contents, but
> the .getChannelData copied the data, so the postMessaged data is complete
> but the AudioBuffer's ArrayBuffer got neutered.
>

Correct.

2) I called .getChannelData and postMessage prior to assigning the .buffer.
>  In this case, I think the audio thread's acquire is called on a neutered
> ArrayBuffer, so it's empty and plays nothing.
>

Correct.


> 3) I called .getChannelData, kept a reference to it, assigned the buffer,
> then tried to postMessage the ArrayBuffer I'd been holding on to.  In this
> case, I think the assignment neutered the reference, so the postMessage
> gets an empty array.  (I think this is the case you're referring to above.)
>

Correct.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
Received on Thursday, 1 August 2013 02:17:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:10 UTC