Changeset 88157 in vbox
- Timestamp:
- Mar 17, 2021 2:30:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88061 r88157 636 636 637 637 uint64_t msBufferSize = PDMAudioPropsFramesToMilli(&CfgHostAcq.Props, CfgHostAcq.Backend.cFramesBufferSize); 638 639 638 LogRel2(("Audio: Buffer size of stream '%s' is %RU64ms (%RU32 frames)\n", 640 639 pStream->szName, msBufferSize, CfgHostAcq.Backend.cFramesBufferSize)); … … 1530 1529 #endif /* LOG_ENABLED */ 1531 1530 1532 do 1531 do /* No, this isn't a loop either. sigh. */ 1533 1532 { 1534 1533 if (!pThis->pHostDrvAudio) … … 3143 3142 * All parameters in principle can be changed and returned by the backend via the acquired configuration. */ 3144 3143 3145 char szWhat[64]; /* Log where a value came from. */3146 3147 3144 /* 3148 3145 * PCM … … 3193 3190 * Period size 3194 3191 */ 3192 const char *pszWhat = ""; 3195 3193 if (pDrvCfg->uPeriodSizeMs) 3196 3194 { 3197 3195 pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPeriodSizeMs); 3198 RTStrPrintf(szWhat, sizeof(szWhat), "custom");3196 pszWhat = "custom"; 3199 3197 } 3200 3198 … … 3202 3200 { 3203 3201 pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 150 /*ms*/); 3204 RTStrPrintf(szWhat, sizeof(szWhat), "default");3202 pszWhat = "default"; 3205 3203 } 3206 3204 3207 3205 LogRel2(("Audio: Using %s period size %RU64 ms / %RU32 frames for stream '%s'\n", 3208 szWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod),3206 pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod), 3209 3207 pCfgReq->Backend.cFramesPeriod, pStream->szName)); 3210 3208 … … 3212 3210 * Buffer size 3213 3211 */ 3212 pszWhat = ""; 3214 3213 if (pDrvCfg->uBufferSizeMs) 3215 3214 { 3216 3215 pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uBufferSizeMs); 3217 RTStrPrintf(szWhat, sizeof(szWhat), "custom");3216 pszWhat = "custom"; 3218 3217 } 3219 3218 … … 3221 3220 { 3222 3221 pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 300 /*ms*/); 3223 RTStrPrintf(szWhat, sizeof(szWhat), "default");3222 pszWhat = "default"; 3224 3223 } 3225 3224 3226 3225 LogRel2(("Audio: Using %s buffer size %RU64 ms / %RU32 frames for stream '%s'\n", 3227 szWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize),3226 pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize), 3228 3227 pCfgReq->Backend.cFramesBufferSize, pStream->szName)); 3229 3228 … … 3231 3230 * Pre-buffering size 3232 3231 */ 3232 pszWhat = ""; 3233 3233 if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */ 3234 3234 { 3235 3235 pCfgReq->Backend.cFramesPreBuffering = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPreBufSizeMs); 3236 RTStrPrintf(szWhat, sizeof(szWhat), "custom");3236 pszWhat = "custom"; 3237 3237 } 3238 3238 else /* No, then either use the default or device-specific settings (if any). */ … … 3242 3242 /* For pre-buffering to finish the buffer at least must be full one time. */ 3243 3243 pCfgReq->Backend.cFramesPreBuffering = pCfgReq->Backend.cFramesBufferSize; 3244 RTStrPrintf(szWhat, sizeof(szWhat), "default");3244 pszWhat = "default"; 3245 3245 } 3246 3246 } 3247 3247 3248 3248 LogRel2(("Audio: Using %s pre-buffering size %RU64 ms / %RU32 frames for stream '%s'\n", 3249 szWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering),3249 pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering), 3250 3250 pCfgReq->Backend.cFramesPreBuffering, pStream->szName)); 3251 3251
Note:
See TracChangeset
for help on using the changeset viewer.