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

[web-audio-api] Unclear semantics of duration param to AudioBufferSourceNode.start() (#71)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:28:07 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/71@github.com>
> Originally reported on W3C Bugzilla [ISSUE-23007](https://www.w3.org/Bugs/Public/show_bug.cgi?id=23007) Mon, 19 Aug 2013 14:38:11 GMT
> Reported by Joe Berkovitz / NF
> Assigned to 

One reading of the optional "duration" parameter AudioBufferSourceNode.start() is that it is a kind of syntactic sugar in which

   node.start(startTime, offset, duration);

behaves the same as:

   node.start(startTime, offset);
   node.stop(startTime + duration, offset);

Another view is that the duration paramter has slightly different semantics from the stop/start delta, although exactly how it differs is unclear. Gecko's interpretation is reflected in this WebKit bug:

  https://bugs.webkit.org/show_bug.cgi?id=111952

which states that the duration parameter is ignored if the buffer is in loop mode.

My feeling is that the syntactic-sugar interpretation (duration is equivalent stop/start delta) is the cleanest, most obvious behavior and was probably the original intention of the parameter, however objectionable the sugar flavoring may be.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/71
Received on Wednesday, 11 September 2013 14:29:56 UTC

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