consolidate AudioBufferSourceNode start() method
authorcrogers
Mon, 29 Oct 2012 14:29:23 -0700
changeset 193 7caa923372ed
parent 192 233781dbb864
child 194 eeebb553772d
consolidate AudioBufferSourceNode start() method
webaudio/specification.html
--- a/webaudio/specification.html	Fri Oct 19 15:15:28 2012 -0700
+++ b/webaudio/specification.html	Mon Oct 29 14:29:23 2012 -0700
@@ -1884,15 +1884,12 @@
 
     readonly attribute unsigned short playbackState;
 
-    <span class="comment">// Playback this in-memory audio asset  </span>
-    <span class="comment">// Many sources can share the same buffer  </span>
     attribute AudioBuffer? buffer;
 
     attribute AudioParam playbackRate;
     attribute boolean loop;
 
-    void start(double when);
-    void start(double when, double grainOffset, double grainDuration);
+    void start(double when, optional double offset = 0, optional double duration);
     void stop(double when);
 
 };
@@ -1938,22 +1935,16 @@
       this value or if the value is less than <b>currentTime</b>, then the
       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>
-    </dd>
-</dl>
-<dl>
-  <dt id="dfn-start">The <code>start</code> method (please see the <a href=#deprecation-section>deprecation section</a> about name change)</dt>
-    <dd><p>Schedules a portion of a sound to playback at an exact time.</p>
-      <p>The <dfn id="dfn-when_AudioBufferSourceNode">when</dfn> parameter
-      describes at what time (in seconds) the sound should start playing.
-      It is in the same time coordinate system as AudioContext.currentTime.
-      If 0 is passed in for this value or if the value is less than
-      <b>currentTime</b>, then the sound will start playing immediately. </p>
-      <p>The <dfn id="dfn-grainOffset">grainOffset</dfn> parameter describes
-      the offset in the buffer (in seconds) for the portion to be played.</p>
-      <p>The <dfn id="dfn-grainDuration">grainDuration</dfn> parameter
-      describes the duration of the portion (in seconds) to be played.
-      Either <code>start</code> or <code>start</code> (but not both) 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>
+      <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.
+      Thus if neither <code>offset</code> nor <code>duration</code> are specified then the implied duration is
+      the total duration of the AudioBuffer.
+      </p>
+
     </dd>
 </dl>
 <dl>