VirtualBox

Changeset 61568 in vbox


Ignore:
Timestamp:
Jun 8, 2016 9:55:02 AM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio.cpp: Be more gentle for host backend failures.

File:
1 edited

Legend:

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

    r61563 r61568  
    957957#endif
    958958
    959 static int drvAudioHostInit(PCFGMNODE pCfgHandle, PDRVAUDIO pThis)
     959/**
     960 * Initializes the host backend and queries its initial configuration.
     961 * If the host backend fails, VERR_AUDIO_BACKEND_INIT_FAILED will be returned.
     962 *
     963 * Note: As this routine is called when attaching to the device LUN in the
     964 *       device emulation, we either check for success or VERR_AUDIO_BACKEND_INIT_FAILED.
     965 *       Everything else is considered as fatal and must be handled separately in
     966 *       the device emulation!
     967 *
     968 * @return  IPRT status code.
     969 * @param   pThis               Driver instance to be called.
     970 * @param   pCfgHandle          CFGM configuration handle to use for this driver.
     971 */
     972static int drvAudioHostInit(PDRVAUDIO pThis, PCFGMNODE pCfgHandle)
    960973{
    961974    /* pCfgHandle is optional. */
     975    NOREF(pCfgHandle);
    962976    AssertPtrReturn(pThis, VERR_INVALID_POINTER);
    963 
    964     NOREF(pCfgHandle);
    965977
    966978    LogFlowFuncEnter();
     
    970982    if (RT_FAILURE(rc))
    971983    {
    972         LogFlowFunc(("Initialization of lower driver failed with rc=%Rrc\n", rc));
    973         return rc;
     984        LogRel(("Audio: Initialization of host backend failed with %Rrc\n", rc));
     985        return VERR_AUDIO_BACKEND_INIT_FAILED;
    974986    }
    975987
     
    978990    if (RT_FAILURE(rc))
    979991    {
    980         LogFlowFunc(("Getting backend configuration failed with rc=%Rrc\n", rc));
    981         return rc;
     992        LogRel(("Audio: Getting host backend configuration failed with %Rrc\n", rc));
     993        return VERR_AUDIO_BACKEND_INIT_FAILED;
    982994    }
    983995
     
    10401052     */
    10411053    if (RT_SUCCESS(rc))
    1042         rc = drvAudioHostInit(pCfgHandle, pThis);
     1054        rc = drvAudioHostInit(pThis, pCfgHandle);
    10431055
    10441056    LogFlowFuncLeaveRC(rc);
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