[web-audio-api] What should happen in case of cycles containing a delay node is under-defined (#75)

> Originally reported on W3C Bugzilla [ISSUE-23037](https://www.w3.org/Bugs/Public/show_bug.cgi?id=23037) Wed, 21 Aug 2013 17:05:52 GMT
> Reported by paul@paul.cx
> Assigned to 

Consider the following code:

>  var ctx = new AudioContext();
>  var source = ctx.createBufferSource();
>  // some_loaded_buffer is a valid AudioBuffer
>  source.buffer = some_loaded_buffer;
>
>  var gain = ctx.createGain();
>  var delay = ctx.createDelay();
>  // defaults to zero anyways, just there to be explicit 
>  delay.delayTime = 0.0;

>  source.connect(gain);
>  gain.connect(delay);
>  delay.connect(ctx.destination);
>  // cycle
>  delay.connect(gain);
>
>  source.start(0);


The spec does not describe the case where the |delayTime| parameter of the |delay| node is zero. In fact, problems would arise if the |delayTime| is lower than |128/ctx.sampleRate|.

While it is fairly easy to detect something like |delay.delayTime.value = 0.0| where |delay| is in a cycle (and we could throw), there are be some cases where we can't easily predict the value of the AudioParam.

I propose that in such hard-to-detect cases, the subgraph containing the cycle is treated as a silent input, no error being thrown. It could also be of interest in such case to warn the author in the eventual error console of the UA.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/75

Received on Wednesday, 11 September 2013 14:28:32 UTC