VirtualBox

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


Ignore:
Timestamp:
Jun 4, 2021 3:27:51 PM (4 years ago)
Author:
vboxsync
Message:

DrvAudio: Reduced the pre-buffering to 50% for output as well. Then we have the same for both input and output, and it's 50ms less by default (150ms). bugref:9890

File:
1 edited

Legend:

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

    r89510 r89512  
    11391139        if (pCfg->Backend.cFramesPreBuffering == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */
    11401140        {
    1141             /* Pre-buffer 66% of the buffer for output streams, but only 50% for input. Capping both at 200ms. */
    1142             if (pCfg->enmDir == PDMAUDIODIR_OUT)
    1143                 pCfg->Backend.cFramesPreBuffering = pCfg->Backend.cFramesBufferSize * 2 / 3;
    1144             else
    1145                 pCfg->Backend.cFramesPreBuffering = pCfg->Backend.cFramesBufferSize / 2;
     1141            /* Pre-buffer 50% for both output & input. Capping both at 200ms.
     1142               The 50% reasoning being that we need to have sufficient slack space
     1143               in both directions as the guest DMA timer might be delayed by host
     1144               scheduling as well as sped up afterwards because of TM catch-up. */
    11461145            uint32_t const cFramesMax = PDMAudioPropsMilliToFrames(&pCfg->Props, 200);
     1146            pCfg->Backend.cFramesPreBuffering = pCfg->Backend.cFramesBufferSize / 2;
    11471147            pCfg->Backend.cFramesPreBuffering = RT_MIN(pCfg->Backend.cFramesPreBuffering, cFramesMax);
    11481148            pszWhat = "default";
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