VirtualBox

Changeset 87438 in vbox


Ignore:
Timestamp:
Jan 26, 2021 5:10:09 PM (4 years ago)
Author:
vboxsync
Message:

Audio/HDA+AC97: Made the device emulation's internal [in|out]put FIFO buffer size configurable via extra data "VBoxInternal2/Audio/Device/BufSize[In|Out]Ms" (optional, defaults to 1000ms if not set) [build fix]. ticketoem2ref:36

Location:
trunk/src/VBox/Devices/Audio
Files:
3 edited

Legend:

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

    r87436 r87438  
    195195uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
    196196uint32_t DrvAudioHlpCalcBitrate(const PPDMAUDIOPCMPROPS pProps);
    197 uint32_t DrvAudioHlpBytesAlign(size_t cbSize, const PPDMAUDIOPCMPROPS pProps);
    198 bool     DrvAudioHlpBytesIsAligned(size_t cbSize, const PPDMAUDIOPCMPROPS pProps);
     197uint32_t DrvAudioHlpBytesAlign(uint32_t cbSize, const PPDMAUDIOPCMPROPS pProps);
     198bool     DrvAudioHlpBytesIsAligned(uint32_t cbSize, const PPDMAUDIOPCMPROPS pProps);
    199199uint32_t DrvAudioHlpBytesToFrames(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
    200200uint64_t DrvAudioHlpBytesToMilli(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r87436 r87438  
    11811181 * @param   pProps              PCM properties to align size to.
    11821182 */
    1183 uint32_t DrvAudioHlpBytesAlign(size_t cbSize, const PPDMAUDIOPCMPROPS pProps)
     1183uint32_t DrvAudioHlpBytesAlign(uint32_t cbSize, const PPDMAUDIOPCMPROPS pProps)
    11841184{
    11851185    AssertPtrReturn(pProps, 0);
     
    11981198 * @param   pProps              PCM properties to use for checking the alignment.
    11991199 */
    1200 bool DrvAudioHlpBytesIsAligned(size_t cbSize, const PPDMAUDIOPCMPROPS pProps)
     1200bool DrvAudioHlpBytesIsAligned(uint32_t cbSize, const PPDMAUDIOPCMPROPS pProps)
    12011201{
    12021202    AssertPtrReturn(pProps, 0);
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r87436 r87438  
    361361    }
    362362
    363     const size_t cbCircBufDefault = DrvAudioHlpMilliToBytes(RT_MS_1SEC, &pCfg->Props);
    364 
    365     size_t cbCircBuf = DrvAudioHlpMilliToBytes(  hdaGetDirFromSD(uSD) == PDMAUDIODIR_IN
    366                                                ? pThis->cbCircBufInMs : pThis->cbCircBufOutMs, &pCfg->Props);
     363    const uint32_t cbCircBufDefault = DrvAudioHlpMilliToBytes(RT_MS_1SEC, &pCfg->Props);
     364
     365    uint32_t cbCircBuf = DrvAudioHlpMilliToBytes(  hdaGetDirFromSD(uSD) == PDMAUDIODIR_IN
     366                                                 ? pThis->cbCircBufInMs : pThis->cbCircBufOutMs, &pCfg->Props);
    367367
    368368    ASSERT_GUEST_LOGREL_MSG_STMT(cbCircBuf,
     
    374374
    375375    if (cbCircBuf != cbCircBufDefault)
    376         LogRel2(("HDA: Stream #%RU8 is using a custom ring buffer size of %RU64ms (%zu bytes)\n",
     376        LogRel2(("HDA: Stream #%RU8 is using a custom ring buffer size of %RU64ms (%RU32 bytes)\n",
    377377                 uSD, DrvAudioHlpBytesToMilli(cbCircBuf, &pCfg->Props), cbCircBuf));
    378378
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