Bug 1351586 - AudioSink constructor should take a const reference instead of value of TimeUnit. r=kaku
authorJW Wang <jwwang@mozilla.com>
Wed, 12 Apr 2017 16:43:05 +0800
changeset 400981 ad87a8775eff2e771ab603d8f518dd5a3c2fb65e
parent 400980 57a42439cc5ea575baeb27aa9777df57e4f1ade5
child 400982 295cd4bc5e05cc3465e8a4079d19dce739f823ce
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1351586
milestone55.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 1351586 - AudioSink constructor should take a const reference instead of value of TimeUnit. r=kaku MozReview-Commit-ID: F95iIsVealk
dom/media/mediasink/AudioSink.cpp
dom/media/mediasink/AudioSink.h
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -28,17 +28,17 @@ namespace media {
 // The amount of audio frames that is used to fuzz rounding errors.
 static const int64_t AUDIO_FUZZ_FRAMES = 1;
 
 // Amount of audio frames we will be processing ahead of use
 static const int32_t LOW_AUDIO_USECS = 300000;
 
 AudioSink::AudioSink(AbstractThread* aThread,
                      MediaQueue<AudioData>& aAudioQueue,
-                     TimeUnit aStartTime,
+                     const TimeUnit& aStartTime,
                      const AudioInfo& aInfo,
                      dom::AudioChannel aChannel)
   : mStartTime(aStartTime)
   , mInfo(aInfo)
   , mChannel(aChannel)
   , mPlaying(true)
   , mMonitor("AudioSink")
   , mWritten(0)
--- a/dom/media/mediasink/AudioSink.h
+++ b/dom/media/mediasink/AudioSink.h
@@ -27,17 +27,17 @@ class AudioConverter;
 namespace media {
 
 class AudioSink : private AudioStream::DataSource {
   using PlaybackParams = MediaSink::PlaybackParams;
 
 public:
   AudioSink(AbstractThread* aThread,
             MediaQueue<AudioData>& aAudioQueue,
-            TimeUnit aStartTime,
+            const TimeUnit& aStartTime,
             const AudioInfo& aInfo,
             dom::AudioChannel aChannel);
 
   ~AudioSink();
 
   // Return a promise which will be resolved when AudioSink
   // finishes playing, or rejected if any error.
   RefPtr<GenericPromise> Init(const PlaybackParams& aParams);