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

Re: AudioBuffer mutability

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 31 Oct 2012 09:44:28 +1300
Message-ID: <CAOp6jLZiwe6nVAZfK99RdP9V7bks7ZgrCizj=rwkTf0yvvwZ4g@mail.gmail.com>
To: Joseph Berkovitz <joe@noteflight.com>
Cc: Ehsan Akhgari <ehsan.akhgari@gmail.com>, Chris Rogers <crogers@google.com>, public-audio@w3.org
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?

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

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