Bug 1276569. Part 2 - merge StartUnlocked() with Start() r=kinetik.
authorJW Wang <jwwang@mozilla.com>
Mon, 30 May 2016 16:05:30 +0800
changeset 299626 677a8c65e91b1c276bbeecc77d48c161a2ebcc44
parent 299625 00e04e27ccdd804fe49185f49028a04d14c95f01
child 299627 2981353a3ae77aa0bfc6e899d62c62aa1a527b4b
push id30299
push usercbook@mozilla.com
push dateTue, 31 May 2016 10:00:19 +0000
treeherdermozilla-central@864cdd00360c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1276569
milestone49.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 1276569. Part 2 - merge StartUnlocked() with Start() r=kinetik. MozReview-Commit-ID: DuEXdkvt7je
dom/media/AudioStream.cpp
dom/media/AudioStream.h
--- a/dom/media/AudioStream.cpp
+++ b/dom/media/AudioStream.cpp
@@ -411,24 +411,16 @@ AudioStream::SetVolume(double aVolume)
     NS_WARNING("Could not change volume on cubeb stream.");
   }
 }
 
 void
 AudioStream::Start()
 {
   MonitorAutoLock mon(mMonitor);
-  StartUnlocked();
-}
-
-void
-AudioStream::StartUnlocked()
-{
-  mMonitor.AssertCurrentThreadOwns();
-
   if (mState == INITIALIZED) {
     mState = STARTED;
     int r;
     {
       MonitorAutoUnlock mon(mMonitor);
       r = cubeb_stream_start(mCubebStream.get());
       // DataCallback might be called before we exit this scope
       // if cubeb_stream_start() succeeds. mState must be set to STARTED
--- a/dom/media/AudioStream.h
+++ b/dom/media/AudioStream.h
@@ -335,18 +335,16 @@ private:
 
   // Return true if audio frames are valid (correct sampling rate and valid
   // channel count) otherwise false.
   bool IsValidAudioFormat(Chunk* aChunk);
 
   void GetUnprocessed(AudioBufferWriter& aWriter);
   void GetTimeStretched(AudioBufferWriter& aWriter);
 
-  void StartUnlocked();
-
   // The monitor is held to protect all access to member variables.
   Monitor mMonitor;
 
   // Input rate in Hz (characteristic of the media being played)
   uint32_t mInRate;
   // Output rate in Hz (characteristic of the playback rate)
   uint32_t mOutRate;
   uint32_t mChannels;