VirtualBox

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


Ignore:
Timestamp:
May 14, 2019 2:28:16 PM (6 years ago)
Author:
vboxsync
Message:

Audio: Try to fix a hang w/ VRDE audio driver enabled.

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

Legend:

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

    r77603 r78506  
    779779
    780780        default:
    781             rc = VERR_NOT_IMPLEMENTED;
     781            AssertFailedStmt(rc = VERR_NOT_IMPLEMENTED);
    782782            break;
    783783    }
    784784
    785 #ifdef LOG_ENABLED
    786785    char *pszStatus = dbgAudioMixerSinkStatusToStr(pSink->fStatus);
    787     LogFlowFunc(("[%s] enmCmd=%d, fStatus=%s, rc=%Rrc\n", pSink->pszName, enmSinkCmd, pszStatus, rc));
     786    LogRel2(("Mixer: Set new status of sink '%s' to %s\n", pSink->pszName, pszStatus));
     787    LogFlowFunc(("[%s] enmCmd=%RU32, fStatus=%s, rc=%Rrc\n", pSink->pszName, enmSinkCmd, pszStatus, rc));
    788788    RTStrFree(pszStatus);
    789 #endif
    790789
    791790    int rc2 = RTCritSectLeave(&pSink->CritSect);
     
    20122011              ("%s: Can't write to a sink which is not an output sink\n", pSink->pszName));
    20132012
    2014     Assert(cbBuf <= AudioMixBufFreeBytes(&pSink->MixBuf));
    2015 
    20162013    uint32_t cbWritten = 0;
    2017     uint32_t cbToWrite = cbBuf;
     2014    uint32_t cbToWrite = RT_MIN(AudioMixBufFreeBytes(&pSink->MixBuf), cbBuf);
    20182015    while (cbToWrite)
    20192016    {
     
    20322029    }
    20332030
    2034     Assert(cbWritten == cbBuf);
     2031    Log3Func(("[%s] cbBuf=%RU32 -> cbWritten=%RU32\n", pSink->pszName, cbBuf, cbWritten));
    20352032
    20362033    /* Update the sink's last written time stamp. */
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r77664 r78506  
    12151215        RTCircBufReleaseReadBlock(pCircBuf, cbWritten);
    12161216
    1217         if (RT_FAILURE(rc))
     1217        if (   !cbWritten /* Nothing written? */
     1218            || RT_FAILURE(rc))
    12181219            break;
    12191220
     
    15501551            {
    15511552                /* Read (guest output) data and write it to the stream's sink. */
    1552                 rc2 = ichac97R3StreamRead(pThis, pStream, pSink, cbToReadFromStream, NULL);
     1553                rc2 = ichac97R3StreamRead(pThis, pStream, pSink, cbToReadFromStream, NULL /* pcbRead */);
    15531554                AssertRC(rc2);
    15541555            }
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r76672 r78506  
    873873        RTCircBufReleaseReadBlock(pCircBuf, cbWritten);
    874874
    875         if (RT_FAILURE(rc))
     875        if (   !cbWritten /* Nothing written? */
     876            || RT_FAILURE(rc))
    876877            break;
    877878
     
    14831484            {
    14841485                /* Read (guest output) data and write it to the stream's sink. */
    1485                 rc2 = hdaR3StreamRead(pStream, cbToReadFromStream, NULL);
     1486                rc2 = hdaR3StreamRead(pStream, cbToReadFromStream, NULL /* pcbRead */);
    14861487                AssertRC(rc2);
    14871488            }
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