VirtualBox

Changeset 88157 in vbox


Ignore:
Timestamp:
Mar 17, 2021 2:30:31 PM (4 years ago)
Author:
vboxsync
Message:

DrvAudio: Logging fixes. bugref:9890

File:
1 edited

Legend:

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

    r88061 r88157  
    636636
    637637    uint64_t msBufferSize = PDMAudioPropsFramesToMilli(&CfgHostAcq.Props, CfgHostAcq.Backend.cFramesBufferSize);
    638 
    639638    LogRel2(("Audio: Buffer size of stream '%s' is %RU64ms (%RU32 frames)\n",
    640639             pStream->szName, msBufferSize, CfgHostAcq.Backend.cFramesBufferSize));
     
    15301529#endif /* LOG_ENABLED */
    15311530
    1532     do
     1531    do /* No, this isn't a loop either. sigh. */
    15331532    {
    15341533        if (!pThis->pHostDrvAudio)
     
    31433142     * All parameters in principle can be changed and returned by the backend via the acquired configuration. */
    31443143
    3145     char szWhat[64]; /* Log where a value came from. */
    3146 
    31473144    /*
    31483145     * PCM
     
    31933190     * Period size
    31943191     */
     3192    const char *pszWhat = "";
    31953193    if (pDrvCfg->uPeriodSizeMs)
    31963194    {
    31973195        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPeriodSizeMs);
    3198         RTStrPrintf(szWhat, sizeof(szWhat), "custom");
     3196        pszWhat = "custom";
    31993197    }
    32003198
     
    32023200    {
    32033201        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 150 /*ms*/);
    3204         RTStrPrintf(szWhat, sizeof(szWhat), "default");
     3202        pszWhat = "default";
    32053203    }
    32063204
    32073205    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),
    32093207             pCfgReq->Backend.cFramesPeriod, pStream->szName));
    32103208
     
    32123210     * Buffer size
    32133211     */
     3212    pszWhat = "";
    32143213    if (pDrvCfg->uBufferSizeMs)
    32153214    {
    32163215        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uBufferSizeMs);
    3217         RTStrPrintf(szWhat, sizeof(szWhat), "custom");
     3216        pszWhat = "custom";
    32183217    }
    32193218
     
    32213220    {
    32223221        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 300 /*ms*/);
    3223         RTStrPrintf(szWhat, sizeof(szWhat), "default");
     3222        pszWhat = "default";
    32243223    }
    32253224
    32263225    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),
    32283227             pCfgReq->Backend.cFramesBufferSize, pStream->szName));
    32293228
     
    32313230     * Pre-buffering size
    32323231     */
     3232    pszWhat = "";
    32333233    if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */
    32343234    {
    32353235        pCfgReq->Backend.cFramesPreBuffering = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPreBufSizeMs);
    3236         RTStrPrintf(szWhat, sizeof(szWhat), "custom");
     3236        pszWhat = "custom";
    32373237    }
    32383238    else /* No, then either use the default or device-specific settings (if any). */
     
    32423242            /* For pre-buffering to finish the buffer at least must be full one time. */
    32433243            pCfgReq->Backend.cFramesPreBuffering = pCfgReq->Backend.cFramesBufferSize;
    3244             RTStrPrintf(szWhat, sizeof(szWhat), "default");
     3244            pszWhat = "default";
    32453245        }
    32463246    }
    32473247
    32483248    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),
    32503250             pCfgReq->Backend.cFramesPreBuffering, pStream->szName));
    32513251
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