Changeset 244490 in webkit


Ignore:
Timestamp:
Apr 20, 2019 4:46:25 PM (5 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
https://bugs.webkit.org/show_bug.cgi?id=197123
<rdar://problem/49783264>

Reviewed by Per Arne Vollan.

Only set m_becameActive if we actually activated the AudioSession before starting playback. This
avoids unnecessarily deactivating the AudioSession in processWillSuspend().

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244478 r244490  
     12019-04-20  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
     4        https://bugs.webkit.org/show_bug.cgi?id=197123
     5        <rdar://problem/49783264>
     6
     7        Reviewed by Per Arne Vollan.
     8
     9        Only set m_becameActive if we actually activated the AudioSession before starting playback. This
     10        avoids unnecessarily deactivating the AudioSession in processWillSuspend().
     11
     12        * platform/audio/PlatformMediaSessionManager.cpp:
     13        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
     14
    1152019-04-19  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp

    r243958 r244490  
    220220
    221221#if USE(AUDIO_SESSION)
    222     if (activeAudioSessionRequired() && !AudioSession::sharedSession().tryToSetActive(true)) {
    223         ALWAYS_LOG(LOGIDENTIFIER, session.logIdentifier(), " returning false failed to set active AudioSession");
    224         return false;
    225     }
    226 
    227     m_becameActive = true;
     222    if (activeAudioSessionRequired()) {
     223        if (!AudioSession::sharedSession().tryToSetActive(true)) {
     224            ALWAYS_LOG(LOGIDENTIFIER, session.logIdentifier(), " returning false failed to set active AudioSession");
     225            return false;
     226        }
     227
     228        ALWAYS_LOG(LOGIDENTIFIER, session.logIdentifier(), " sucessfully activated AudioSession");
     229        m_becameActive = true;
     230    }
    228231#endif
    229232
Note: See TracChangeset for help on using the changeset viewer.