Bug 797150 - Rename AudioBufferSourceNode's noteOn and noteOff to start/stop; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 02 Oct 2012 18:15:33 -0400
changeset 109107 c9a2c26e6ea6f1827fca456f992632c827df39cd
parent 109106 7a4d62a24e050b1e4b59006919ddd3862f479679
child 109108 61129bd6f26827fa5cc43ffd1ee1392035792106
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersbzbarsky
bugs797150
milestone18.0a1
Bug 797150 - Rename AudioBufferSourceNode's noteOn and noteOff to start/stop; r=bzbarsky
content/media/webaudio/AudioBufferSourceNode.h
content/media/webaudio/test/test_singleSourceDest.html
dom/webidl/AudioBufferSourceNode.webidl
--- a/content/media/webaudio/AudioBufferSourceNode.h
+++ b/content/media/webaudio/AudioBufferSourceNode.h
@@ -18,18 +18,18 @@ public:
   explicit AudioBufferSourceNode(AudioContext* aContext);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioBufferSourceNode, AudioSourceNode)
 
   virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope,
                                bool* aTriedToWrap);
 
-  void NoteOn(double) { /* no-op for now */ }
-  void NoteOff(double) { /* no-op for now */ }
+  void Start(double) { /* no-op for now */ }
+  void Stop(double) { /* no-op for now */ }
 
   AudioBuffer* GetBuffer() const
   {
     return mBuffer;
   }
   void SetBuffer(AudioBuffer* aBuffer);
 
 private:
--- a/content/media/webaudio/test/test_singleSourceDest.html
+++ b/content/media/webaudio/test/test_singleSourceDest.html
@@ -36,19 +36,19 @@ addLoadEvent(function() {
 
   source.connect(destination);
 
   is(source.numberOfInputs, 0, "Source node has 0 inputs");
   is(source.numberOfOutputs, 1, "Source node has 0 outputs");
   is(destination.numberOfInputs, 1, "Destination node has 0 inputs");
   is(destination.numberOfOutputs, 0, "Destination node has 0 outputs");
 
-  source.noteOn(0);
+  source.start(0);
   SimpleTest.executeSoon(function() {
-    source.noteOff(0);
+    source.stop(0);
     source.disconnect();
 
     SpecialPowers.clearUserPref("media.webaudio.enabled");
     SimpleTest.finish();
   });
 });
 
 </script>
--- a/dom/webidl/AudioBufferSourceNode.webidl
+++ b/dom/webidl/AudioBufferSourceNode.webidl
@@ -22,14 +22,14 @@ interface AudioBufferSourceNode : AudioS
 
     // Playback this in-memory audio asset  
     // Many sources can share the same buffer  
     attribute AudioBuffer? buffer;
 
     //attribute AudioParam playbackRate;
     //attribute boolean loop;
 
-    void noteOn(double when);
-    //void noteGrainOn(double when, double grainOffset, double grainDuration);
-    void noteOff(double when);
+    void start(double when);
+    //void start(double when, double grainOffset, double grainDuration);
+    void stop(double when);
 
 };