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

Re: [web-audio-api] Specify what should happen when passing invalid offset/duration values to AudioBufferSourceNode.start (#18)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:29:26 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/18/24244093@github.com>
> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=21240#1) by Robert O'Callahan (Mozilla) on W3C Bugzilla. Sun, 10 Mar 2013 21:26:13 GMT

I don't think throwing an exception is necessary here.

I don't like the behavior of just ignoring the offset if it's >= the length of the buffer. That creates a discontinuity as the offset increases from before the buffer end to after it.

If compatibility issues don't trump, then I suggest first clamping the offset to [0, length], then adding the duration to find the endpoint and clamping the endpoint.

Reply to this email directly or view it on GitHub:
Received on Wednesday, 11 September 2013 14:29:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:24 UTC