VirtualBox

Changeset 88384 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Apr 7, 2021 9:22:20 AM (4 years ago)
Author:
vboxsync
Message:

DrvHostAudioAlsa: Moved the drvHostAlsaAudioHA_Init code into the constructor and removed the shutdown stub. bugref:9890

File:
1 edited

Legend:

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

    r88380 r88384  
    566566
    567567    return VINF_SUCCESS;
    568 }
    569 
    570 /**
    571  * @interface_method_impl{PDMIHOSTAUDIO,pfnInit}
    572  */
    573 static DECLCALLBACK(int) drvHostAlsaAudioHA_Init(PPDMIHOSTAUDIO pInterface)
    574 {
    575     RT_NOREF(pInterface);
    576 
    577     LogFlowFuncEnter();
    578 
    579     int rc = audioLoadAlsaLib();
    580     if (RT_FAILURE(rc))
    581         LogRel(("ALSA: Failed to load the ALSA shared library, rc=%Rrc\n", rc));
    582     else
    583     {
    584 #ifdef DEBUG
    585         snd_lib_error_set_handler(alsaDbgErrorHandler);
    586 #endif
    587     }
    588 
    589     return rc;
    590568}
    591569
     
    12501228
    12511229/**
    1252  * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}
    1253  */
    1254 static DECLCALLBACK(void) drvHostAlsaAudioHA_Shutdown(PPDMIHOSTAUDIO pInterface)
    1255 {
    1256     RT_NOREF(pInterface);
    1257 }
    1258 
    1259 
    1260 /**
    12611230 * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
    12621231 */
     
    14761445    pDrvIns->IBase.pfnQueryInterface = drvHostAlsaAudioQueryInterface;
    14771446    /* IHostAudio */
    1478     pThis->IHostAudio.pfnInit               = drvHostAlsaAudioHA_Init;
    1479     pThis->IHostAudio.pfnShutdown           = drvHostAlsaAudioHA_Shutdown;
     1447    pThis->IHostAudio.pfnInit               = NULL;
     1448    pThis->IHostAudio.pfnShutdown           = NULL;
    14801449    pThis->IHostAudio.pfnGetConfig          = drvHostAlsaAudioHA_GetConfig;
    14811450    pThis->IHostAudio.pfnGetStatus          = drvHostAlsaAudioHA_GetStatus;
     
    15011470    AssertRCReturn(rc, rc);
    15021471
     1472    /*
     1473     * Init the alsa library.
     1474     */
     1475    rc = audioLoadAlsaLib();
     1476    if (RT_FAILURE(rc))
     1477    {
     1478        LogRel(("ALSA: Failed to load the ALSA shared library: %Rrc\n", rc));
     1479        return rc;
     1480    }
     1481#ifdef DEBUG
     1482    snd_lib_error_set_handler(alsaDbgErrorHandler);
     1483#endif
    15031484    return VINF_SUCCESS;
    15041485}
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