- Timestamp:
- Aug 31, 2018 5:23:27 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r73611 r74006 247 247 int DrvAudioHlpDeviceEnumCopyEx(PPDMAUDIODEVICEENUM pDstDevEnm, const PPDMAUDIODEVICEENUM pSrcDevEnm, PDMAUDIODIR enmUsage, bool fCopyUserData); 248 248 PPDMAUDIODEVICE DrvAudioHlpDeviceEnumGetDefaultDevice(const PPDMAUDIODEVICEENUM pDevEnm, PDMAUDIODIR enmDir); 249 uint16_t DrvAudioHlpDeviceEnumGetDeviceCount(const PPDMAUDIODEVICEENUM pDevEnm, PDMAUDIODIR enmUsage); 249 250 void DrvAudioHlpDeviceEnumPrint(const char *pszDesc, const PPDMAUDIODEVICEENUM pDevEnm); 250 251 /** @} */ -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r73701 r74006 490 490 491 491 return NULL; 492 } 493 494 /** 495 * Returns the number of enumerated devices of a given device enumeration. 496 * 497 * @returns Number of devices if found, or 0 if none found. 498 * @param pDevEnm Device enumeration to get default device for. 499 * @param enmUsage Usage to get default device for. 500 */ 501 uint16_t DrvAudioHlpDeviceEnumGetDeviceCount(const PPDMAUDIODEVICEENUM pDevEnm, PDMAUDIODIR enmUsage) 502 { 503 AssertPtrReturn(pDevEnm, 0); 504 505 if (enmUsage == PDMAUDIODIR_ANY) 506 return pDevEnm->cDevices; 507 508 uint32_t cDevs = 0; 509 510 PPDMAUDIODEVICE pDev; 511 RTListForEach(&pDevEnm->lstDevices, pDev, PDMAUDIODEVICE, Node) 512 { 513 if (enmUsage == pDev->enmUsage) 514 cDevs++; 515 } 516 517 return cDevs; 492 518 } 493 519
Note:
See TracChangeset
for help on using the changeset viewer.