Title: [253057] tags/Safari-609.1.11/Source/WebCore
Revision
253057
Author
alanc...@apple.com
Date
2019-12-03 11:33:25 -0800 (Tue, 03 Dec 2019)

Log Message

Cherry-pick r252956. rdar://problem/57438874

    MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
    https://bugs.webkit.org/show_bug.cgi?id=204600
    <rdar://problem/57438874>

    Reviewed by Eric Carlson.

    MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
    If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
    and confuse the pipe.
    Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.

    Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.

    * platform/mediastream/mac/MockAudioSharedUnit.h:
    * platform/mediastream/mac/MockAudioSharedUnit.mm:
    (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
    (WebCore::MockAudioSharedUnit::startInternal):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: tags/Safari-609.1.11/Source/WebCore/ChangeLog (253056 => 253057)


--- tags/Safari-609.1.11/Source/WebCore/ChangeLog	2019-12-03 19:28:31 UTC (rev 253056)
+++ tags/Safari-609.1.11/Source/WebCore/ChangeLog	2019-12-03 19:33:25 UTC (rev 253057)
@@ -1,3 +1,48 @@
+2019-12-03  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r252956. rdar://problem/57438874
+
+    MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
+    https://bugs.webkit.org/show_bug.cgi?id=204600
+    <rdar://problem/57438874>
+    
+    Reviewed by Eric Carlson.
+    
+    MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
+    If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
+    and confuse the pipe.
+    Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.
+    
+    Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.
+    
+    * platform/mediastream/mac/MockAudioSharedUnit.h:
+    * platform/mediastream/mac/MockAudioSharedUnit.mm:
+    (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
+    (WebCore::MockAudioSharedUnit::startInternal):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-11-30  youenn fablet  <you...@apple.com>
+
+            MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
+            https://bugs.webkit.org/show_bug.cgi?id=204600
+            <rdar://problem/57438874>
+
+            Reviewed by Eric Carlson.
+
+            MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
+            If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
+            and confuse the pipe.
+            Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.
+
+            Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.
+
+            * platform/mediastream/mac/MockAudioSharedUnit.h:
+            * platform/mediastream/mac/MockAudioSharedUnit.mm:
+            (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
+            (WebCore::MockAudioSharedUnit::startInternal):
+
 2019-12-02  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r252935. rdar://problem/45311541

Modified: tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h (253056 => 253057)


--- tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h	2019-12-03 19:28:31 UTC (rev 253056)
+++ tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h	2019-12-03 19:33:25 UTC (rev 253057)
@@ -82,9 +82,7 @@
     bool m_hasAudioUnit { false };
 
     RunLoop::Timer<MockAudioSharedUnit> m_timer;
-    MonotonicTime m_startTime { MonotonicTime::nan() };
     MonotonicTime m_lastRenderTime { MonotonicTime::nan() };
-    Seconds m_elapsedTime { 0_s };
     MonotonicTime m_delayUntil;
 
     Ref<WorkQueue> m_workQueue;

Modified: tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm (253056 => 253057)


--- tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm	2019-12-03 19:28:31 UTC (rev 253056)
+++ tags/Safari-609.1.11/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm	2019-12-03 19:33:25 UTC (rev 253057)
@@ -128,11 +128,11 @@
         return 0;
 
     m_timer.stop();
-    m_startTime = MonotonicTime::nan();
+    m_lastRenderTime = MonotonicTime::nan();
     m_workQueue->dispatch([this] {
         reconfigure();
         callOnMainThread([this] {
-            m_startTime = MonotonicTime::now();
+            m_lastRenderTime = MonotonicTime::now();
             m_timer.startRepeating(renderInterval());
         });
     });
@@ -143,7 +143,7 @@
 {
     m_hasAudioUnit = false;
     m_timer.stop();
-    m_startTime = MonotonicTime::nan();
+    m_lastRenderTime = MonotonicTime::nan();
 }
 
 OSStatus MockAudioSharedUnit::startInternal()
@@ -154,7 +154,7 @@
     if (!m_hasAudioUnit)
         m_hasAudioUnit = true;
 
-    m_startTime = MonotonicTime::now();
+    m_lastRenderTime = MonotonicTime::now();
     m_timer.startRepeating(renderInterval());
     return 0;
 }
@@ -164,7 +164,7 @@
     if (!m_hasAudioUnit)
         return;
     m_timer.stop();
-    m_startTime = MonotonicTime::nan();
+    m_lastRenderTime = MonotonicTime::nan();
 }
 
 bool MockAudioSharedUnit::isProducingData() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to