VirtualBox

Changeset 63848 in vbox for trunk


Ignore:
Timestamp:
Sep 15, 2016 9:50:13 AM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio.cpp: Logging, renaming.

File:
1 edited

Legend:

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

    r63778 r63848  
    965965                    Log3Func(("[%s] %RU32 captured samples mixed\n", pHstStream->szName, cSamplesMixed));
    966966                }
     967                else if (RT_FAILURE(rc))
     968                {
     969                    if (rc == VERR_BUFFER_OVERFLOW)
     970                        LogRel2(("Audio: Guest input stream '%s' full, expect stuttering audio capture\n", pGstStream->szName));
     971                    else
     972                        LogRel2(("Audio: Mixing to guest input stream '%s' failed: %Rrc\n", pGstStream->szName, rc));
     973                }
    967974            }
    968975            else
     
    982989                          pHstStream->szName, cSamplesMixed,
    983990                          AudioMixBufUsed(&pGstStream->MixBuf), AudioMixBufLive(&pGstStream->MixBuf)));
     991            }
     992            else if (RT_FAILURE(rc))
     993            {
     994                if (rc == VERR_BUFFER_OVERFLOW)
     995                    LogRel2(("Audio: Host output stream '%s' full, expect stuttering audio output\n", pHstStream->szName));
     996                else
     997                    LogRel2(("Audio: Mixing to host output stream '%s' failed: %Rrc\n", pHstStream->szName, rc));
    984998            }
    985999
     
    11011115
    11021116        AssertPtr(pThis->pHostDrvAudio->pfnStreamGetStatus);
    1103         PDMAUDIOSTRMSTS strmSts = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream);
     1117        PDMAUDIOSTRMSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream);
    11041118
    11051119        uint32_t cSamplesLive = AudioMixBufLive(&pGstStream->MixBuf);
    11061120        if (cSamplesLive)
    11071121        {
    1108             if (   (strmSts & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
    1109                 && (strmSts & PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE))
     1122            if (   (stsBackend & PDMAUDIOSTRMSTS_FLAG_ENABLED)
     1123                && (stsBackend & PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE))
    11101124            {
    11111125                AssertPtr(pThis->pHostDrvAudio->pfnStreamPlay);
     
    12001214
    12011215        AssertPtr(pThis->pHostDrvAudio->pfnStreamGetStatus);
    1202         PDMAUDIOSTRMSTS strmSts = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream);
     1216        PDMAUDIOSTRMSTS stsBackend = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pHstStream);
    12031217
    12041218        uint32_t cSamplesLive = AudioMixBufLive(&pGstStream->MixBuf);
    12051219        if (!cSamplesLive)
    12061220        {
    1207             if (   (strmSts & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
    1208                 && (strmSts & PDMAUDIOSTRMSTS_FLAG_DATA_READABLE))
     1221            if (   (stsBackend & PDMAUDIOSTRMSTS_FLAG_ENABLED)
     1222                && (stsBackend & PDMAUDIOSTRMSTS_FLAG_DATA_READABLE))
    12091223            {
    12101224                rc = pThis->pHostDrvAudio->pfnStreamCapture(pThis->pHostDrvAudio, pHstStream, NULL /* pvBuf */, 0 /* cbBuf */,
     
    12231237            }
    12241238
    1225             Log3Func(("[%s] strmSts=0x%x, cSamplesCaptured=%RU32, rc=%Rrc\n", pHstStream->szName, strmSts, cSamplesCaptured, rc));
     1239            Log3Func(("[%s] strmSts=0x%x, cSamplesCaptured=%RU32, rc=%Rrc\n", pHstStream->szName, stsBackend, cSamplesCaptured, rc));
    12261240        }
    12271241
     
    21062120    {
    21072121        strmSts = pHstStream->fStatus;
    2108         Log3Func(("%s: strmSts=0x%x\n", pHstStream->szName, strmSts));
     2122        Log3Func(("[%s] strmSts=0x%x\n", pHstStream->szName, strmSts));
    21092123    }
    21102124
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