VirtualBox

Changeset 88053 in vbox


Ignore:
Timestamp:
Mar 9, 2021 2:15:43 PM (4 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/Devices/Audio
Files:
3 edited

Legend:

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

    r88047 r88053  
    21802180                    LogRel(("Audio: Device '%s':\n", pDev->szName));
    21812181                    LogRel(("Audio:   Usage           = %s\n",   PDMAudioDirGetName(pDev->enmUsage)));
    2182                     LogRel(("Audio:   Flags           = %s\n",   PDMAudioDeviceFlagsToString(szFlags, pDev->fFlags)));
     2182                    LogRel(("Audio:   Flags           = %s\n",   PDMAudioHostDevFlagsToString(szFlags, pDev->fFlags)));
    21832183                    LogRel(("Audio:   Input channels  = %RU8\n", pDev->cMaxInputChannels));
    21842184                    LogRel(("Audio:   Output channels = %RU8\n", pDev->cMaxOutputChannels));
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r88047 r88053  
    542542        {
    543543            if (pDev) /* Some (skipped) device to clean up first? */
    544                 PDMAudioDeviceFree(&pDev->Core);
    545 
    546             pDev = (PCOREAUDIODEVICEDATA)PDMAudioDeviceAlloc(sizeof(*pDev));
     544                PDMAudioHostDevFree(&pDev->Core);
     545
     546            pDev = (PCOREAUDIODEVICEDATA)PDMAudioHostDevAlloc(sizeof(*pDev));
    547547            if (!pDev)
    548548            {
     
    670670        if (RT_FAILURE(rc))
    671671        {
    672             PDMAudioDeviceFree(&pDev->Core);
     672            PDMAudioHostDevFree(&pDev->Core);
    673673            pDev = NULL;
    674674        }
     
    743743            RTListForEach(&devEnmIn.LstDevices, pDevSrcIn, COREAUDIODEVICEDATA, Core.Node)
    744744            {
    745                 PCOREAUDIODEVICEDATA pDevDst = (PCOREAUDIODEVICEDATA)PDMAudioDeviceAlloc(sizeof(*pDevDst));
     745                PCOREAUDIODEVICEDATA pDevDst = (PCOREAUDIODEVICEDATA)PDMAudioHostDevAlloc(sizeof(*pDevDst));
    746746                if (!pDevDst)
    747747                {
     
    786786                else
    787787                {
    788                     PDMAudioDeviceFree(&pDevDst->Core);
     788                    PDMAudioHostDevFree(&pDevDst->Core);
    789789                    pDevDst = NULL;
    790790                }
     
    803803                        continue; /* Already in our list, skip. */
    804804
    805                     PCOREAUDIODEVICEDATA pDevDst = (PCOREAUDIODEVICEDATA)PDMAudioDeviceAlloc(sizeof(*pDevDst));
     805                    PCOREAUDIODEVICEDATA pDevDst = (PCOREAUDIODEVICEDATA)PDMAudioHostDevAlloc(sizeof(*pDevDst));
    806806                    if (!pDevDst)
    807807                    {
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r88047 r88053  
    15861586
    15871587    int rc;
    1588     PDSOUNDDEV pDev = (PDSOUNDDEV)PDMAudioDeviceAlloc(sizeof(DSOUNDDEV));
     1588    PDSOUNDDEV pDev = (PDSOUNDDEV)PDMAudioHostDevAlloc(sizeof(DSOUNDDEV));
    15891589    if (pDev)
    15901590    {
     
    16121612            return TRUE;
    16131613        }
    1614         PDMAudioDeviceFree(&pDev->Core);
     1614        PDMAudioHostDevFree(&pDev->Core);
    16151615    }
    16161616    else
     
    16451645
    16461646    int rc;
    1647     PDSOUNDDEV pDev = (PDSOUNDDEV)PDMAudioDeviceAlloc(sizeof(DSOUNDDEV));
     1647    PDSOUNDDEV pDev = (PDSOUNDDEV)PDMAudioHostDevAlloc(sizeof(DSOUNDDEV));
    16481648    if (pDev)
    16491649    {
     
    16681668            return TRUE;
    16691669        }
    1670         PDMAudioDeviceFree(&pDev->Core);
     1670        PDMAudioHostDevFree(&pDev->Core);
    16711671    }
    16721672    else
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