VirtualBox

Changeset 68268 in vbox


Ignore:
Timestamp:
Aug 3, 2017 7:56:01 AM (7 years ago)
Author:
vboxsync
Message:

Audio/AudioMixer.cpp: Only apply AUDMIXSINK_STS_PENDING_DISABLE when AUDMIXSINK_STS_RUNNING is set in AudioMixerSinkCtl(), logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r68132 r68268  
    727727    else if (enmSinkCmd == AUDMIXSINKCMD_DISABLE)
    728728    {
    729         /* Set the sink in a pending disable state first.
    730          * The final status (disabled) will be set in the sink's iteration. */
    731         pSink->fStatus |= AUDMIXSINK_STS_PENDING_DISABLE;
     729        if (pSink->fStatus & AUDMIXSINK_STS_RUNNING)
     730        {
     731            /* Set the sink in a pending disable state first.
     732             * The final status (disabled) will be set in the sink's iteration. */
     733            pSink->fStatus |= AUDMIXSINK_STS_PENDING_DISABLE;
     734        }
    732735    }
    733736
     
    10311034    int rc2 = RTCritSectEnter(&pSink->CritSect);
    10321035    if (RT_FAILURE(rc2))
    1033         return 0;
    1034 
    1035     bool fIsActive = (pSink->fStatus & AUDMIXSINK_STS_RUNNING);
     1036        return false;
     1037
     1038    bool fIsActive = pSink->fStatus & AUDMIXSINK_STS_RUNNING;
     1039    /* Note: AUDMIXSINK_STS_PENDING_DISABLE implies AUDMIXSINK_STS_RUNNING. */
     1040
     1041    Log3Func(("[%s] fActive=%RTbool\n", pSink->pszName, fIsActive));
    10361042
    10371043    rc2 = RTCritSectLeave(&pSink->CritSect);
     
    13151321    int rc2 = RTCritSectEnter(&pSink->CritSect);
    13161322    AssertRC(rc2);
     1323
     1324    LogFlowFunc(("[%s]\n", pSink->pszName));
    13171325
    13181326    audioMixerSinkReset(pSink);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette