VirtualBox

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


Ignore:
Timestamp:
Mar 9, 2021 1:31:33 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143162
Message:

Audio: Converted the core audio code to extending PDMAUDIODEVICE rather than the pvData scheme. Eliminated PDMAUDIODEVICE::pvData and added a magic. Untested. bugref:9890

File:
1 edited

Legend:

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

    r88032 r88033  
    356356    /** List entry (like PDMAUDIODEVICEENUM::LstDevices). */
    357357    RTLISTNODE          Node;
    358     /** Additional data which might be relevant for the current context (follows
    359      * immediately after the end of this structure). */
    360     void               *pvData;
     358    /** Magic value (PDMAUDIODEVICE_MAGIC). */
     359    uint32_t            uMagic;
    361360    /** Size of the additional data. */
    362     size_t              cbData;
     361    uint32_t            cbData;
    363362    /** The device type. */
    364363    PDMAUDIODEVICETYPE  enmType;
     
    385384            uint16_t    idProduct;
    386385        } USB;
    387         uint64_t        uPadding[2];
     386        uint64_t        uPadding[ARCH_BITS >= 64 ? 3 : 4];
    388387    } Type;
    389388    /** Friendly name of the device, if any. */
    390389    char                szName[64];
    391390} PDMAUDIODEVICE;
    392 AssertCompileSizeAlignment(PDMAUDIODEVICE, ARCH_BITS >= 64 ? 32 : 16);
     391AssertCompileSizeAlignment(PDMAUDIODEVICE, 32);
    393392/** Pointer to audio device info (enum result). */
    394393typedef PDMAUDIODEVICE *PPDMAUDIODEVICE;
    395394/** Pointer to a const audio device info (enum result). */
    396395typedef PDMAUDIODEVICE const *PCPDMAUDIODEVICE;
     396
     397/** Magic value for PDMAUDIODEVICE. (Armando Anthony "Chick" Corea) */
     398#define PDMAUDIODEVICE_MAGIC        UINT32_C(0x19410612)
     399/** Magic value for PDMAUDIODEVICE after free. */
     400#define PDMAUDIODEVICE_MAGIC_DEAD   UINT32_C(0x20210209)
     401
    397402
    398403/**
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