VirtualBox

Changeset 76727 in vbox for trunk/src


Ignore:
Timestamp:
Jan 9, 2019 10:06:47 AM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: More buffering defaults tweaking.

File:
1 edited

Legend:

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

    r76726 r76727  
    29952995        pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(pDrvCfg->uPeriodSizeMs, &pCfgReq->Props);
    29962996    else /* Set default period size. */
    2997         pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(20 /* ms */, &pCfgReq->Props);
     2997        pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(50 /* ms */, &pCfgReq->Props);
    29982998
    29992999    LogRel2(("Audio: Using %s period size (%RU64ms, %RU32 frames) for stream '%s'\n",
     
    30073007        pCfgReq->Backend.cfBufferSize = DrvAudioHlpMilliToFrames(pDrvCfg->uBufferSizeMs, &pCfgReq->Props);
    30083008    else /* Set default buffer size. */
    3009         pCfgReq->Backend.cfBufferSize = DrvAudioHlpMilliToFrames(100 /* ms */, &pCfgReq->Props);
     3009        pCfgReq->Backend.cfBufferSize = DrvAudioHlpMilliToFrames(250 /* ms */, &pCfgReq->Props);
    30103010
    30113011    LogRel2(("Audio: Using %s buffer size (%RU64ms, %RU32 frames) for stream '%s'\n",
     
    30233023    }
    30243024    else /* Set default pre-buffering size. */
    3025         pCfgReq->Backend.cfPreBuf = pCfgReq->Backend.cfPeriod * 2;
     3025    {
     3026        /* For pre-buffering to finish the buffer at least must be full one time. */
     3027        pCfgReq->Backend.cfPreBuf = pCfgReq->Backend.cfBufferSize;
     3028    }
    30263029
    30273030    LogRel2(("Audio: Using %s pre-buffering size (%RU64ms, %RU32 frames) for stream '%s'\n",
     
    30993102                    ("Acquired period size must be smaller than buffer size\n"),
    31003103                    VERR_INVALID_PARAMETER);
    3101     AssertMsgReturn(pCfgAcq->Backend.cfPreBuf < pCfgAcq->Backend.cfBufferSize,
    3102                     ("Acquired pre-buffering size must be smaller than buffer size -- this otherwise will lead to buffer overruns\n"),
     3104    AssertMsgReturn(pCfgAcq->Backend.cfPreBuf <= pCfgAcq->Backend.cfBufferSize,
     3105                    ("Acquired pre-buffering size must be smaller or as big as the buffer size\n"),
    31033106                    VERR_INVALID_PARAMETER);
    31043107
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