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

Re: AudioBuffer channel read/write APIs

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 12 Sep 2013 22:33:29 -0700
Message-ID: <CAOp6jLZZhH8wg0d0SZOHOSSmFG1RiQk=ET+Qu61MLVVuJ0zeVA@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: Katelyn Gadd <kg@luminance.org>, Ehsan Akhgari <ehsan.akhgari@gmail.com>, Marcus Geelnard <mage@opera.com>, "public-audio@w3.org" <public-audio@w3.org>
On Thu, Sep 12, 2013 at 9:13 AM, Chris Wilson <cwilso@google.com> wrote:

> I'm not crystal-clear on the implications of copyToChannel, when the
> buffer has been acquired; am I correct in presuming this would cause an
> acquisition under the hood, and the modification would only end up
> "applied" for future acquisitions?
>

Right. The observable behavior would be just like calling getChannelData
and copying the data into that array --- except that an implementation may
be able to take some shortcuts.

App creates an AudioBuffer, puts data into it, creates a BufferSource and
> points it at the AudioBuffer, makes appropriate connections and calls
> start().
>
> At some later point in time (prior to the BufferSource completing,
> however), app calls copyToChannel to change the data of the AudioBuffer.
>  My presumption is that the currently scheduled playback would not take
> those changes into account, but any future acquisitions (e.g. app creates
> ANOTHER BufferSource pointing to the same buffer) would have the changed
> data.  Is that correct?
>

Yes.

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 Friday, 13 September 2013 05:33:56 UTC

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