Make the |when| argument to AudioBufferSourceNode.start/stop optional
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 23 Apr 2013 15:29:42 -0400
changeset 302 21c9a7bdbc3a
parent 301 90b4b9f7b735
child 303 f51750067961
Make the |when| argument to AudioBufferSourceNode.start/stop optional
webaudio/specification.html
--- a/webaudio/specification.html	Mon Apr 22 13:17:21 2013 -0700
+++ b/webaudio/specification.html	Tue Apr 23 15:29:42 2013 -0400
@@ -2234,8 +2234,8 @@
     attribute double loopStart;
     attribute double loopEnd;
 
-    void start(double when, optional double offset = 0, optional double duration);
-    void stop(double when);
+    void start(optional double when = 0, optional double offset = 0, optional double duration);
+    void stop(optional double when = 0);
 
 };
 </code></pre>
@@ -2296,11 +2296,11 @@
       sound will start playing immediately.  <code>start</code> may only be called one time
       and must be called before <code>stop</code> is called or an exception will be thrown.</p>
       <p>The <dfn id="dfn-offset">offset</dfn> parameter describes
-      the offset time in the buffer (in seconds) where playback will begin.  This parameter is optional
-      with a default value of 0 (playing back from the beginning of the buffer).</p>
+      the offset time in the buffer (in seconds) where playback will begin. If 0 is passed
+      in for this value, then playback will start from the beginning of the buffer.</p>
       <p>The <dfn id="dfn-duration">duration</dfn> parameter
-      describes the duration of the portion (in seconds) to be played.  This parameter is optional, with
-      the default value equal to the total duration of the AudioBuffer minus the <code>offset</code> parameter.
+      describes the duration of the portion (in seconds) to be played.  If this parameter is not passed,
+      the duration will be equal to the total duration of the AudioBuffer minus the <code>offset</code> parameter.
       Thus if neither <code>offset</code> nor <code>duration</code> are specified then the implied duration is
       the total duration of the AudioBuffer.
       </p>