Changeset 89232 in vbox for trunk/include
- Timestamp:
- May 23, 2021 1:02:56 PM (4 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudiohostenuminline.h
r89229 r89232 94 94 pDev->cbSelf = 0; 95 95 96 if (pDev->fFlags & PDMAUDIOHOSTDEV_F_ID_ALLOC) 97 { 98 RTStrFree(pDev->pszId); 99 pDev->pszId = NULL; 100 } 101 96 102 RTMemFree(pDev); 97 103 } … … 120 126 RTListInit(&pDevDup->ListEntry); 121 127 pDevDup->cbSelf = cbToDup; 128 if (pDev->pszId) 129 { 130 pDevDup->fFlags |= PDMAUDIOHOSTDEV_F_ID_ALLOC; 131 pDevDup->pszId = RTStrDup(pDev->pszId); 132 AssertReturnStmt(pDevDup->pszId, RTMemFree(pDevDup), NULL); 133 } 122 134 } 123 135 … … 322 334 /** The max string length for all PDMAUDIOHOSTDEV_F_XXX. 323 335 * @sa PDMAudioHostDevFlagsToString */ 324 #define PDMAUDIOHOSTDEV_MAX_FLAGS_STRING_LEN sizeof("DEFAULT_OUT DEFAULT_IN HOTPLUG BUGGY IGNORE LOCKED DEADNO_DUP ")336 #define PDMAUDIOHOSTDEV_MAX_FLAGS_STRING_LEN sizeof("DEFAULT_OUT DEFAULT_IN HOTPLUG BUGGY IGNORE LOCKED DEAD ID_ALLOC NO_DUP ") 325 337 326 338 /** … … 339 351 { RT_STR_TUPLE("DEFAULT_OUT "), PDMAUDIOHOSTDEV_F_DEFAULT_OUT }, 340 352 { RT_STR_TUPLE("DEFAULT_IN "), PDMAUDIOHOSTDEV_F_DEFAULT_IN }, 341 { RT_STR_TUPLE("HOTPLUG "), PDMAUDIOHOSTDEV_F_HOTPLUG }, 342 { RT_STR_TUPLE("BUGGY "), PDMAUDIOHOSTDEV_F_BUGGY }, 343 { RT_STR_TUPLE("IGNORE "), PDMAUDIOHOSTDEV_F_IGNORE }, 344 { RT_STR_TUPLE("LOCKED "), PDMAUDIOHOSTDEV_F_LOCKED }, 345 { RT_STR_TUPLE("DEAD "), PDMAUDIOHOSTDEV_F_DEAD }, 346 { RT_STR_TUPLE("NO_DUP "), PDMAUDIOHOSTDEV_F_NO_DUP }, 353 { RT_STR_TUPLE("HOTPLUG "), PDMAUDIOHOSTDEV_F_HOTPLUG }, 354 { RT_STR_TUPLE("BUGGY "), PDMAUDIOHOSTDEV_F_BUGGY }, 355 { RT_STR_TUPLE("IGNORE "), PDMAUDIOHOSTDEV_F_IGNORE }, 356 { RT_STR_TUPLE("LOCKED "), PDMAUDIOHOSTDEV_F_LOCKED }, 357 { RT_STR_TUPLE("DEAD "), PDMAUDIOHOSTDEV_F_DEAD }, 358 { RT_STR_TUPLE("ID_ALLOC "), PDMAUDIOHOSTDEV_F_ID_ALLOC }, 359 { RT_STR_TUPLE("NO_DUP "), PDMAUDIOHOSTDEV_F_NO_DUP }, 347 360 }; 348 361 size_t offDst = 0; -
trunk/include/VBox/vmm/pdmaudioifs.h
r89229 r89232 327 327 /** The device is present but not in an alive state (dead). */ 328 328 #define PDMAUDIOHOSTDEV_F_DEAD RT_BIT_32(6) 329 /** Set if the PDMAUDIOHOSTDEV::pszId is allocated. */ 330 #define PDMAUDIOHOSTDEV_F_ID_ALLOC RT_BIT_32(30) 329 331 /** Set if the extra backend specific data cannot be duplicated. */ 330 332 #define PDMAUDIOHOSTDEV_F_NO_DUP RT_BIT_32(31) … … 377 379 uint8_t cMaxOutputChannels; 378 380 uint8_t abAlignment[ARCH_BITS == 32 ? 2 + 12 : 2]; 379 /** Device identifier, OS specific, can be NULL. It it isn't, it'll point to 380 * the non-public part (or into szName if creative). */ 381 const char *pszId; 381 /** Device identifier, OS specific, can be NULL. 382 * This can either point into some non-public part of this structure or to a 383 * RTStrAlloc allocation. PDMAUDIOHOSTDEV_F_ID_ALLOC is set in the latter 384 * case. */ 385 char *pszId; 382 386 /** Friendly name of the device, if any. Could be truncated. */ 383 387 char szName[64];
Note:
See TracChangeset
for help on using the changeset viewer.