VirtualBox

Changeset 89190 in vbox


Ignore:
Timestamp:
May 19, 2021 9:49:59 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144531
Message:

AudioMixer: Don't get stuck if AudioMixerSinkRead returns zero bytes and AudioMixerSinkGetReadable didn't. AudioMixerSinkGetReadable should check the stream status like AudioMixerSinkRead does. bugref:9890

File:
1 edited

Legend:

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

    r89187 r89190  
    10661066#else
    10671067        PAUDMIXSTREAM pStreamRecSource = pSink->In.pStreamRecSource;
    1068         if (!pStreamRecSource)
    1069         {
    1070             Log3Func(("[%s] No recording source specified, skipping ...\n", pSink->pszName));
    1071         }
    1072         else
     1068        if (   pStreamRecSource
     1069            && (pStreamRecSource->fStatus & AUDMIXSTREAM_STATUS_CAN_READ))
    10731070        {
    10741071            AssertPtr(pStreamRecSource->pConn);
    10751072            cbReadable = pStreamRecSource->pConn->pfnStreamGetReadable(pStreamRecSource->pConn, pStreamRecSource->pStream);
    10761073        }
     1074        else if (!pStreamRecSource)
     1075            Log3Func(("[%s] No recording source specified, skipping ...\n", pSink->pszName));
     1076        else
     1077            Log3Func(("[%s] The recording source is not readable!\n", pSink->pszName));
    10771078#endif
    10781079    }
     
    24222423        int rc = AudioMixerSinkRead(pSink, abBuf, RT_MIN(cbToTransfer, sizeof(abBuf)), &cbRead);
    24232424        AssertRCBreak(rc);
    2424         AssertMsg(cbRead > 0, ("Nothing read from sink, even if %#RX32 bytes were (still) announced\n", cbToTransfer));
     2425        AssertMsgBreak(cbRead > 0, ("Nothing read from sink, even if %#RX32 bytes were (still) announced\n", cbToTransfer));
    24252426
    24262427        /* Write it to the internal DMA buffer. */
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