Re: New proposal for fixing race conditions

On Jul 19, 2013, at 12:52 PM, Marcus Geelnard <mage@opera.com> wrote:

> Also, I think it would be useful to have a more specific version of the set operation, in order to be able to update only a sub-part of the AudioBufferChannel from a sub-part of the source array (use case: editing & updating small parts of a large AudioBufferChannel). It would have to take two more arguments, e.g:

This is already achievable by creating a new Float32Array “view” onto the underlying ArrayBuffer.  I.e. to set ‘buffer' samples (50, 150] with only the first 100 samples from ‘array’:

	buffer.set(array.subarray(0, 100), 50);

The TypedArray.subarray method involves no copying of the underlying data.

-Jer

Received on Friday, 19 July 2013 20:08:38 UTC