Bug 848954 - Part 25 - Add documentation on some driver's members. r=roc
authorPaul Adenot <paul@paul.cx>
Tue, 26 Aug 2014 17:02:31 +0200
changeset 223515 0d90c1b646534a08f246c29c5315c8ffdb800a4c
parent 223514 887ce6c58e3db47c570048560e52e62f1b62cc95
child 223516 6e4e5d289d3a794edf71bf75c11805152c9f505d
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs848954
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 848954 - Part 25 - Add documentation on some driver's members. r=roc
content/media/GraphDriver.h
--- a/content/media/GraphDriver.h
+++ b/content/media/GraphDriver.h
@@ -363,18 +363,23 @@ public:
                              uint32_t aChannels,
                              uint32_t aFrames,
                              uint32_t aSampleRate) MOZ_OVERRIDE;
 
   virtual AudioCallbackDriver* AsAudioCallbackDriver() {
     return this;
   }
 
+  /**
+   * Whether the audio callback is processing. This is for asserting only.
+   */
   bool InCallback();
 
+  /* Whether the underlying cubeb stream has been started. See comment for
+   * mStarted for details. */
   bool IsStarted();
 
   /* Tell the driver whether this process is using a microphone or not. This is
    * thread safe. */
   void SetMicrophoneActive(bool aActive);
 private:
   /**
    * On certain MacBookPro, the microphone is located near the left speaker.
@@ -383,17 +388,17 @@ private:
   void PanOutputIfNeeded(bool aMicrophoneActive);
   /**
    * This is called when the output device used by the cubeb stream changes. */
   void DeviceChangedCallback();
   /* Start the cubeb stream */
   void StartStream();
   friend class AsyncCubebTask;
   void Init();
-  /* MediaStreamGraph are always down/up mixed to stereo for now. */
+  /* MediaStreamGraphs are always down/up mixed to stereo for now. */
   static const uint32_t ChannelCount = 2;
   /* The size of this buffer comes from the fact that some audio backends can
    * call back with a number of frames lower than one block (128 frames), so we
    * need to keep at most two block in the SpillBuffer, because we always round
    * up to block boundaries during an iteration. */
   SpillBuffer<AudioDataValue, WEBAUDIO_BLOCK_SIZE * 2, ChannelCount> mScratchBuffer;
   /* Wrapper to ensure we write exactly the number of frames we need in the
    * audio buffer cubeb passes us. */
@@ -431,17 +436,17 @@ private:
 
   /* Thread for off-main-thread initialization and
    * shutdown of the audio stream. */
   nsCOMPtr<nsIThread> mInitShutdownThread;
   dom::AudioChannel mAudioChannel;
   /* This can only be accessed with the graph's monitor held. */
   bool mInCallback;
   /* A thread has been created to be able to pause and restart the audio thread,
-   * but has not done so yet. This indicates tha the callback should return
+   * but has not done so yet. This indicates that the callback should return
    * early */
   bool mPauseRequested;
   /**
    * True if microphone is being used by this process. This is synchronized by
    * the graph's monitor. */
   bool mMicrophoneActive;
 };