VirtualBox

Changeset 76868 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 17, 2019 4:03:30 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: One more bugfix regarding setting device-specific pre-buffering values.

File:
1 edited

Legend:

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

    r76848 r76868  
    30483048     * Pre-buffering size
    30493049     */
    3050     if (pDrvCfg->uPreBufSizeMs != UINT32_MAX)
     3050    if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */
    30513051    {
    30523052        pCfgReq->Backend.cfPreBuf = DrvAudioHlpMilliToFrames(pDrvCfg->uPreBufSizeMs, &pCfgReq->Props);
    30533053        RTStrPrintf(szWhat, sizeof(szWhat), "global / per-VM");
    30543054    }
    3055 
    3056     if (pCfgReq->Backend.cfPreBuf == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */
    3057     {
    3058         /* For pre-buffering to finish the buffer at least must be full one time. */
    3059         pCfgReq->Backend.cfPreBuf = pCfgReq->Backend.cfBufferSize;
    3060         RTStrPrintf(szWhat, sizeof(szWhat), "default");
    3061     }
    3062     else
    3063         RTStrPrintf(szWhat, sizeof(szWhat), "device-specific");
     3055    else /* No, then either use the default or device-specific settings (if any). */
     3056    {
     3057        if (pCfgReq->Backend.cfPreBuf == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */
     3058        {
     3059            /* For pre-buffering to finish the buffer at least must be full one time. */
     3060            pCfgReq->Backend.cfPreBuf = pCfgReq->Backend.cfBufferSize;
     3061            RTStrPrintf(szWhat, sizeof(szWhat), "default");
     3062        }
     3063        else
     3064            RTStrPrintf(szWhat, sizeof(szWhat), "device-specific");
     3065    }
    30643066
    30653067    LogRel2(("Audio: Using %s pre-buffering size (%RU64ms, %RU32 frames) for stream '%s'\n",
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