VirtualBox

Changeset 76778 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 11, 2019 2:15:04 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Allow pre-buffering to be disabled by setting it to 0 explicitly.

File:
1 edited

Legend:

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

    r76748 r76778  
    30243024    if (pDrvCfg->uPreBufSizeMs != UINT32_MAX)
    30253025    {
    3026         if (!pDrvCfg->uPreBufSizeMs) /* Pre-buffering is set to disabled. */
    3027             LogRel2(("Audio: Using custom pre-buffering (disabled) for stream '%s'\n", pStream->szName));
    30283026        pCfgReq->Backend.cfPreBuf = DrvAudioHlpMilliToFrames(pDrvCfg->uPreBufSizeMs, &pCfgReq->Props);
    30293027    }
     
    31003098                 pStream->szName, DrvAudioHlpFramesToMilli(pCfgAcq->Backend.cfPeriod, &pCfgAcq->Props), pCfgAcq->Backend.cfPeriod));
    31013099
    3102     if (pCfgAcq->Backend.cfPreBuf != pCfgReq->Backend.cfPreBuf)
     3100    if (   pCfgReq->Backend.cfPreBuf
     3101        && pCfgAcq->Backend.cfPreBuf != pCfgReq->Backend.cfPreBuf)
     3102    {
    31033103        LogRel2(("Audio: Pre-buffering size overwritten by backend for stream '%s' (now %RU64ms, %RU32 frames)\n",
    31043104                 pStream->szName, DrvAudioHlpFramesToMilli(pCfgAcq->Backend.cfPreBuf, &pCfgAcq->Props), pCfgAcq->Backend.cfPreBuf));
     3105    }
     3106    else
     3107    {
     3108        LogRel2(("Audio: Pre-buffering is disabled for stream '%s'\n", pStream->szName));
     3109        pCfgAcq->Backend.cfPreBuf = 0;
     3110    }
    31053111
    31063112    /* Sanity for detecting buggy backends. */
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