VirtualBox

Changeset 88031 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Mar 9, 2021 12:13:46 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143160
Message:

Audio: Preparing for moving the enumeration helpers to PDM. Simplify allocation. bugref:9890

File:
1 edited

Legend:

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

    r88026 r88031  
    354354typedef struct PDMAUDIODEVICE
    355355{
    356     /** List node. */
     356    /** List entry (like PDMAUDIODEVICEENUM::LstDevices). */
    357357    RTLISTNODE          Node;
    358     /** Additional data which might be relevant for the current context.
    359      * @todo r=bird: I would do this C++ style, having the host specific bits
    360      *       appended after this structure and downcast. */
     358    /** Additional data which might be relevant for the current context (follows
     359     * immediately after the end of this structure). */
    361360    void               *pvData;
    362361    /** Size of the additional data. */
     
    374373    /** Maximum number of output audio channels the device supports. */
    375374    uint8_t             cMaxOutputChannels;
     375    uint8_t             bAlignment[1];
    376376    /** Device type union, based on enmType. */
    377377    union
     
    380380        struct
    381381        {
    382             /** Vendor ID.
    383              * @todo r=bird: Why signed?? VUSB uses uint16_t for idVendor and idProduct!  */
    384             int16_t     VID;
     382            /** Vendor ID. */
     383            uint16_t    idVendor;
    385384            /** Product ID. */
    386             int16_t     PID;
     385            uint16_t    idProduct;
    387386        } USB;
     387        uint64_t        uPadding[2];
    388388    } Type;
    389389    /** Friendly name of the device, if any. */
    390390    char                szName[64];
    391391} PDMAUDIODEVICE;
     392AssertCompileSizeAlignment(PDMAUDIODEVICE, 32);
    392393/** Pointer to audio device info (enum result). */
    393394typedef PDMAUDIODEVICE *PPDMAUDIODEVICE;
     395/** Pointer to a const audio device info (enum result). */
     396typedef PDMAUDIODEVICE const *PCPDMAUDIODEVICE;
    394397
    395398/**
    396399 * An audio device enumeration result.
     400 *
    397401 * @sa PDMIHOSTAUDIO::pfnGetDevices
    398402 */
    399403typedef struct PDMAUDIODEVICEENUM
    400404{
     405    /** List of audio devices (PDMAUDIODEVICE). */
     406    RTLISTANCHOR    LstDevices;
    401407    /** Number of audio devices in the list. */
    402     uint16_t        cDevices;
    403     /** List of audio devices. */
    404     RTLISTANCHOR    lstDevices;
     408    uint32_t        cDevices;
    405409} PDMAUDIODEVICEENUM;
    406410/** Pointer to an audio device enumeration result. */
    407411typedef PDMAUDIODEVICEENUM *PPDMAUDIODEVICEENUM;
     412/** Pointer to a const audio device enumeration result. */
     413typedef PDMAUDIODEVICEENUM const *PCPDMAUDIODEVICEENUM;
    408414
    409415/**
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette