W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

Mutability of the decodeAudioData argument

From: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Date: Mon, 19 Nov 2012 20:10:45 -0500
Message-ID: <CANTur_6bYbUbna3jY1uhFDOjHmDxBiPk95riwqqwodA1U=+ckg@mail.gmail.com>
To: public-audio@w3.org
Cc: "Robert O'Callahan" <robert@ocallahan.org>
Hi everyone,

Continuing from the discussion that roc started about the mutability of
AudioBuffers, we also need to specify what should happen if the author
tries to modify the ArrayBuffer argument of decodeAudioData.  If we want to
allow mutability, then the implementation either has to copy the buffer
eagerly or apply some kind of a copy on write mechanism on top of it, both
of which can be expensive for big buffers.

Another approach which might make sense would be to neuter the ArrayBuffer
so that the author cannot access the contents of the ArrayBuffer after
starting a decode operation.

What do people think about this solution?

Thanks!
--
Ehsan
<http://ehsanakhgari.org/>
Received on Tuesday, 20 November 2012 01:11:52 UTC

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