VirtualBox

Changeset 61409 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 2, 2016 12:12:29 PM (9 years ago)
Author:
vboxsync
Message:

Audio/AudioMixBuffer.cpp: Better warning, logging.

File:
1 edited

Legend:

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

    r61386 r61409  
    17341734            *pcWritten = 0;
    17351735
    1736         AUDMIXBUF_LOG(("%s: Parent buffer %s is full\n",
     1736        AUDMIXBUF_LOG(("%s: Parent buffer '%s' is full\n",
    17371737                       pMixBuf->pszName, pMixBuf->pParent->pszName));
    17381738
     
    18291829    {
    18301830        pMixBuf->offWrite = (pMixBuf->offWrite + cWrittenTotal) % pMixBuf->cSamples;
    1831         pMixBuf->cUsed    = RT_MIN(pMixBuf->cUsed + cWrittenTotal,
    1832                                    pMixBuf->cSamples /* Max */);
    1833 
    1834         uint32_t cProcessedTotal = pMixBuf->cUsed + cWrittenTotal;
    1835         if (cProcessedTotal > pMixBuf->cSamples)
     1831        pMixBuf->cUsed   += cWrittenTotal;
     1832
     1833        if (pMixBuf->cUsed > pMixBuf->cSamples)
    18361834        {
    1837             AUDMIXBUF_LOG(("Warning: %RU32 unprocessed samples overwritten\n", cProcessedTotal - pMixBuf->cSamples));
     1835            AUDMIXBUF_LOG(("Warning: %RU32 unprocessed samples overwritten\n", pMixBuf->cUsed - pMixBuf->cSamples));
    18381836            pMixBuf->cUsed = pMixBuf->cSamples;
    18391837
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