VirtualBox

Changeset 88390 in vbox


Ignore:
Timestamp:
Apr 7, 2021 10:35:06 AM (4 years ago)
Author:
vboxsync
Message:

Audio: Removed the pfnInit and pfnShutdown methods from PDMIHOSTAUDIO. These methods duplicates PDMDRVREG callbacks and were therefore superfluous. bugref:9890

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r88383 r88390  
    12131213{
    12141214    /**
    1215      * Initializes the host backend (driver) - optional and obsolete.
    1216      *
    1217      * @returns VBox status code.
    1218      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
    1219      * @deprecated Just stub this and do the real work in the driver constructor.
    1220      */
    1221     DECLR3CALLBACKMEMBER(int, pfnInit, (PPDMIHOSTAUDIO pInterface));
    1222 
    1223     /**
    1224      * Shuts down the host backend (driver) - optional and obsolete.
    1225      *
    1226      * @returns VBox status code.
    1227      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
    1228      * @deprecated Just stub this and do the real work in the driver power off callback.
    1229      */
    1230     DECLR3CALLBACKMEMBER(void, pfnShutdown, (PPDMIHOSTAUDIO pInterface));
    1231 
    1232     /**
    12331215     * Returns the host backend's configuration (backend).
    12341216     *
     
    13681350
    13691351/** PDMIHOSTAUDIO interface ID. */
    1370 #define PDMIHOSTAUDIO_IID                           "28ae3ee3-c328-4dd9-89c1-6e2b602f2d41"
     1352#define PDMIHOSTAUDIO_IID                           "cf04d235-2af6-4921-8323-a0f85c5cf96b"
    13711353
    13721354
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88381 r88390  
    20482048    PPDMIHOSTAUDIO pHostDrvAudio = pThis->pHostDrvAudio;
    20492049    AssertPtrReturn(pHostDrvAudio, VERR_INVALID_POINTER);
    2050     AssertPtrNullReturn(pHostDrvAudio->pfnInit, VERR_INVALID_POINTER);
    2051     AssertPtrNullReturn(pHostDrvAudio->pfnShutdown, VERR_INVALID_POINTER);
    20522050    AssertPtrReturn(pHostDrvAudio->pfnGetConfig, VERR_INVALID_POINTER);
    20532051    AssertPtrNullReturn(pHostDrvAudio->pfnGetDevices, VERR_INVALID_POINTER);
     
    20642062
    20652063    /*
    2066      * Call the init method.
    2067      */
    2068     /** @todo r=bird: This is superfluous.  This duplicates the driver
    2069      *        constructor code.  Just get rid of it!! */
    2070     AssertPtr(pThis->pHostDrvAudio);
    2071     int rc = VINF_SUCCESS;
    2072     if (pThis->pHostDrvAudio->pfnInit)
    2073         rc = pThis->pHostDrvAudio->pfnInit(pThis->pHostDrvAudio);
    2074     if (RT_FAILURE(rc))
    2075     {
    2076         LogRel(("Audio: Initialization of host driver '%s' failed with %Rrc\n", pThis->szName, rc));
    2077         return VERR_AUDIO_BACKEND_INIT_FAILED;
    2078     }
    2079 
    2080     /*
    20812064     * Get the backend configuration.
    20822065     */
    2083     rc = pThis->pHostDrvAudio->pfnGetConfig(pThis->pHostDrvAudio, &pThis->BackendCfg);
     2066    int rc = pThis->pHostDrvAudio->pfnGetConfig(pThis->pHostDrvAudio, &pThis->BackendCfg);
    20842067    if (RT_FAILURE(rc))
    20852068    {
     
    34573440            drvAudioStreamDestroyInternalBackend(pThis, pStreamEx);
    34583441        }
    3459 
    3460         /*
    3461          * Last call for the driver below us.
    3462          * Let it know that we reached end of life.
    3463          */
    3464         if (pThis->pHostDrvAudio->pfnShutdown)
    3465             pThis->pHostDrvAudio->pfnShutdown(pThis->pHostDrvAudio);
    34663442
    34673443        pThis->pHostDrvAudio = NULL;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp

    r88384 r88390  
    14451445    pDrvIns->IBase.pfnQueryInterface = drvHostAlsaAudioQueryInterface;
    14461446    /* IHostAudio */
    1447     pThis->IHostAudio.pfnInit               = NULL;
    1448     pThis->IHostAudio.pfnShutdown           = NULL;
    14491447    pThis->IHostAudio.pfnGetConfig          = drvHostAlsaAudioHA_GetConfig;
    14501448    pThis->IHostAudio.pfnGetStatus          = drvHostAlsaAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp

    r88389 r88390  
    25532553    pDrvIns->IBase.pfnQueryInterface = drvHostCoreAudioQueryInterface;
    25542554    /* IHostAudio */
    2555     pThis->IHostAudio.pfnInit               = NULL;
    2556     pThis->IHostAudio.pfnShutdown           = NULL;
    25572555    pThis->IHostAudio.pfnGetConfig          = drvHostCoreAudioHA_GetConfig;
    25582556    pThis->IHostAudio.pfnGetStatus          = drvHostCoreAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp

    r88382 r88390  
    26292629    pDrvIns->IBase.pfnQueryInterface = drvHostDSoundQueryInterface;
    26302630    /* IHostAudio */
    2631     pThis->IHostAudio.pfnInit               = NULL;
    2632     pThis->IHostAudio.pfnShutdown           = NULL;
    26332631    pThis->IHostAudio.pfnGetConfig          = drvHostDSoundHA_GetConfig;
    26342632    pThis->IHostAudio.pfnGetStatus          = drvHostDSoundHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp

    r88381 r88390  
    378378    pDrvIns->IBase.pfnQueryInterface = drvHostDebugAudioQueryInterface;
    379379    /* IHostAudio */
    380     pThis->IHostAudio.pfnInit               = NULL;
    381     pThis->IHostAudio.pfnShutdown           = NULL;
    382380    pThis->IHostAudio.pfnGetConfig          = drvHostDebugAudioHA_GetConfig;
    383381    pThis->IHostAudio.pfnGetStatus          = drvHostDebugAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp

    r88381 r88390  
    316316    pDrvIns->IBase.pfnQueryInterface = drvHostNullAudioQueryInterface;
    317317    /* IHostAudio */
    318     pThis->IHostAudio.pfnInit               = NULL;
    319     pThis->IHostAudio.pfnShutdown           = NULL;
    320318    pThis->IHostAudio.pfnGetConfig          = drvHostNullAudioHA_GetConfig;
    321319    pThis->IHostAudio.pfnGetStatus          = drvHostNullAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioOss.cpp

    r88385 r88390  
    710710    pDrvIns->IBase.pfnQueryInterface = drvHostOSSAudioQueryInterface;
    711711    /* IHostAudio */
    712     pThis->IHostAudio.pfnInit               = NULL;
    713     pThis->IHostAudio.pfnShutdown           = NULL;
    714712    pThis->IHostAudio.pfnGetConfig          = drvHostOssAudioHA_GetConfig;
    715713    pThis->IHostAudio.pfnGetStatus          = drvHostOssAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp

    r88386 r88390  
    15471547    pDrvIns->IBase.pfnQueryInterface = drvHostPulseAudioQueryInterface;
    15481548    /* IHostAudio */
    1549     pThis->IHostAudio.pfnInit               = NULL;
    1550     pThis->IHostAudio.pfnShutdown           = NULL;
    15511549    pThis->IHostAudio.pfnGetConfig          = drvHostPulseAudioHA_GetConfig;
    15521550    pThis->IHostAudio.pfnGetStatus          = drvHostPulseAudioHA_GetStatus;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r88381 r88390  
    384384    pDrvIns->IBase.pfnQueryInterface = drvHostValKitAudioQueryInterface;
    385385    /* IHostAudio */
    386     pThis->IHostAudio.pfnInit               = NULL;
    387     pThis->IHostAudio.pfnShutdown           = NULL;
    388386    pThis->IHostAudio.pfnGetConfig          = drvHostValKitAudioHA_GetConfig;
    389387    pThis->IHostAudio.pfnGetStatus          = drvHostValKitAudioHA_GetStatus;
  • trunk/src/VBox/Main/src-client/DrvAudioRec.cpp

    r88382 r88390  
    11371137    pDrvIns->IBase.pfnQueryInterface = drvAudioVideoRecQueryInterface;
    11381138    /* IHostAudio */
    1139     pThis->IHostAudio.pfnInit               = NULL;
    1140     pThis->IHostAudio.pfnShutdown           = NULL;
    11411139    pThis->IHostAudio.pfnGetConfig          = drvAudioVideoRecHA_GetConfig;
    11421140    pThis->IHostAudio.pfnGetStatus          = drvAudioVideoRecHA_GetStatus;
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r88382 r88390  
    715715    pDrvIns->IBase.pfnQueryInterface = drvAudioVrdeQueryInterface;
    716716    /* IHostAudio */
    717     pThis->IHostAudio.pfnInit              = NULL;
    718     pThis->IHostAudio.pfnShutdown          = NULL;
    719717    pThis->IHostAudio.pfnGetConfig         = drvAudioVrdeHA_GetConfig;
    720718    pThis->IHostAudio.pfnGetDevices        = NULL;
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