Changeset 252956 in webkit


Ignore:
Timestamp:
Nov 30, 2019 4:32:56 AM (4 years ago)
Author:
youenn@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252955 r252956  
     12019-11-30  youenn fablet  <youenn@apple.com>
     2
     3        MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
     4        https://bugs.webkit.org/show_bug.cgi?id=204600
     5        <rdar://problem/57438874>
     6
     7        Reviewed by Eric Carlson.
     8
     9        MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
     10        If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
     11        and confuse the pipe.
     12        Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.
     13
     14        Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.
     15
     16        * platform/mediastream/mac/MockAudioSharedUnit.h:
     17        * platform/mediastream/mac/MockAudioSharedUnit.mm:
     18        (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
     19        (WebCore::MockAudioSharedUnit::startInternal):
     20
    1212019-11-30  Philippe Normand  <pnormand@igalia.com>
    222
  • trunk/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h

    r252660 r252956  
    8383
    8484    RunLoop::Timer<MockAudioSharedUnit> m_timer;
    85     MonotonicTime m_startTime { MonotonicTime::nan() };
    8685    MonotonicTime m_lastRenderTime { MonotonicTime::nan() };
    87     Seconds m_elapsedTime { 0_s };
    8886    MonotonicTime m_delayUntil;
    8987
  • trunk/Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm

    r252681 r252956  
    129129
    130130    m_timer.stop();
    131     m_startTime = MonotonicTime::nan();
     131    m_lastRenderTime = MonotonicTime::nan();
    132132    m_workQueue->dispatch([this] {
    133133        reconfigure();
    134134        callOnMainThread([this] {
    135             m_startTime = MonotonicTime::now();
     135            m_lastRenderTime = MonotonicTime::now();
    136136            m_timer.startRepeating(renderInterval());
    137137        });
     
    144144    m_hasAudioUnit = false;
    145145    m_timer.stop();
    146     m_startTime = MonotonicTime::nan();
     146    m_lastRenderTime = MonotonicTime::nan();
    147147}
    148148
     
    155155        m_hasAudioUnit = true;
    156156
    157     m_startTime = MonotonicTime::now();
     157    m_lastRenderTime = MonotonicTime::now();
    158158    m_timer.startRepeating(renderInterval());
    159159    return 0;
     
    165165        return;
    166166    m_timer.stop();
    167     m_startTime = MonotonicTime::nan();
     167    m_lastRenderTime = MonotonicTime::nan();
    168168}
    169169
Note: See TracChangeset for help on using the changeset viewer.