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****
>
> ** **
>
> ** **
>