VirtualBox

Changeset 73692 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 15, 2018 1:27:59 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvHostDSound.cpp: Only set acquired parameters if DirectSound has returned a different buffer size than initially requested.

File:
1 edited

Legend:

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

    r73689 r73692  
    765765        pThis->pDSStrmOut = pStreamDS;
    766766
    767         pCfgAcq->Backend.cfBufferSize = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pStreamDS->cbBufSize);
    768         pCfgAcq->Backend.cfPeriod     = pCfgAcq->Backend.cfBufferSize / 2;
    769         pCfgAcq->Backend.cfPreBuf     = pCfgAcq->Backend.cfBufferSize;
     767        const uint32_t cfBufSize = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pStreamDS->cbBufSize);
     768        if (cfBufSize != pCfgAcq->Backend.cfBufferSize)
     769        {
     770            pCfgAcq->Backend.cfBufferSize = cfBufSize;
     771            pCfgAcq->Backend.cfPeriod     = cfBufSize / 4;
     772            pCfgAcq->Backend.cfPreBuf     = pCfgAcq->Backend.cfPeriod * 2;
     773        }
    770774
    771775    } while (0);
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