Re: AudioBuffer mutability

On Wed, Oct 31, 2012 at 1:49 AM, Joseph Berkovitz <joe@noteflight.com>wrote:

> 1. Load an AudioBuffer from a media file (note that we didn't generate it
> so we don't have the samples on hand somewhere else)
> 2. Play the AudioBuffer via various AudioBufferSourceNodes
> 3. During live playback, dynamically determine that we need to play a
> programmatic transformation of the originally loaded media
> 4. Copy the contents of the AudioBuffer to a new AudioBuffer, applying
> said programmatic transform to the data
> 5. Use the new AudioBuffer to generate the transformed output via other
> AudioBufferSourceNodes
>

OK. My latest proposal would handle this efficiently. You wouldn't need to
create an extra AudioBuffer; you would modify the data and
already-initialized AudioBufferSourceNodes would not be affected.

By the way, why are you doing the programmatic transformation with JS
instead of Web Audio itself?

Rob
-- 
Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise authority
over them. Not so with you. Instead, whoever wants to become great among
you must be your servant, and whoever wants to be first must be your
slave — just
as the Son of Man did not come to be served, but to serve, and to give his
life as a ransom for many.” [Matthew 20:25-28]

Received on Tuesday, 30 October 2012 20:44:58 UTC