VirtualBox

Changeset 88055 in vbox


Ignore:
Timestamp:
Mar 9, 2021 2:39:16 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143186
Message:

Audio: Moved the host audio device enumeration code to PDM (VBox/vmm/pdmaudiohostenuminline.h). bugref:9890

Location:
trunk
Files:
5 edited

Legend:

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

    r88054 r88055  
    7373        pDev->uMagic = PDMAUDIOHOSTDEV_MAGIC;
    7474        pDev->cbSelf = (uint32_t)cb;
    75         RTListInit(&pDev->Node);
     75        RTListInit(&pDev->ListEntry);
    7676
    7777        //pDev->cMaxInputChannels  = 0;
     
    119119    {
    120120        memcpy(pDevDup, pDev, cbToDup);
    121         RTListInit(&pDevDup->Node);
     121        RTListInit(&pDevDup->ListEntry);
    122122        pDev->cbSelf = cbToDup;
    123123    }
     
    156156
    157157        PPDMAUDIOHOSTDEV pDev, pDevNext;
    158         RTListForEachSafe(&pDevEnm->LstDevices, pDev, pDevNext, PDMAUDIOHOSTDEV, Node)
    159         {
    160             RTListNodeRemove(&pDev->Node);
     158        RTListForEachSafe(&pDevEnm->LstDevices, pDev, pDevNext, PDMAUDIOHOSTDEV, ListEntry)
     159        {
     160            RTListNodeRemove(&pDev->ListEntry);
    161161
    162162            PDMAudioHostDevFree(pDev);
     
    185185    Assert(pDevEnm->uMagic == PDMAUDIOHOSTENUM_MAGIC);
    186186
    187     RTListAppend(&pDevEnm->LstDevices, &pDev->Node);
     187    RTListAppend(&pDevEnm->LstDevices, &pDev->ListEntry);
    188188    pDevEnm->cDevices++;
    189189}
     
    211211
    212212    PPDMAUDIOHOSTDEV pSrcDev;
    213     RTListForEach(&pSrcDevEnm->LstDevices, pSrcDev, PDMAUDIOHOSTDEV, Node)
     213    RTListForEach(&pSrcDevEnm->LstDevices, pSrcDev, PDMAUDIOHOSTDEV, ListEntry)
    214214    {
    215215        if (   enmUsage == pSrcDev->enmUsage
     
    244244
    245245    PPDMAUDIOHOSTDEV pDev;
    246     RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, Node)
     246    RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, ListEntry)
    247247    {
    248248        if (pDev->fFlags & PDMAUDIOHOSTDEV_F_DEFAULT)
     
    275275    uint32_t        cDevs = 0;
    276276    PPDMAUDIOHOSTDEV pDev;
    277     RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, Node)
     277    RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, ListEntry)
    278278    {
    279279        if (enmUsage == pDev->enmUsage)
     
    335335DECLINLINE(void) PDMAudioHostEnumLog(PCPDMAUDIOHOSTENUM pDevEnm, const char *pszDesc)
    336336{
     337#ifdef LOG_ENABLED
    337338    AssertPtrReturnVoid(pDevEnm);
    338339    AssertPtrReturnVoid(pszDesc);
     
    344345
    345346        PPDMAUDIOHOSTDEV pDev;
    346         RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, Node)
     347        RTListForEach(&pDevEnm->LstDevices, pDev, PDMAUDIOHOSTDEV, ListEntry)
    347348        {
    348349            char szFlags[PDMAUDIOHOSTDEV_MAX_FLAGS_STRING_LEN];
     
    355356        }
    356357    }
     358#else
     359    RT_NOREF(pDevEnm, pszDesc);
     360#endif
    357361}
    358362
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r88045 r88055  
    360360{
    361361    /** List entry (like PDMAUDIOHOSTENUM::LstDevices). */
    362     RTLISTNODE          Node;
     362    RTLISTNODE          ListEntry;
    363363    /** Magic value (PDMAUDIOHOSTDEV_MAGIC). */
    364364    uint32_t            uMagic;
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88053 r88055  
    21732173
    21742174            PPDMAUDIOHOSTDEV pDev;
    2175             RTListForEach(&DevEnum.LstDevices, pDev, PDMAUDIOHOSTDEV, Node)
     2175            RTListForEach(&DevEnum.LstDevices, pDev, PDMAUDIOHOSTDEV, ListEntry)
    21762176            {
    21772177                if (fLog)
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r88053 r88055  
    704704{
    705705    PCOREAUDIODEVICEDATA pDevSrc;
    706     RTListForEach(&pEnmSrc->LstDevices, pDevSrc, COREAUDIODEVICEDATA, Core.Node)
     706    RTListForEach(&pEnmSrc->LstDevices, pDevSrc, COREAUDIODEVICEDATA, Core.ListEntry)
    707707    {
    708708        if (pDevSrc->deviceID == deviceID)
     
    741741            PDMAudioHostEnumInit(pEnmDst);
    742742            PCOREAUDIODEVICEDATA pDevSrcIn;
    743             RTListForEach(&devEnmIn.LstDevices, pDevSrcIn, COREAUDIODEVICEDATA, Core.Node)
     743            RTListForEach(&devEnmIn.LstDevices, pDevSrcIn, COREAUDIODEVICEDATA, Core.ListEntry)
    744744            {
    745745                PCOREAUDIODEVICEDATA pDevDst = (PCOREAUDIODEVICEDATA)PDMAudioHostDevAlloc(sizeof(*pDevDst));
     
    769769                 */
    770770                PCOREAUDIODEVICEDATA pDevSrcOut;
    771                 RTListForEach(&devEnmOut.LstDevices, pDevSrcOut, COREAUDIODEVICEDATA, Core.Node)
     771                RTListForEach(&devEnmOut.LstDevices, pDevSrcOut, COREAUDIODEVICEDATA, Core.ListEntry)
    772772                {
    773773                    if (pDevSrcIn->deviceID == pDevSrcOut->deviceID)
     
    798798                 */
    799799                PCOREAUDIODEVICEDATA pDevSrcOut;
    800                 RTListForEach(&devEnmOut.LstDevices, pDevSrcOut, COREAUDIODEVICEDATA, Core.Node)
     800                RTListForEach(&devEnmOut.LstDevices, pDevSrcOut, COREAUDIODEVICEDATA, Core.ListEntry)
    801801                {
    802802                    if (coreAudioDevicesHasDevice(pEnmDst, pDevSrcOut->deviceID))
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r88053 r88055  
    18351835         */
    18361836        PDSOUNDDEV pDev;
    1837         RTListForEach(&pDevEnm->LstDevices, pDev, DSOUNDDEV, Core.Node)
     1837        RTListForEach(&pDevEnm->LstDevices, pDev, DSOUNDDEV, Core.ListEntry)
    18381838        {
    18391839            dsoundDeviceQueryInfo(pThis, pDev); /* ignore 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