W3C home > Mailing lists > Public > public-audio@w3.org > January to March 2012

Re: audio delay node max delay time

From: Chris Wilson <cwilso@google.com>
Date: Thu, 16 Feb 2012 09:41:28 -0800
Message-ID: <CAJK2wqX5LvTSW5xm6bnsWpoSdBaPEO1f9Oe-CL+BJJEDiJ+7ww@mail.gmail.com>
To: Michael Schöffler <michael.schoeffler@audiolabs-erlangen.de>
Cc: Chris Rogers <crogers@google.com>, Yotam Mann <yotammann@gmail.com>, public-audio@w3.org
Or just have the creation fail if there is not enough available memory, of
course - so a delay of 100s might fail on (some!) mobile devices, but work
on desktop.

On Thu, Feb 16, 2012 at 9:10 AM, Michael Schöffler <
michael.schoeffler@audiolabs-erlangen.de> wrote:

> > So the AudioContext createDelayNode() method could take an optional max
> delay time which is greater than 1 second.
> > Although this value could be somewhat greater than 1 second, we may want
> to consider some reasonable (but large)
> > upper limit, since it does consume memory.****
>
> ** **
>
> Figuring out a good upper limit seems not easy to me. If I get it right,
> for one second 48000samples x 4byte(float) = ~187KiB of memory is needed
> for storing the delayed samples. If we set the limit to 100 seconds, a
> delay node will need about 18MiB for storing the delayed samples. That’s
> too much for mobile phones, but not that much on workstations. (In general)
> I think the limit should be device-dependent. Using a device-dependent
> limit means that the developer/script needs to know about it.  Therefore an
> additional function or return value is needed.****
>
> ** **
>
> But do we really need a delay node? A JavaScriptNode can also do the job.
> Maybe some additional operations on AudioBuffer would be handy for
> processing the delay (e.g. inplace copy).****
>
> ** **
>
> (I hope my memory calculation is correct and I have no error in reasoning
> there)****
>
> ** **
>
> Regards,****
>
> Michael****
>
> ** **
>
> ** **
>
Received on Thursday, 16 February 2012 17:42:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 16 February 2012 17:42:00 GMT