Changeset 89512 in vbox
- Timestamp:
- Jun 4, 2021 3:27:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r89510 r89512 1139 1139 if (pCfg->Backend.cFramesPreBuffering == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */ 1140 1140 { 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. */ 1146 1145 uint32_t const cFramesMax = PDMAudioPropsMilliToFrames(&pCfg->Props, 200); 1146 pCfg->Backend.cFramesPreBuffering = pCfg->Backend.cFramesBufferSize / 2; 1147 1147 pCfg->Backend.cFramesPreBuffering = RT_MIN(pCfg->Backend.cFramesPreBuffering, cFramesMax); 1148 1148 pszWhat = "default";
Note:
See TracChangeset
for help on using the changeset viewer.