VirtualBox

Changeset 56649 in vbox


Ignore:
Timestamp:
Jun 26, 2015 6:55:41 AM (9 years ago)
Author:
vboxsync
Message:

RT_MIN is a macro

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

Legend:

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

    r56648 r56649  
    824824     */
    825825    Assert(cAvail);
    826     size_t cbToRead = RT_MIN(AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cAvail),
    827                              AudioMixBufFreeBytes(&pHstStrmIn->MixBuf));
     826    size_t cbMixFree = AudioMixBufFreeBytes(&pHstStrmIn->MixBuf);
     827    size_t cbToRead = RT_MIN((size_t)AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cAvail), cbMixFree);
    828828
    829829    LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail));
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r56648 r56649  
    15071507    do
    15081508    {
    1509         size_t cbBuf = RT_MIN(AudioMixBufSizeBytes(&pHstStrmOut->MixBuf), pStreamOut->cbPCMBuf);
     1509        size_t cbMixBuf = AudioMixBufSizeBytes(&pHstStrmOut->MixBuf);
     1510        size_t cbBuf    = RT_MIN(cbMixBuf, pStreamOut->cbPCMBuf);
    15101511        size_t cbToRead = RT_MIN(cbBuf, RTCircBufFree(pStreamOut->pBuf));
    15111512        LogFlowFunc(("cbToRead=%zu\n", cbToRead));
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