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

Re: memory footprint of AudioBuffer data copies

From: Jer Noble <jer.noble@apple.com>
Date: Tue, 30 Jul 2013 15:49:29 -0700
Cc: Joseph Berkovitz <joe@noteflight.com>, WG WG <public-audio@w3.org>
Message-id: <D214FC10-6B9C-44BF-BF65-3F5CDFE2C080@apple.com>
To: Robert O'Callahan <robert@ocallahan.org>

On Jul 30, 2013, at 3:47 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Wed, Jul 31, 2013 at 3:18 AM, Jer Noble <jer.noble@apple.com> wrote:
> What's more, you probably wouldn't want to synthesize the AudioBuffers entirely in advance either.  You'd synthesize a few chunks, schedule them for their specific times, and as they finished playing, you would synthesize additional chunks.  You might even implement a ringbuffer structure, so that later chunks imposed no additional memory or GC costs.  In that way, both the 2x chunk size would be mitigated, as would the overall outstanding buffer size would be limited to the size of your ringbuffer.
> 
> Why would you do this instead of just scheduling multiple AudioBufferSourceNodes?
> 

I guess I donít understand your question: you /would/ schedule multiple AudioBufferSourceNodes.  Each with itís own ďchunkĒ of decoded audio data.

-Jer
Received on Tuesday, 30 July 2013 22:49:58 UTC

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