VirtualBox

Changeset 63623 in vbox


Ignore:
Timestamp:
Aug 24, 2016 8:31:28 AM (8 years ago)
Author:
vboxsync
Message:

Audio/AudioMixer.cpp: Do not return an error in AudioMixerSinkRead() if getting input data from a specific stream failed, extended logging.

File:
1 edited

Legend:

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

    r63616 r63623  
    761761#endif
    762762
    763     Log3Func(("[%s]: cbReadable=%RU32\n", pSink->pszName, cbReadable));
     763    Log3Func(("[%s] cbReadable=%RU32\n", pSink->pszName, cbReadable));
    764764
    765765    int rc2 = RTCritSectLeave(&pSink->CritSect);
     
    794794#endif
    795795
    796     Log3Func(("[%s]: cbWritable=%RU32\n", pSink->pszName, cbWritable));
     796    Log3Func(("[%s] cbWritable=%RU32\n", pSink->pszName, cbWritable));
    797797
    798798    int rc2 = RTCritSectLeave(&pSink->CritSect);
     
    957957        if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTRMSTS_FLAG_ENABLED))
    958958        {
    959             LogFlowFunc(("%s: Stream '%s' Disabled, skipping ...\n", pMixStream->pszName, pMixStream->pStream->szName));
     959            Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName));
    960960            continue;
    961961        }
     
    963963        uint32_t cbTotalRead = 0;
    964964        uint32_t cbToRead    = cbBuf;
     965
     966        int rc2 = VINF_SUCCESS;
    965967
    966968        while (cbToRead)
     
    968970            uint32_t cbReadStrm;
    969971            AssertPtr(pMixStream->pConn);
    970 #ifndef VBOX_AUDIO_MIXER_WITH_MIXBUF
    971             rc = pMixStream->pConn->pfnStreamRead(pMixStream->pConn, pMixStream->pStream,
    972                                                   (uint8_t *)pvMixBuf + cbTotalRead, cbToRead, &cbReadStrm);
     972#ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF
     973# error "Implement me!"
     974#else
     975            rc2 = pMixStream->pConn->pfnStreamRead(pMixStream->pConn, pMixStream->pStream,
     976                                                   (uint8_t *)pvMixBuf + cbTotalRead, cbToRead, &cbReadStrm);
    973977#endif
    974             if (   RT_FAILURE(rc)
     978            if (RT_FAILURE(rc2))
     979                Log3Func(("[%s] Failed reading from stream '%s': %Rrc\n", pSink->pszName, pMixStream->pszName, rc2));
     980
     981            if (   RT_FAILURE(rc2)
    975982                || !cbReadStrm)
    976983                break;
     
    983990        }
    984991
    985         if (RT_FAILURE(rc))
     992        if (RT_FAILURE(rc2))
    986993            continue;
    987994
     
    9971004            pSink->fStatus &= ~AUDMIXSINK_STS_DIRTY;
    9981005
    999 #ifndef VBOX_AUDIO_MIXER_WITH_MIXBUF
     1006#ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF
     1007# error "Implement me!"
     1008#else
    10001009        if (cbRead)
    10011010            memcpy(pvBuf, pvMixBuf, cbRead);
     
    10091018#endif
    10101019
    1011     Log3Func(("[%s]: cbRead=%RU32, fStatus=0x%x, rc=%Rrc\n", pSink->pszName, cbRead, pSink->fStatus, rc));
     1020    Log3Func(("[%s] cbRead=%RU32, fStatus=0x%x, rc=%Rrc\n", pSink->pszName, cbRead, pSink->fStatus, rc));
    10121021
    10131022    int rc2 = RTCritSectLeave(&pSink->CritSect);
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