VirtualBox

Changeset 80686 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Sep 10, 2019 7:54:05 AM (5 years ago)
Author:
vboxsync
Message:

Audio/DrvHostDSound: Fixed "double buffering" size of a stream's internal ring buffer, adjusted logging.

File:
1 edited

Legend:

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

    r80500 r80686  
    746746        pStreamDS->cbBufSize = bc.dwBufferBytes;
    747747
    748         rc = RTCircBufCreate(&pStreamDS->pCircBuf, pStreamDS->cbBufSize) * 2; /* Use "double buffering" */
     748        rc = RTCircBufCreate(&pStreamDS->pCircBuf, pStreamDS->cbBufSize * 2 /* Use "double buffering" */);
    749749        AssertRC(rc);
    750750
     
    12271227        && pStreamDS->In.cOverruns < 32) /** @todo Make this configurable. */
    12281228    {
    1229         DSLOG(("DSound: Warning: Ring buffer full, skipping to record data (overflow #%RU32)\n", pStreamDS->In.cOverruns));
    1230         DSLOG(("DSound: DSound capture buffer currently uses %RU32/%RU32 bytes\n", cbUsed, pStreamDS->cbBufSize));
     1229        DSLOG(("DSound: Warning: Internal buffer full (size is %zu bytes), skipping to record data (overflow #%RU32)\n",
     1230               RTCircBufSize(pCircBuf), pStreamDS->In.cOverruns));
     1231        DSLOG(("DSound: Warning: DSound capture buffer currently uses %RU32/%RU32 bytes\n", cbUsed, pStreamDS->cbBufSize));
    12311232        pStreamDS->In.cOverruns++;
    12321233    }
     
    14911492        pStreamDS->cbBufSize     = bc.dwBufferBytes;
    14921493
    1493         rc = RTCircBufCreate(&pStreamDS->pCircBuf, pStreamDS->cbBufSize) * 2; /* Use "double buffering". */
     1494        rc = RTCircBufCreate(&pStreamDS->pCircBuf, pStreamDS->cbBufSize * 2 /* Use "double buffering" */);
    14941495        AssertRC(rc);
    14951496
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