VirtualBox

Changeset 73582 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 9, 2018 9:50:52 AM (6 years ago)
Author:
vboxsync
Message:

Audio/Mixer: Skip handling input streams which currently are not marked as the recording source -- should save a few CPU cycles.

File:
1 edited

Legend:

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

    r73581 r73582  
    15361536        return rc;
    15371537
    1538     /* Number of detected disabled streams of this sink. */
    1539     uint8_t cStreamsDisabled = 0;
     1538    /* Number of disabled streams of this sink. */
     1539    uint8_t cStreamsDisabled = pSink->cStreams;
    15401540
    15411541    PAUDMIXSTREAM pMixStream, pMixStreamNext;
     
    15871587                continue;
    15881588            }
    1589 
    1590             PDMAUDIOSTREAMSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream);
    1591 
    1592             /* Is the stream not enabled and also is not in a pending disable state anymore? */
    1593             if (   !(strmSts & PDMAUDIOSTREAMSTS_FLAG_ENABLED)
    1594                 && !(strmSts & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE))
    1595             {
    1596                 cStreamsDisabled++;
    1597             }
     1589        }
     1590
     1591        PDMAUDIOSTREAMSTS strmSts = pConn->pfnStreamGetStatus(pConn, pStream);
     1592
     1593        /* Is the stream enabled or in pending disable state?
     1594         * Don't consider this stream as being disabled then. */
     1595        if (   (strmSts & PDMAUDIOSTREAMSTS_FLAG_ENABLED)
     1596            || (strmSts & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE))
     1597        {
     1598            cStreamsDisabled--;
    15981599        }
    15991600
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