VirtualBox

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


Ignore:
Timestamp:
Mar 9, 2021 1:27:51 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143176
Message:

Audio: More prep work to move the audio device enumeration code to PDM. bugref:9890

File:
1 edited

Legend:

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

    r88044 r88045  
    310310typedef uint32_t PDMAUDIODEVLATSPECSEC;
    311311
    312 /** @name PDMAUDIODEV_FLAGS_XXX
     312/** @name PDMAUDIOHOSTDEV_F_XXX
    313313 * @{  */
    314314/** No flags set. */
    315 #define PDMAUDIODEV_FLAGS_NONE              UINT32_C(0)
     315#define PDMAUDIOHOSTDEV_F_NONE              UINT32_C(0)
    316316/** The device marks the default device within the host OS. */
    317 #define PDMAUDIODEV_FLAGS_DEFAULT           RT_BIT_32(0)
     317#define PDMAUDIOHOSTDEV_F_DEFAULT           RT_BIT_32(0)
    318318/** The device can be removed at any time and we have to deal with it. */
    319 #define PDMAUDIODEV_FLAGS_HOTPLUG           RT_BIT_32(1)
     319#define PDMAUDIOHOSTDEV_F_HOTPLUG           RT_BIT_32(1)
    320320/** The device is known to be buggy and needs special treatment. */
    321 #define PDMAUDIODEV_FLAGS_BUGGY             RT_BIT_32(2)
     321#define PDMAUDIOHOSTDEV_F_BUGGY             RT_BIT_32(2)
    322322/** Ignore the device, no matter what. */
    323 #define PDMAUDIODEV_FLAGS_IGNORE            RT_BIT_32(3)
     323#define PDMAUDIOHOSTDEV_F_IGNORE            RT_BIT_32(3)
    324324/** The device is present but marked as locked by some other application. */
    325 #define PDMAUDIODEV_FLAGS_LOCKED            RT_BIT_32(4)
     325#define PDMAUDIOHOSTDEV_F_LOCKED            RT_BIT_32(4)
    326326/** The device is present but not in an alive state (dead). */
    327 #define PDMAUDIODEV_FLAGS_DEAD              RT_BIT_32(5)
     327#define PDMAUDIOHOSTDEV_F_DEAD              RT_BIT_32(5)
    328328/** Set if the extra backend specific data cannot be duplicated. */
    329 #define PDMAUDIODEV_FLAGS_NO_DUP            RT_BIT_32(31)
     329#define PDMAUDIOHOSTDEV_F_NO_DUP            RT_BIT_32(31)
    330330/** @} */
    331331
     
    346346    /** The device is an (external) USB device. */
    347347    PDMAUDIODEVICETYPE_USB,
     348    /** End of valid values. */
     349    PDMAUDIODEVICETYPE_END,
    348350    /** Hack to blow the type up to 32-bit. */
    349351    PDMAUDIODEVICETYPE_32BIT_HACK = 0x7fffffff
     
    351353
    352354/**
    353  * Audio device info (enumeration result).
     355 * Host audio device info, part of enumeration result.
     356 *
    354357 * @sa PDMAUDIOHOSTENUM, PDMIHOSTAUDIO::pfnGetDevices
    355358 */
    356 typedef struct PDMAUDIODEVICE
     359typedef struct PDMAUDIOHOSTDEV
    357360{
    358361    /** List entry (like PDMAUDIOHOSTENUM::LstDevices). */
    359362    RTLISTNODE          Node;
    360     /** Magic value (PDMAUDIODEVICE_MAGIC). */
     363    /** Magic value (PDMAUDIOHOSTDEV_MAGIC). */
    361364    uint32_t            uMagic;
    362365    /** Size of this structure and whatever backend specific data that follows it. */
     
    366369    /** Usage of the device. */
    367370    PDMAUDIODIR         enmUsage;
    368     /** Device flags, PDMAUDIODEV_FLAGS_XXX. */
     371    /** Device flags, PDMAUDIOHOSTDEV_F_XXX. */
    369372    uint32_t            fFlags;
    370373    /** Reference count indicating how many audio streams currently are relying on this device. */
     
    388391        uint64_t        uPadding[ARCH_BITS >= 64 ? 3 : 4];
    389392    } Type;
    390     /** Friendly name of the device, if any. */
     393    /** Friendly name of the device, if any. Could be truncated. */
    391394    char                szName[64];
    392 } PDMAUDIODEVICE;
    393 AssertCompileSizeAlignment(PDMAUDIODEVICE, 32);
     395} PDMAUDIOHOSTDEV;
     396AssertCompileSizeAlignment(PDMAUDIOHOSTDEV, 16);
    394397/** Pointer to audio device info (enum result). */
    395 typedef PDMAUDIODEVICE *PPDMAUDIODEVICE;
     398typedef PDMAUDIOHOSTDEV *PPDMAUDIOHOSTDEV;
    396399/** Pointer to a const audio device info (enum result). */
    397 typedef PDMAUDIODEVICE const *PCPDMAUDIODEVICE;
    398 
    399 /** Magic value for PDMAUDIODEVICE. (Armando Anthony "Chick" Corea) */
    400 #define PDMAUDIODEVICE_MAGIC        UINT32_C(0x19410612)
    401 /** Magic value for PDMAUDIODEVICE after free. */
    402 #define PDMAUDIODEVICE_MAGIC_DEAD   UINT32_C(0x20210209)
     400typedef PDMAUDIOHOSTDEV const *PCPDMAUDIOHOSTDEV;
     401
     402/** Magic value for PDMAUDIOHOSTDEV. (Armando Anthony "Chick" Corea) */
     403#define PDMAUDIOHOSTDEV_MAGIC           UINT32_C(0x19410612)
     404/** Magic value for PDMAUDIOHOSTDEV after free. */
     405#define PDMAUDIOHOSTDEV_MAGIC_DEAD      UINT32_C(0x20210209)
    403406
    404407
     
    414417    /** Number of audio devices in the list. */
    415418    uint32_t        cDevices;
    416     /** List of audio devices (PDMAUDIODEVICE). */
     419    /** List of audio devices (PDMAUDIOHOSTDEV). */
    417420    RTLISTANCHOR    LstDevices;
    418421} PDMAUDIOHOSTENUM;
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